This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
Python 3 compatibility, sort of, maybe #103
Merged
Merged
Conversation
This file contains 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
Mostly xrange (screw it, just use range), spurious tabs, and division.
- Use the with statement, so it works with pypy (dies with "too many open files" otherwise) - Nuke dem tabs - Get rid of the global, yikes
Turns out that uselessly importing the 7300-line crystal.py on every single invocation adds up!
Mostly division. Also cleaned up a couple uses of bare open().
Well, one way to fix the test suites is to keep deleting code and tests until everything is "passing". I guess we should setup travis-ci, since we are trying to not live in the dark ages and such. |
Oho, believe me, I love deleting stuff that no one can justify keeping around. :D |
Conflicts: pokemontools/crystal.py
More python3-related changes
Relative imports render poketools unusable as a git submodule. |
That sounds backwards; relative imports exist for cases like submodules. |
This is probably the issue @PikalaxALT ran into.
|
@PikalaxALT For reference, and for other people reading this page, I worked around this "can't relative import" error by invoking the tools as |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The first commit is entirely automated, using
futurize --stage1
(a subset of2to3
that avoids doing anything that would break 2). Looks like it accidentally nuked the CRs from a couple files, which has made this diff look much worse than it actually is.Successfully builds both pokered and pokeyellow using CPython 2.7 and CPython 3.5 and maybe even a PyPy in there somewhere. Makes me happy since bare
python
is Python 3 on Arch.The test suite appears to be on fire, which makes it hard to tell if I broke anything. May keep poking at this, though.