Skip to content

Commit

Permalink
Merge branch 'main' into pythongh-115999-thread-local-bytecode
Browse files Browse the repository at this point in the history
  • Loading branch information
mpage committed Sep 30, 2024
2 parents 95d2264 + 077e7ef commit b6380de
Show file tree
Hide file tree
Showing 76 changed files with 1,968 additions and 703 deletions.
6 changes: 3 additions & 3 deletions Doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,12 @@ serve:
# for development releases: always build
.PHONY: autobuild-dev
autobuild-dev:
$(MAKE) dist SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1'
$(MAKE) dist-no-html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1'

# for quick rebuilds (HTML only)
# for HTML-only rebuilds
.PHONY: autobuild-dev-html
autobuild-dev-html:
$(MAKE) html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1'
$(MAKE) dist-html SPHINXOPTS='$(SPHINXOPTS) -Ea -A daily=1'

# for stable releases: only build if not in pre-release stage (alpha, beta)
# release candidate downloads are okay, since the stable tree can be in that stage
Expand Down
4 changes: 2 additions & 2 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@
\let\endVerbatim=\endOriginalVerbatim
\setcounter{tocdepth}{2}
''',
# The paper size ('letter' or 'a4').
'papersize': 'a4',
# The paper size ('letterpaper' or 'a4paper').
'papersize': 'a4paper',
# The font size ('10pt', '11pt' or '12pt').
'pointsize': '10pt',
}
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/argparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1823,7 +1823,7 @@ Sub-commands
>>>
>>> # create the parser for the "b" command
>>> parser_b = subparsers.add_parser('b', help='b help')
>>> parser_b.add_argument('--baz', choices='XYZ', help='baz help')
>>> parser_b.add_argument('--baz', choices=('X', 'Y', 'Z'), help='baz help')
>>>
>>> # parse some argument lists
>>> parser.parse_args(['a', '12'])
Expand Down
13 changes: 8 additions & 5 deletions Doc/library/pdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -439,17 +439,20 @@ can be overridden by the local file.

Specifying any command resuming execution
(currently :pdbcmd:`continue`, :pdbcmd:`step`, :pdbcmd:`next`,
:pdbcmd:`return`, :pdbcmd:`jump`, :pdbcmd:`quit` and their abbreviations)
:pdbcmd:`return`, :pdbcmd:`until`, :pdbcmd:`jump`, :pdbcmd:`quit` and their abbreviations)
terminates the command list (as if
that command was immediately followed by end). This is because any time you
resume execution (even with a simple next or step), you may encounter another
breakpoint—which could have its own command list, leading to ambiguities about
which list to execute.

If you use the ``silent`` command in the command list, the usual message about
stopping at a breakpoint is not printed. This may be desirable for breakpoints
that are to print a specific message and then continue. If none of the other
commands print anything, you see no sign that the breakpoint was reached.
If the list of commands contains the ``silent`` command, or a command that
resumes execution, then the breakpoint message containing information about
the frame is not displayed.

.. versionchanged:: 3.14
Frame information will not be displayed if a command that resumes execution
is present in the command list.

.. pdbcommand:: s(tep)

Expand Down
4 changes: 3 additions & 1 deletion Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2349,7 +2349,9 @@ types.

Backward-compatible usage::

# For creating a generic NamedTuple on Python 3.11 or lower
# For creating a generic NamedTuple on Python 3.11
T = TypeVar("T")

class Group(NamedTuple, Generic[T]):
key: T
group: list[T]
Expand Down
53 changes: 25 additions & 28 deletions Doc/library/venv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -288,31 +288,31 @@ creation according to their needs, the :class:`EnvBuilder` class.
The :class:`EnvBuilder` class accepts the following keyword arguments on
instantiation:

* ``system_site_packages`` -- a Boolean value indicating that the system Python
* *system_site_packages* -- a boolean value indicating that the system Python
site-packages should be available to the environment (defaults to ``False``).

* ``clear`` -- a Boolean value which, if true, will delete the contents of
* *clear* -- a boolean value which, if true, will delete the contents of
any existing target directory, before creating the environment.

* ``symlinks`` -- a Boolean value indicating whether to attempt to symlink the
* *symlinks* -- a boolean value indicating whether to attempt to symlink the
Python binary rather than copying.

* ``upgrade`` -- a Boolean value which, if true, will upgrade an existing
* *upgrade* -- a boolean value which, if true, will upgrade an existing
environment with the running Python - for use when that Python has been
upgraded in-place (defaults to ``False``).

* ``with_pip`` -- a Boolean value which, if true, ensures pip is
* *with_pip* -- a boolean value which, if true, ensures pip is
installed in the virtual environment. This uses :mod:`ensurepip` with
the ``--default-pip`` option.

* ``prompt`` -- a String to be used after virtual environment is activated
* *prompt* -- a string to be used after virtual environment is activated
(defaults to ``None`` which means directory name of the environment would
be used). If the special string ``"."`` is provided, the basename of the
current directory is used as the prompt.

* ``upgrade_deps`` -- Update the base venv modules to the latest on PyPI
* *upgrade_deps* -- Update the base venv modules to the latest on PyPI

* ``scm_ignore_files`` -- Create ignore files based for the specified source
* *scm_ignore_files* -- Create ignore files based for the specified source
control managers (SCM) in the iterable. Support is defined by having a
method named ``create_{scm}_ignore_file``. The only value supported by
default is ``"git"`` via :meth:`create_git_ignore_file`.
Expand All @@ -330,10 +330,7 @@ creation according to their needs, the :class:`EnvBuilder` class.
.. versionchanged:: 3.13
Added the ``scm_ignore_files`` parameter

Creators of third-party virtual environment tools will be free to use the
provided :class:`EnvBuilder` class as a base class.

The returned env-builder is an object which has a method, ``create``:
:class:`EnvBuilder` may be used as a base class.

.. method:: create(env_dir)

Expand Down Expand Up @@ -433,37 +430,27 @@ creation according to their needs, the :class:`EnvBuilder` class.

.. method:: upgrade_dependencies(context)

Upgrades the core venv dependency packages (currently ``pip``)
Upgrades the core venv dependency packages (currently :pypi:`pip`)
in the environment. This is done by shelling out to the
``pip`` executable in the environment.

.. versionadded:: 3.9
.. versionchanged:: 3.12

``setuptools`` is no longer a core venv dependency.
:pypi:`setuptools` is no longer a core venv dependency.

.. method:: post_setup(context)

A placeholder method which can be overridden in third party
implementations to pre-install packages in the virtual environment or
perform other post-creation steps.

.. versionchanged:: 3.7.2
Windows now uses redirector scripts for ``python[w].exe`` instead of
copying the actual binaries. In 3.7.2 only :meth:`setup_python` does
nothing unless running from a build in the source tree.

.. versionchanged:: 3.7.3
Windows copies the redirector scripts as part of :meth:`setup_python`
instead of :meth:`setup_scripts`. This was not the case in 3.7.2.
When using symlinks, the original executables will be linked.

In addition, :class:`EnvBuilder` provides this utility method that can be
called from :meth:`setup_scripts` or :meth:`post_setup` in subclasses to
assist in installing custom scripts into the virtual environment.

.. method:: install_scripts(context, path)

This method can be
called from :meth:`setup_scripts` or :meth:`post_setup` in subclasses to
assist in installing custom scripts into the virtual environment.

*path* is the path to a directory that should contain subdirectories
``common``, ``posix``, ``nt``; each containing scripts destined for the
``bin`` directory in the environment. The contents of ``common`` and the
Expand Down Expand Up @@ -495,6 +482,16 @@ creation according to their needs, the :class:`EnvBuilder` class.

.. versionadded:: 3.13

.. versionchanged:: 3.7.2
Windows now uses redirector scripts for ``python[w].exe`` instead of
copying the actual binaries. In 3.7.2 only :meth:`setup_python` does
nothing unless running from a build in the source tree.

.. versionchanged:: 3.7.3
Windows copies the redirector scripts as part of :meth:`setup_python`
instead of :meth:`setup_scripts`. This was not the case in 3.7.2.
When using symlinks, the original executables will be linked.

There is also a module-level convenience function:

.. function:: create(env_dir, system_site_packages=False, clear=False, \
Expand Down
5 changes: 4 additions & 1 deletion Doc/reference/datamodel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,10 @@ Special attributes
.. versionadded:: 3.13

* - .. attribute:: type.__firstlineno__
- The line number of the first line of the class definition, including decorators.
- The line number of the first line of the class definition,
including decorators.
Setting the :attr:`__module__` attribute removes the
:attr:`!__firstlineno__` item from the type's dictionary.

.. versionadded:: 3.13

Expand Down
Loading

0 comments on commit b6380de

Please sign in to comment.