-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-45442: Add deactivate step to venv tutorial. #28959
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
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). Recognized GitHub usernameWe couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames: This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
@@ -88,6 +88,9 @@ For example: | |||
'~/envs/tutorial-env/lib/python3.5/site-packages'] | |||
>>> | |||
|
|||
To deactivate a virtual environment, type:: |
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.
Warning, treated as error:
/home/vsts/work/1/s/Doc/tutorial/venv.rst:93:Definition list ends without a blank line; unexpected unindent.
make: *** [Makefile:51: build] Error 2
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.
Hopefully fixed with the second commit
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
Doc/tutorial/venv.rst
Outdated
To deactivate a virtual environment, type:: | ||
|
||
deactivate | ||
into the terminal. This is a shell function defined by the script when the virtual environment is activated. |
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 specific detail about deactivate
being a shell function isn't in general correct, though it is true on POSIX and with PowerShell. There is a corresponding deactivate.bat
which comes into play on Windows where cmd.exe
rather than PowerShell is used. You could just remove this detail, which isn't especially important to know from a user perspective.
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.
Got you—will remove the line.
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 d 8000 evelopers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Remove two functions from the limited C API: * PyMarshal_WriteLongToFile() * PyMarshal_WriteObjectToFile() The PEP 384 excludes functions expecting "FILE*" from the stable ABI. Remove also the Py_MARSHAL_VERSION macro from the limited C API.
The <Python.h> header file no longer includes <stdio.h> if the Py_LIMITED_API macro is defined.
Fix bad copy/paste.
Micro-optimize spaces!
Remove redundant "#ifndef Py_LIMITED_API" in funcobject.h.
Remove dead variables and control flow.
Thank you to Eryk Sun for the suggestions in python#28965 (comment).
Move classobject.h, context.h, genobject.h and longintrepr.h header files from Include/ to Include/cpython/. Remove redundant "#ifndef Py_LIMITED_API" in context.h. Remove explicit #include "longintrepr.h" in C files. It's not needed, Python.h already includes it.
…8848) Strip trailing '\n'.
…28969) Move the interpreteridobject.h header file from Include/ to Include/internal/. It only provides private functions.
Move Include/eval.h content into Include/ceval.h and Include/cpython/ceval.h, and remove Include/eval.h.
…8975) Rename Include/namespaceobject.h to Include/internal/pycore_namespace.h. The _testmultiphase extension is now built with the Py_BUILD_CORE_MODULE macro defined to access _PyNamespace_Type. object.c: remove unused "pycore_context.h" include.
14215fe
to
675ff5d
Compare
Bit of a mess, clearly—apologies to all. Would it be easier to just close this PR and start from scratch? It was meant to be a oneline update to a doc tutorial page. |
Document process to deactivate virtual environment.
https://bugs.python.org/issue45442