question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider moving all code into a top-level package

See original GitHub issue

Electrum has now done this. As per the current setup.py, I assume we’d want our package to be called electroncash rather than electrum, otherwise it would be impossible to install both programs in the same environment. This will unfortunately make merges from Electrum harder than they were before, but no harder than they are right now since Electrum made this change.

Advantages:

  • Using the same directory names in the source code and at runtime is simpler, and is the normal Python practice.
  • The workarounds for the mismatching names can be removed from each of the GUIs, and will be unnecessary in the new Android app.
  • It would make it easier to run the unit tests, as discussed in #723. Tests which are easier to run are more likely to be kept up to date. (The other test issue in that PR had been broken for over a month, so evidently nobody had run the tests in that time.)

Disadvantages:

  • All open branches and pull requests will have to be rebased.
  • The workarounds for the mismatching names must be removed from each of the GUIs.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

1reaction
mhsmithcommented, Oct 18, 2020

Yeah, I don’t think that would be worth the trouble.

1reaction
kyuupichancommented, Jul 20, 2018

I think this is a good idea. Electron Cash now warns it’s using obsolete features with Python3.7 because of the current hack

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set toplevel for Python package - Stack Overflow
Here my question: Is there any way i can define toplevel folder in main.py without moving the main file around? Note1: also there...
Read more >
Python beyond top level package error in relative import
This code imports the file “printer” from the directory above app/. The directory above app/ is the main directory for our project. Our...
Read more >
Python Tkinter - Toplevel Widget - GeeksforGeeks
A Toplevel widget is used to create a window on top of all other windows. The Toplevel widget is used to provide some...
Read more >
Python import: Advanced Techniques and Tips
In Python, you use the import keyword to make code in one module available in another. Imports in Python are important for structuring...
Read more >
Migrating from packages.config to PackageReference formats
Details on how to migrate a project from the packages.config ... Manage all project dependencies in one place: Just like project to project ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found