-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
-2
and --python-version 2.7
arguments differ in behaviour
#5576
Comments
Why are you digging in mypy's internals? Is there any externally observable behavior that differs? |
I think the site-packages ends up being different. I could be wrong. I'm just not entirely sure how to show this. Sorry for being unclear. |
OK, I'll wait until you have something more concrete.
|
My problem was that I was getting I have two 2.7 packages, I hope that example makes more sense than what I wrote previously. I've also attached a gzipped |
@ethanhs Can you repro this? |
It also seems if I write a I think because |
OK, I can definitely repro this. I essentially did this:
Then I ran mypy two ways:
That's expected. But with
@sqwishy If you have an idea for a fix it may go quicker. |
(In any case we decided it's not a blocker for the 0.630 release.)
|
Since the original pull request had some negative outcomes, I've reopened a new one to handle just the behavioural inconsistency between how mypy runs given the I have opened a issue #5620 concerning how this problem relates to the configuration file as well, which I mentioned earlier here. Hopefully this reduces and clarifies the scope of this stuff and makes things a little easier for you guys. Thanks for your patience. |
This is on mypy 0.620 on Python 3.6.
My understanding is that the command arguments
-2
and--python-version 2.7
aresupposed to do the same thing. But in
infer_python_version_and_executable()
python_version is different on the given options and I think this affects how it finds a
value for
python_executable
.If I'm understanding this correctly, I think it might be an issue with the arguments
having different
dest
values?-2
sets a constant on the wrong namespace?I would expect
special_opts.python_version
to be the same in both cases.The text was updated successfully, but these errors were encountered: