-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Make typing and typed-ast external dependencies #2452
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
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2a31c31
Make typing and typed-ast external dependencies.
c219961
Make Python 3.3/3.4 tests pass, by skipping a test depending on a spe…
263f005
Update setup.cfg with cargo-culted stuff
7d91652
Our wheels are not universal
08c86df
Add comments clarifying some things added here
8e8298d
Attempt to fix test failure by also replacing base_version with $VERSION
2ab1e6e
Update setup.cfg
ddfisher b8468e7
Update setup.py to match setup.cfg
09d39c7
We need typed_ast 0.6.3
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add comments clarifying some things added here
- Loading branch information
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes $VERSION to be set as an environment variable, hence cobertura tests fail. I'm looking into how to fix this cleanly. Also, I don't quite understand why 3.6 tests passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really? By what mechanism does $VERSION get set?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am talking nonsense. What happens is as follows:
test-data/unit/cmdline.test
has $VERSION and $TIMESTAMP abstracted away because they will obviously be different too oftenmypy/test/testcmdline.py
, line 101mypy.__version__
is"0.4.7-dev-2c9250eb182708402c66f8197f62ebe0190a43d5-dirty"
so it doesn't replace the"0.4.7-dev"
string in the XMLI'm investigating now why this is the case.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test harness does
python setup.py install
which is different on setuptools frompython setup.py develop
(which is the equivalent ofpip install -e .
).There's two ways forward to fix this:
pip install -e .
or equivalent, we can simply change the command that sayspython setup.py install
to saypython setup.py develop
. I don't like this because this makes the cmdline test less isolated (we never perform a complete installation).mypy/test/testcmdline.py
which performs another replace to $VERSION, but this time usingmypy.version.base_version
and notmypy.version.__version__
. This makes it work for both cases and won't break when we implement Version doesn't include git commit hash when installed via "pip3 install ." #2547.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I think about as far as I got the previous time around. The big mystery is why 3.6-dev behaves differently. I noticed that there was something different in the way lxml is installed. See previous comments (search for lxml).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm for (2). I'm not sure what
pip install -e .
orpython setup.py develop
do (the help text is kind of minimal) so (1) is particularly unattractive for me.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why setuptools would behave differently on 3.6, no idea. lxml 3.6.4 is a red herring, the difference is because there is a lxml 3.6.4 wheel pre-built for 3.5 on PyPI but none for 3.6. This went away BTW since there's just .tar.gz for lxml 3.7.0.
I can confirm both of my suggested fixes solve the failure.