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

bro #4

Open
wants to merge 10,000 commits into
base: patch-13
Choose a base branch
from
Open

Conversation

thatbirdguythatuknownot
Copy link
Owner

No description provided.

nedbat and others added 30 commits September 27, 2024 06:17
…124591)


Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
…n't support negative years (#124467)

Add Android to the list of platforms where `strftime` doesn't support negative years
If using `slots=True`, the `doc` parameter ends up in the `__slots__` dict. The `doc` parameter is also in the corresponding `Field` object.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
…#124683)

Disable test that is prone to intermittent failure on iOS.
…ive voice. (gh-124690)

Minor clarifications, wording tweaks, spacing, and active voice.
* Add assignment expression (:=) to `help`

* Update index for Assignment Expressions to include pair of `assignment; expression`
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
https://www.sphinx-doc.org/en/master/latex.html#the-latex-elements-configuration-setting

It should be 'letterpaper' or 'a4paper' not 'letter' or 'a4'
(not to be confused with PAPER env variable).
- Move "versionchanged" notes that apply to the whole class to the
  end of the class docs
- Remove or move notes next to the method list that apply to individual
  methods.
- Mark up parameters using the appropriate syntax
- Do not capitalize "boolean"
- Shorten some text
Get a module state from ctx objects for performance.
…__ in classes (GH-123613)

* Setting the __module__ attribute for a class now removes the
  __firstlineno__ item from the type's dict.
* The _collections_abc and _pydecimal modules now completely replace the
  collections.abc and decimal modules after importing them. This
  allows to get the source of classes and functions defined in these
  modules.
* inspect.findsource() now checks whether the first line number for a
  class is out of bound.
…4492)

Signed-off-by: kp2pml30 <kp2pml30@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
iritkatriel and others added 30 commits October 11, 2024 21:18
…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>
…g the positional argument they accept (#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().
Also improve the documentation. Specify how dest and metavar are derived
from add_argument() positional arguments.

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

This was a regression introduced in gh-58573. It was only tested for the
case when the ambiguous option is the last argument in the command line.
…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.
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>
…4946)

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>
The PyContext struct is not intended to be public, and users of the
API don't need anything more specific than PyObject.  Also see
gh-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>
…r does (GH-125385)

Update comments about what running hash -r does

The old comment said "hash -r" forgets "past commands." However, the documentation for "hash" states that it forgets past locations. The old comment was, in my opinion, confusing. This is because it could be interpreted to mean it does something to the command history (HISTORY/HISTFILE etc) vs the cache of locations.
In aeca373 (PR gh-12011, issue gh-71500), test_identify() was changed to expect different results on Darwin. Ned's fix was later adjusted by e52f9be. This workaround is only needed for some variants of Tk/Tcl on macOS, so we now allow both the workaround and the generic results for these tests.
`Doc/tutorial/controlflow.rst`: fix comment for `fib` function
…125325)

Make `WeakKeyDictionary` and `WeakValueDictionary` thread safe by copying the underlying the dict before iterating over it.
…125156)

`PurePath.__init__()` incorrectly uses the `_raw_paths` of a given
`PurePath` object with a different flavour, even though the procedure to
join path segments can differ between flavours.

This change makes the `_raw_paths`-enabled deferred joining apply _only_
when the path flavours match.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Lock `ZoneInfoType` to protect accesses to `ZONEINFO_STRONG_CACHE`.
Refactor the `tp_new` handler to use Argument Clinic so that we can just
use `@critical_section` annotations on the relevant functions.

Also use `PyDict_SetDefaultRef` instead of `PyDict_SetDefault` when
inserting into the `TIMEDELTA_CACHE`.
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.