-
Notifications
You must be signed in to change notification settings - Fork 115
Python 3 compatibility (WIP) #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Evernote module not compatible with py3 yes.
* Py3 requires absolute imports
* Multiprocessing module has been reorganized for py3.4+
(see https://github.com/pyinstaller/pyinstaller/wiki/Recipe-Multiprocessing)
* Use DistUtils.StrictVersion for version checking, makes it easier * Update except listings to py3 format * Force encoding for subprocess output to avoid having bytestrings in py3
With a bare `raise` not being acceptable in py3, just raising an exception of the same type lost much of the useful information, making debugging hard. Now the original error is preserved, and re-raised appropriately.
* Use context manager for opening files, to make sure they are closed properly * Different (better) string conversions now py3 is unicode default
* Use tmpdir in tests to ensure a new directory is used for every test and cleaned up afterwards. * Use `self` instead of class name when addressing class attributes * Define class attributes in `__init__` to prevent data-leaks between multiple instances of the class. * Move queue purging out of loop to avoid "Dictionary changed size..." errors.
* Include py3.5 and py3.6 testing in travis.
* Run pytest directly instead of through `setup.py` and fabric.
At this time fabric is py2 only, so an updated `runtests.py`
can't be generated.
This flag is no longer supported, and has been removed from current versions of pip. See travis-ci/docs-travis-ci-com#10 for more details.
It seems that py2 wasn't happy with purely absolute imports, whilst py3 isn't happy with purely relative imports. Using explicit relative imports seems to be working in both py2 and py3.
This reenables evernote support in python2 whilst keeping python3 functionality for all other aspects.
Author
|
The most sensible option seemed to be retaining evernote in py2, whilst omitting it in py3 for the time being. I've implemented this and no longer consider this a WIP pull request. I'll go through and squash the commits in the coming days. |
Author
|
Resubmitting this as PR #71 with commit squashed, so closing this PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is work-in-progress pull request for python 3 compatibility addressing issue #36.
The evernote package isn't currently available for py3 (see https://pypi.python.org/pypi/evernote), which causes a problem. For now all evernote functionality has been removed, including for py2 (hence why this is a WIP PR). There are a couple of options here:
Also fabric isn't compatible with py3 yet either. I haven't worked with it before, so am not sure how important it is to the dev workflow here. For now I've changed tests to run directly instead of via the fabric generated
runtests.py.p.s. Sorry it's so big - but it feels like an all-or-nothing situation. I've tried to keep it only to changes needed for py3 compatibility, and have endeavored to keep the functionality identical. Before this is merged I'll squash the commits so all my mistakes aren't included, but kept the individual commits for now to make reviewing easier.