Skip to content
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

Merge latest main & fix conflicts #22

Open
wants to merge 1,727 commits into
base: wip-inspect-multi-signature
Choose a base branch
from

Conversation

skirpichev
Copy link

@skirpichev skirpichev commented Oct 29, 2024


📚 Documentation preview 📚: https://cpython-previews--22.org.readthedocs.build/

AlexWaygood and others added 30 commits October 10, 2024 23:53
)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
…n argparse (pythonGH-125210)

Previously, all nested mutually exclusive groups lost their connection
to the group containing them and were displayed as belonging directly
to the parser.

Co-authored-by: Danica J. Sutherland <djsutherland@users.noreply.github.com>
…ion on Windows (python#125250)

Signed-off-by: y5c4l3 <y5c4l3@proton.me>
…hon#124795)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
…lDocs (python#125282)

Co-Authored-By: Carol Willing carolcode@willingconsulting.com
Co-Authored-By: Ezio Melotti ezio.melotti@gmail.com
Co-Authored-By: Hugo van Kemenade hugovk@users.noreply.github.com
Co-Authored-By: Itamar Ostricher itamarost@gmail.com
Co-Authored-By: Jesús Cea jcea@jcea.es
Co-Authored-By: Joannah Nanjekye 33177550+nanjekyejoannah@users.noreply.github.com
Co-Authored-By: Ned Batchelder ned@nedbatchelder.com
Co-Authored-By: Pablo Galindo Salgado Pablogsal@gmail.com
Co-Authored-By: Pamela Fox pamela.fox@gmail.com
Co-Authored-By: Sam Gross colesbury@gmail.com
Co-Authored-By: Stefan Pochmann 609905+pochmann@users.noreply.github.com
Co-Authored-By: T. Wouters thomas@python.org
Co-Authored-By: q-ata 24601033+q-ata@users.noreply.github.com
Co-Authored-By: slateny 46876382+slateny@users.noreply.github.com
Co-Authored-By: Борис Верховский boris.verk@gmail.com
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Jacob Coffee <jacob@z7x.org>
…garding the positional argument they accept (python#125213)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This patch is entirely by Thomas and Peter

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Replace the private _PyUnicodeWriter API with the public
PyUnicodeWriter API in _PyPegen_concatenate_strings().
…onGH-125215)

Also improve the documentation. Specify how dest and metavar are derived
from add_argument() positional arguments.

Co-authored-by: Simon Law <sfllaw@sfllaw.ca>
…ythonGH-125273)

This was a regression introduced in pythongh-58573. It was only tested for the
case when the ambiguous option is the last argument in the command line.
pythonGH-124839)

Raise ValueError in add_argument() if either explicit nargs=0 or action
that does not consume arguments (like 'store_const' or 'store_true') is
specified for positional argument.
…ython#125261)

This follows GNU gzip, which defaults to using 0 as the mtime
for compressing stdin, where no file mtime is involved.

This makes the output of gzip.compress() deterministic by default,
greatly helping reproducible builds.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
…ythonGH-124946)

In some locales (like French or Hebrew) the full or abbreviated names of
the default month and weekday used in __calc_date_time can be part of
other name or constant part of the %c format. The month name can also
match %m with constant suffix (like in Japanese). So the code failed to
correctly distinguish formats %a, %A, %b, %B and %m.

Cycle all month and all days of the week to find the variable part
and distinguish %a from %A and %b from %B or %m.

Fixed locales for the following languges:
Arabic, Bislama, Breton, Bodo, Kashubian, Chuvash, Estonian, French, Irish,
Ge'ez, Gurajati, Manx Gaelic, Hebrew, Hindi, Chhattisgarhi, Haitian Kreyol,
Japanese, Kannada, Korean, Marathi, Malay, Norwegian, Nynorsk, Punjabi,
Rajasthani, Tok Pisin, Yoruba, Yue Chinese, Yau/Nungon and Chinese.

Co-authored-by: Eli Bendersky <eliben@gmail.com>
In the datastructures tutorial doc, some operations are described as
"equivalent to" others. This has led to some user-confusion -- at
least in the Discourse forums -- about cases in which the operations
differ.

This change doesn't systematically eliminate the word "equivalent"
from the tutorial. It just substitutes "similar to" in several cases
in which "equivalent to" could mislead users into expecting exact
equivalence.
)

* Update sample code in asyncio-task.rst

This will change **coroutines** sample code in the **Awaitables** section and make the example clearer.

* Update Doc/library/asyncio-task.rst

Revert the added print

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>

* Update Doc/library/asyncio-task.rst

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>

---------

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
…hon#124737)

The PyContext struct is not intended to be public, and users of the
API don't need anything more specific than PyObject.  Also see
pythongh-78943.
Currently, the "global interpreter lock" entry in the glossary mentions
that `-X gil 0` can be used to disable the GIL [1]. However, this is
invalid; the correct usage should be `-X gil=0`.

    $ python -X gil 0 -c 'print("Hello, world")'
    Fatal Python error: config_read_gil: PYTHON_GIL / -X gil must be "0" or "1"
    Python runtime state: preinitialized

    $ python -X gil=0 -c 'print("Hello, world")'
    Hello, world

[1]: https://docs.python.org/3/using/cmdline.html#cmdoption-X

Signed-off-by: Ruoyu Zhong <zhongruoyu@outlook.com>
hugovk and others added 4 commits October 28, 2024 23:04
…125986)

These consist of a number of short snippets that help identify scaling
bottlenecks in the free threaded interpreter.

The current bottlenecks are in calling functions in benchmarks that call
functions (due to `LOAD_ATTR` not yet using deferred reference counting)
and when accessing thread-local data.
hoodmane and others added 24 commits October 29, 2024 06:28
…gs (python#124929)

Clean up configure flags for old node versions

These flags are only needed for node <= 16. Node 16 has been end of life since
October of 2023.
Yak-shave in preparation for Argument Clinic adaption in pythongh-125999.
…ython#126111)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Add LOAD_CONST_IMMORTAL opcode

* Add LOAD_SMALL_INT opcode

* Remove RETURN_CONST opcode
…nGH-122848)


Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
python#126115)

Previously, if the `ast.AST._fields` attribute was deleted, attempts to create a new `as`t node would crash due to the assumption that `_fields` always had a non-NULL value. Now it has been fixed by adding an extra check to ensure that `_fields` does not have a NULL value (this can happen when you manually remove `_fields` attribute).
…126100)

* Update contributing contact info in readme

* Add lightweight comments to improve docs workflow understanding

* Apply code review suggestions from @hugovk

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

* Add code review suggestion from @AA-Turner

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

* Update Doc/conf.py

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

* Update Doc/conf.py

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

* Update Doc/conf.py

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

---------

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
…()` (python#125993)

Merge `URL2PathNameTests` and `PathName2URLTests` test cases (which test
only the Windows-specific implementations from `nturl2path`) into the main
`Pathname_Tests` test case for these functions.

Copy/port some test cases for `pathlib.Path.as_uri()` and `from_uri()`.
…uilds (python#124933)

In Emscripten and other cross builds, the build file system and the host file
system look different. For instance, we may want to install into
`cross-build/$TARGET/lib`, and then mount that as `/lib` in the host file
system. This change adds a distinction between:

* `prefix` -- the path in the build file system where we want to install the files
* `host_prefix` -- the path in the host file system where getpath.c will look for the files

And similarly for `exec_prefix` and `host_exec_prefix`. At present, this is only
used for Emscripten.
Remove ``__cmp__`` method from the tests because it was removed in 3.0 version.
…l stop from `dict` documentation (python#125421)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
pythonGH-22257)

* Qualifying that the right operand's type must be a *strict* subclass for the reflected method to take precedence avoids an edge case / counter-example when the types are actually equal.

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
…ns (python#125589)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
…xec (pythonGH-118437)

* Add warning regarding the unsafe usage of eval

* Add warning regarding the unsafe usage of exec

* Move warning under parameters table

* Use suggested shorter text

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

* Use suggested shorter text

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

* Improve wording as suggested

---------

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.