Commit graph

120616 commits

Author SHA1 Message Date
Travis Howse 94ec2b9c9c
gh-114887 Reject only sockets of type SOCK_STREAM in create_datagram_endpoint() (#114893)
Also improve exception message.

Co-authored-by: Donghee Na <donghee.na92@gmail.com>
2024-02-03 17:14:02 +00:00
Kristján Valur Jónsson 6b53d5fe04
gh-112202: Ensure that condition.notify() succeeds even when racing with Task.cancel() (#112201)
Also did a general cleanup of asyncio locks.py comments and docstrings.
2024-02-03 08:19:37 -08:00
Serhiy Storchaka 96bce033c4
gh-114959: tarfile: do not ignore errors when extract a directory on top of a file (GH-114960)
Also, add tests common to tarfile and zipfile.
2024-02-03 16:18:46 +00:00
AN Long b4240fd68e
gh-114955: Add clear to MutableSequence's mixin methods in document (gh-114956) 2024-02-03 09:33:58 -06:00
Jason Zhang efc489021c
gh-111417: Remove unused code block in math.trunc() and round() (GH-111454)
_PyObject_LookupSpecial() now ensures that the type is ready.
2024-02-03 17:11:10 +02:00
Mariusz Felisiak 28bb2961ba
Update LOGGING example taken from Django docs. (#114903)
For example, Django no longer provides a custom NullHandler

6c66a41c3d

* Remove require_debug_true.
2024-02-03 09:37:21 +02:00
Skip Montanaro 00d7109075
Normalize heading underline in multiprocessing.rst (#114923)
This gets rid of the mildly confusing `>>>>>>>' underlines which look vaguely like `diff` punctuation.
2024-02-02 17:56:00 -08:00
Kirill Podoprigora f3cdd64de8
`Tools/cases_generator`: Fix typos and incorrect comments. (#114892) 2024-02-02 17:52:58 -08:00
Malcolm Smith f35c7c070c
gh-114875: Require getgrent for building the grp extension module (#114876)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-02-03 00:30:52 +01:00
Terry Jan Reedy 1183f1e6bf
gh-114913: Add newline to subprocess doc (#114941)
*creationflags* is a separate topic from *startupinfo*.
Start sentence with 'If given', like previous sentence.
2024-02-02 23:14:32 +00:00
Jokimax c4a2e8a2c5
gh-101599: argparse: simplify the option help string (GH-103372)
If the option with argument has short and long names,
output argument only once, after the long name:

   -o, --option ARG    description

instead of

   -o ARG, --option ARG    description
2024-02-02 22:13:00 +00:00
John Belmonte 73d20cafb5
Correct timedelta description (GH-101417)
It only represents the difference between two datetime or
date objects, not between two time objects.
2024-02-02 23:42:17 +02:00
Serhiy Storchaka b27812d632
Fix indentation of "versionchanged" in datetime.rst (GH-114933) 2024-02-02 23:09:16 +02:00
Alex Waygood 920b89f627
Bump ruff to 0.2.0 (#114932) 2024-02-02 21:04:15 +00:00
GILGAMESH 7e2703bbff
Update venv activate.bat to escape custom PROMPT variables on Windows (GH-114885) 2024-02-02 18:59:53 +00:00
Serhiy Storchaka c12240ed28
gh-114728: Fix documentation for comparison of objects in datetime module (GH-114749) 2024-02-02 20:53:24 +02:00
patenaud 9872855a31
GH-69695: Update `PyImport_ImportModule` description (GH-103836)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-02-02 17:31:55 +01:00
Steven Ward ee66c33349
gh-114909: Add --first-weekday option to usage message (#114910) 2024-02-02 17:13:00 +02:00
Andrew Rogers b3f0b698da
gh-104530: Enable native Win32 condition variables by default (GH-104531) 2024-02-02 13:50:51 +00:00
Justin Williams d29f57f603
gh-103360: Add link in stdtypes.rst to escape sequences in lexical_analysis.rst (GH-103638) 2024-02-02 15:32:46 +02:00
Sam Gross d0f1307580
gh-114329: Add PyList_GetItemRef function (GH-114504)
The new `PyList_GetItemRef` is similar to `PyList_GetItem`, but returns
a strong reference instead of a borrowed reference. Additionally, if the
passed "list" object is not a list, the function sets a `TypeError`
instead of calling `PyErr_BadInternalCall()`.
2024-02-02 14:03:15 +01:00
Mark Shannon 0e71a295e9
GH-113710: Add a "globals to constants" pass (GH-114592)
Converts specializations of `LOAD_GLOBAL` into constants during tier 2 optimization.
2024-02-02 12:14:34 +00:00
Irit Katriel 2091fb2a85
gh-107901: make compiler inline basic blocks with no line number and no fallthrough (#114750) 2024-02-02 11:26:31 +00:00
Mark Shannon 41fde89e47
GH-113655 Lower C recursion limit from 4000 to 3000 on Windows. (GH-114896) 2024-02-02 10:41:28 +00:00
Christopher Chavez d25d4ee60c
gh-103820: IDLE: Do not interpret buttons 4/5 as scrolling on non-X11 (GH-103821)
Also fix test_mousewheel: do not skip a check which was broken due to incorrect
delta on Aqua and XQuartz, and probably not because of `.update_idletasks()`.
2024-02-02 10:38:43 +00:00
Michal Kaptur 53339a0ef7
Move "format" param doc of shutil.make_archive() on its own paragraph (GH-103829) 2024-02-02 10:00:18 +00:00
Nikita Sobolev 1aec064444
GH-114849: Set a 60-minute timeout for JIT CI jobs (GH-114850) 2024-02-01 17:44:01 -08:00
Zachary Ware 618d7256e7
gh-111239: Update Windows build to use zlib 1.3.1 (GH-114877) 2024-02-01 17:54:02 -06:00
Donghee Na 13907968d7
gh-111968: Use per-thread freelists for dict in free-threading (gh-114323) 2024-02-01 20:53:53 +00:00
Sam Gross 587d480203
gh-112529: Remove PyGC_Head from object pre-header in free-threaded build (#114564)
* gh-112529: Remove PyGC_Head from object pre-header in free-threaded build

This avoids allocating space for PyGC_Head in the free-threaded build.
The GC implementation for free-threaded CPython does not use the
PyGC_Head structure.

 * The trashcan mechanism uses the `ob_tid` field instead of `_gc_prev`
   in the free-threaded build.
 * The GDB libpython.py file now determines the offset of the managed
   dict field based on whether the running process is a free-threaded
   build. Those are identified by the `ob_ref_local` field in PyObject.
 * Fixes `_PySys_GetSizeOf()` which incorrectly incorrectly included the
   size of `PyGC_Head` in the size of static `PyTypeObject`.
2024-02-01 12:29:19 -08:00
Oleg Iarygin 500ede0117
gh-89891: Refer SharedMemory implementation as POSIX (GH-104678)
It only uses POSIX API.
2024-02-01 19:57:36 +00:00
Mark Shannon e66d0399cc
GH-114806. Don't specialize calls to classes with metaclasses. (GH-114870) 2024-02-01 19:39:32 +00:00
He Weidong 97cc58f977
Fix comment in pycore_runtime.h (GH-110540) 2024-02-01 19:27:53 +00:00
Nikita Sobolev dc01b919c7
gh-101100: Fix sphinx warnings in howto/logging.rst (#114846)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-01 20:37:55 +02:00
Skip Montanaro c9c6e04380
Correct description of inheriting from another class (#114660)
"inherits <someclass>" grates to this reader. I think it should be "inherits from <someclass>".
2024-02-01 10:07:16 -08:00
Nicholas Hollander e9dab65638
gh-105031: Clarify datetime documentation for ISO8601 (GH-105049) 2024-02-01 17:24:15 +00:00
Kirill Podoprigora 6d7ad57385
Update outdated info in `Tools/cases_generator/README.md` (#114844) 2024-02-01 08:56:24 -08:00
Guido van Rossum 2dea1cf7fd
Write about Tier 2 and JIT in "what's new 3.13" (#114826)
(This will soon be superseded by Ken Jin's much more detailed version.)
2024-02-01 08:54:44 -08:00
Anders Kaseorg 84e0e32184
Remove unused Py_XDECREF from _PyFrame_ClearExceptCode (GH-106158)
frame->frame_obj was set to NULL a few lines earlier.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2024-02-01 18:26:22 +02:00
Ayappan Perumal 4dbb198d27
gh-105089: Fix test_create_directory_with_write test failure in AIX (GH-105228) 2024-02-01 11:52:54 +00:00
Tomas R 0bf42dae7e
gh-107461 ctypes: Add a testcase for nested _as_parameter_ lookup (GH-107462) 2024-02-01 13:49:01 +02:00
dependabot[bot] 59ae215387
build(deps-dev): bump types-psutil from 5.9.5.17 to 5.9.5.20240106 in /Tools (#114852)
build(deps-dev): bump types-psutil in /Tools

Bumps [types-psutil](https://github.com/python/typeshed) from 5.9.5.17 to 5.9.5.20240106.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-psutil
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 10:50:08 +00:00
dependabot[bot] d4c5ec24c2
build(deps): bump actions/cache from 3 to 4 (#114856)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 12:49:07 +02:00
dependabot[bot] 93bfaa858c
build(deps): bump hypothesis from 6.92.2 to 6.97.4 in /Tools (#114851)
Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.92.2 to 6.97.4.
- [Release notes](https://github.com/HypothesisWorks/hypothesis/releases)
- [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.92.2...hypothesis-python-6.97.4)

---
updated-dependencies:
- dependency-name: hypothesis
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 10:42:35 +00:00
dependabot[bot] 21c01a009f
build(deps-dev): bump types-setuptools from 69.0.0.0 to 69.0.0.20240125 in /Tools (#114853)
build(deps-dev): bump types-setuptools in /Tools

Bumps [types-setuptools](https://github.com/python/typeshed) from 69.0.0.0 to 69.0.0.20240125.
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-setuptools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 09:52:05 +00:00
Christophe Nanteuil de6f97cd35
Fix typos in ElementTree documentation (GH-108848)
PI objects instead of comment objects.
2024-02-01 11:34:04 +02:00
Sam Gross e6d6d5dcc0
gh-114746: Avoid quadratic behavior in free-threaded GC (GH-114817)
The free-threaded build's GC implementation is non-generational, but was
scheduled as if it were collecting a young generation leading to
quadratic behavior. This increases the minimum threshold and scales it
to the number of live objects as we do for the old generation in the
default build.

Note that the scheduling is still not thread-safe without the GIL. Those
changes will come in later PRs.

A few tests, like "test_sneaky_frame_object" rely on prompt scheduling
of the GC. For now, to keep that test passing, we disable the scaled
threshold after calls like `gc.set_threshold(1, 0, 0)`.
2024-02-01 10:26:23 +01:00
technillogue 5ce193e65a
gh-114364: Fix awkward wording about mmap.mmap.seekable (#114374)
---------
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-02-01 06:03:58 +00:00
srinivasan 57c3e775df
gh-114648: Add IndexError exception to tutorial datastructures list.pop entry (#114681)
Remove redundant explanation of optional argument.
2024-01-31 22:46:49 -05:00
Skip Montanaro 586057e9f8
gh-67230: Add versionadded notes for QUOTE_NOTNULL and QUOTE_STRINGS (#114816)
As @GPHemsley pointed out, #29469 omitted `versionadded` notes for the 2 new items.
2024-01-31 22:11:16 -05:00