-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
bpo-34556: Add --upgrade-deps to venv module #13100
Conversation
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.
Hi,
Thank you so much for your contribution but I am going to ask you to remove the unnecessary blank lines and formatting. We have to be focused on the main modification, your new feature and not on a new line or a new space in a comment. It's useful in some cases, but not really here. just go to the essential thing but for your new code, you can format it, no problem.
I hope you will understand.
Thank you again for your contrib, I think it could be really useful with ./python -m venv --upgrade-deps
PS: I have not checked but you could add yourself into the Misc/ACKS
file
Lib/venv/__init__.py
Outdated
@@ -250,7 +256,7 @@ def setup_python(self, context): | |||
|
|||
if sysconfig.is_python_build(True): | |||
# copy init.tcl | |||
for root, dirs, files in os.walk(context.python_dir): | |||
for root, _dirs, files in os.walk(context.python_dir): |
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 this change?
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.
dirs is not used in the loop, this is a flake recommended way to indicate that. Will revert so I get my feature landed :)
@@ -0,0 +1 @@ | |||
Add --upgrade-deps to venv module |
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.
Use the ReST markup like --upgrade-deps
. Add "Patch by ..."
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.
Sure thing.
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 |
No problems, thanks for the review. p.s. I am already in ACKs for a previous change. Thanks for asking. |
in fact, there is no plan for the stdlib PEP8 compliant excepted for the new code, not for the former and there is a reason for that. if we migrate the stdlib to PEP8, we will have a lot of conflicts for a backport :/ for the new Python code, you can be PEP8 compliant. |
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.
small change with the f-string. thank you
Do you all need anything else from me? Would love to see this merge :) |
Sync with upstream cpython
- This allows for pip + setuptools to be automatically upgraded to the latest version on PyPI - Update documentation to represent this change bpo-34556: Add --upgrade to venv module
- Revert documentation fixes - Add update_deps param to create() function - Update NEWS file correctly
Rebased my fork and force pushed the update so merge conflicts should go away. |
@ambv: Please replace |
Thanks! ✨ 🍰 ✨ |
Add --upgrade-deps to venv module - This allows for pip + setuptools to be automatically upgraded to the latest version on PyPI - Update documentation to represent this change bpo-34556: Add --upgrade to venv module
It looks like this didn't land in 3.8.0. I was hoping the implementation could be improved before being released in any 3.8.x. Personally, I'd never use So, rather than install the bundled pip, and then use that pip installation to uninstall itself and install latest version of pip, wouldn't it be better just to plumb through to ensurepip directly and add ability to fetch latest from index in the first place? Upsides:
Downsides: |
FWIW, this is the kind of shell function I had in mind:
Obviously you don't have to hardcode the path to the whl file, you can build it off of |
Thanks for looking into this. All for the more efficient way to avoid the double install and passing this into ensurepip is definitely the way, but I was not sure if it could handle remote fetches to PyPI if it was needed. I admit I went the easier route that introduced less change so I had something as performance of the creation was not a high priority for me (and it's optional) and in scripts I was already effectively doing it. |
Add --upgrade-deps to venv module - This allows for pip + setuptools to be automatically upgraded to the latest version on PyPI - Update documentation to represent this change bpo-34556: Add --upgrade to venv module
Fixes incorrect Python version added for `venv` `--upgrade-deps` in python#13100. This feature was added in Python 3.9 not 3.8. Relates to: - - python@1cba1c9 Automerge-Triggered-By: @vsajip
bpo-34556: Add --upgrade to venv module
https://bugs.python.org/issue34556