PEP648: Updates from discourse thread (#1811)
Some clarifications from discussions in the discourse thread.
This commit is contained in:
parent
bb4751379a
commit
c19863770f
15
pep-0648.rst
15
pep-0648.rst
|
@ -136,6 +136,10 @@ having randomly different results on interpreter startup.
|
|||
We chose to run the scripts after the ``pth`` files in case a user needs to
|
||||
add items to the path before running a script.
|
||||
|
||||
Note the execution happens after the handling of ``pth`` files for each of the
|
||||
site paths and that the ``__sitecustomize__`` folder need to be in site paths
|
||||
and not in just any importable path.
|
||||
|
||||
Impact on startup time
|
||||
----------------------
|
||||
|
||||
|
@ -159,15 +163,16 @@ Failure handling
|
|||
|
||||
Any error on any of the scripts will not be logged unless the interpreter is
|
||||
run in verbose mode and it should not stop the evaluation of other scripts.
|
||||
The user will just receive a message saying that the script failed to be
|
||||
executed, that verbose mode can be used to get more information. This
|
||||
The user will just receive a message in stderr saying that the script failed to
|
||||
be executed and that verbose mode can be used to get more information. This
|
||||
behaviour follows the one already existing for ``sitecustomize.py``.
|
||||
|
||||
Scripts naming convention
|
||||
-------------------------
|
||||
|
||||
Packages will be encouraged to include the name of the package within the
|
||||
name of the script to avoid collisions between packages.
|
||||
Packages will be encouraged to include the name of the package within the name
|
||||
of the script to avoid collisions between packages. The only requirement on the
|
||||
filename is that it ends in ``.py`` for the interpreter to execute them.
|
||||
|
||||
Relationship with sitecustomize and usercustomize
|
||||
-------------------------------------------------
|
||||
|
@ -316,6 +321,6 @@ References
|
|||
|
||||
.. [#reference-implementation]
|
||||
https://github.com/mariocj89/cpython/tree/pu/__sitecustomize__
|
||||
|
||||
|
||||
.. [#site]
|
||||
https://docs.python.org/3/library/site.html
|
||||
|
|
Loading…
Reference in New Issue