-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-38691 Added a switch to ignore PYTHONCASEOK when -E or -I flags passed #18314
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
Conversation
@vstinner Added a PR 👍 |
Not sure why the test_importlib test fails, I think it expects the value no matter what? |
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.
Please run make regen-all
before commit.
You can see some diffs which are generated from this command.
And please commit it after do this.
Thanks for the contribution
Lib/importlib/_bootstrap_external.py
Outdated
"""True if filenames must be checked case-insensitively. | ||
If the -E or -I flags are used PYTHONCASEOK is ignored | ||
""" | ||
if sys.flags.ignore_environment: |
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.
return not sys.flags.ignore_environment and key in _os.environ
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.
Accepted both comments thank you!
Misc/NEWS.d/next/Library/2020-02-02-14-48-01.bpo-38691.ewUjZn.rst
Outdated
Show resolved
Hide resolved
I will not review this change: most CIs are red. Please fix it before I can look at this PR. |
@corona10 git clean -fdx |
@idomic |
@corona10 I think I might be doing something wrong. I was cleaning the folder using: git clean -fdx |
Adding @taleinat to accelerate PR |
This PR looks overcomplicated. It has 24 commits but only changes 1 line of code... Maybe create a new PR on top of the up to date master branch, and ensure that you run "make regen-all" to update Python/importlib_external.h. |
Hi @idomic!
Yep, it seems that you've become a bit tangled up with the git merges and rebases. The final step that caused the current mess was when, after rebasing, you allowed merging with the remote branch. Instead, you should have force-pushed the rebased branch, using I suggest you (hard-) reset your branch to the commit before merging the remote branch, and then force-push it. (Generally, for branches with an open PR, I always recommend merging rather than rebasing. This is for several reasons, one of them being avoiding issues like this. Even when you're asked "please rebase", merging will usually achieve the same end result in terms of the files, but make following and managing the PR simpler.) |
334d852
to
3e872b2
Compare
Thanks for the quick help @taleinat So Once hard resetting and cherry picking the CI starts running, windows x64 fails on: Once I run configure with --pydebug and make regen-all it creates a conflict in the file importlib_external.h even though I'm forcing my local branch push. |
@@ -0,0 +1 @@ | |||
Updated :meth:`importlib._bootstrap_external._make_relax_case` to ignore :envvar:`PYTHONCASEOK` when -E or -I flags are used. |
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.
Please avoid documenting private modules/functions in public Changelog entries. I propose:
The :mod:`importlib` module now ignore the :envvar:`PYTHONCASEOK`
environment variable when :option:`-E` or :option:`-I` command line option is used.
Please document also this incompatible change at:
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Thanks for the comments @vstinner |
Thanks for making the requested changes! @vstinner: please review the changes made to this pull request. |
Doc/library/functions.rst
Outdated
@@ -1826,6 +1826,10 @@ are always available. They are listed here in alphabetical order. | |||
Negative values for *level* are no longer supported (which also changes | |||
the default value to 0). | |||
|
|||
.. versionchanged:: 3.9 | |||
When the command line options -E or -I is used, the environment variable | |||
PYTHONCASEOK is ignored. |
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 suggest to add "now", suggestion which also added :envvar:
markup:
When the command line options :option:`-E` or :option:`-I` is used,
the environment variable :envvar:`PYTHONCASEOK` is now ignored.
Doc/whatsnew/3.9.rst
Outdated
@@ -262,6 +262,8 @@ Changes in the Python API | |||
* The :mod:`venv` activation scripts no longer special-case when | |||
``__VENV_PROMPT__`` is set to ``""``. | |||
|
|||
* The :mod:`importlib` module now ignore the :envvar:`PYTHONCASEOK` |
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 :mod:`importlib` module now ignore the :envvar:`PYTHONCASEOK` | |
* The :mod:`importlib` module now ignores the :envvar:`PYTHONCASEOK` |
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 have made the requested changes; please review again
Well, you didn't update this one. English is not my first language, so I'm not sure, but it should be "The module ignoreS" here, no? with an S.
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.
Yep, you're right regarding the English grammar here, @vstinner.
Misc/NEWS.d/next/Library/2020-02-11-13-01-38.bpo-38691.oND8Sk.rst
Outdated
Show resolved
Hide resolved
I have made the requested changes; please review again |
Thanks for making the requested changes! @vstinner: please review the changes made to this pull request. |
Doc/library/functions.rst
Outdated
@@ -1826,6 +1826,10 @@ are always available. They are listed here in alphabetical order. | |||
Negative values for *level* are no longer supported (which also changes | |||
the default value to 0). | |||
|
|||
.. versionchanged:: 3.9 | |||
When the command line options :option:`-E` or :option:`-I` is used, |
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.
When the command line options :option:`-E` or :option:`-I` is used, | |
When the command line options :option:`-E` or :option:`-I` are used, |
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.
Will fix both comments now
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 understood what the problem was, apparently I misconfigured my local repo so there was no up stream, now everything should pass fine.
Also, note that when you're done, you'll have to merge and regenerate |
I have made the requested changes; please review again |
Thanks for making the requested changes! @vstinner: please review the changes made to this pull request. |
Codecov Report
@@ Coverage Diff @@
## master #18314 +/- ##
=========================================
Coverage 82.11% 82.12%
=========================================
Files 1956 1955 -1
Lines 589364 584024 -5340
Branches 44457 44457
=========================================
- Hits 483962 479608 -4354
+ Misses 95750 94766 -984
+ Partials 9652 9650 -2
Continue to review full report at Codecov.
|
@vstinner: Please replace |
@idomic: Thanks, I merged your PR. |
@vstinner This PR is likely to be the cause of https://buildbot.python.org/all/#/builders/275/builds/245 |
|
https://bugs.python.org/issue38691