Alex Waygood
3fd2ad8241
ftplib docs: `timeout` doesn't have to be a whole number ( #115443 )
2024-02-14 10:41:17 +00:00
Hugo van Kemenade
46245b0d83
Docs: Use substitutions instead of manual version updates ( #115416 )
2024-02-13 23:55:00 -07:00
Christophe Papazian
de07941729
gh-115405: add versionadded tag for co_qualname in code objects documentation ( #115411 )
2024-02-13 16:10:00 +00:00
qqwqqw689
5719aa23ab
gh-113437: Update documentation about PyUnicode_AsWideChar() function (GH-113455)
2024-02-13 15:23:10 +01:00
Hugo van Kemenade
0a6e1a4119
Update "Using Python on a Mac" ( #115024 )
2024-02-13 08:31:49 +02:00
Steve Dower
10756b10ff
gh-111140: Minor doc fixes for PyLong_AsNativeBytes (GH-115375)
2024-02-12 22:28:36 +00:00
Hugo van Kemenade
341d7874f0
gh-115317: Rewrite changelog filter to use vanilla JavaScript ( #115324 )
...
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2024-02-12 22:17:33 +00:00
Steve Dower
7861dfd26a
gh-111140: Adds PyLong_AsNativeBytes and PyLong_FromNative[Unsigned]Bytes functions (GH-114886)
2024-02-12 20:13:13 +00:00
Petr Viktorin
879f4546bf
gh-110850: Add PyTime_t C API (GH-115215)
...
* gh-110850: Add PyTime_t C API
Add PyTime_t API:
* PyTime_t type.
* PyTime_MIN and PyTime_MAX constants.
* PyTime_AsSecondsDouble(), PyTime_Monotonic(),
PyTime_PerfCounter() and PyTime_GetSystemClock() functions.
Co-authored-by: Victor Stinner <vstinner@python.org>
2024-02-12 18:13:10 +01:00
Serhiy Storchaka
91822018ee
gh-115233: Fix an example in the Logging Cookbook (GH-115325)
...
Also add more tests for LoggerAdapter.
Also support stacklevel in LoggerAdapter._log().
2024-02-12 18:24:45 +02:00
Hugo van Kemenade
92483b21b3
gh-101100: Fix Sphinx warnings in `whatsnew/2.7.rst` and related ( #115319 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-12 14:40:41 +02:00
Nikita Sobolev
705c76d4a2
gh-114785: Remove content from `Porting from Python2` how-to ( #114805 )
...
Keep the page though, because people might still rely on it (the traffic shows that they do).
Instead of our own manual we now give links to the 3rd-party ones.
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-12 14:59:58 +03:00
Brandt Bucher
235cacff81
GH-114695: Add `sys._clear_internal_caches` (GH-115152)
2024-02-12 09:04:36 +00:00
Skip Montanaro
e1552fd19d
gh-101100: Clean up Doc/c-api/exceptions.rst and Doc/c-api/sys.rst (GH-114825)
2024-02-11 18:51:07 +00:00
Serhiy Storchaka
b104360788
gh-49766: Make date-datetime comparison more symmetric and flexible (GH-114760)
...
Now the special comparison methods like `__eq__` and `__lt__` return
NotImplemented if one of comparands is date and other is datetime
instead of ignoring the time part and the time zone or forcefully
return "not equal" or raise TypeError.
It makes comparison of date and datetime subclasses more symmetric
and allows to change the default behavior by overriding
the special comparison methods in subclasses.
It is now the same as if date and datetime was independent classes.
2024-02-11 13:06:43 +02:00
Serhiy Storchaka
d2c4baa41f
gh-97928: Partially restore the behavior of tkinter.Text.count() by default (GH-115031)
...
By default, it preserves an inconsistent behavior of older Python
versions: packs the count into a 1-tuple if only one or none
options are specified (including 'update'), returns None instead of 0.
Except that setting wantobjects to 0 no longer affects the result.
Add a new parameter return_ints: specifying return_ints=True makes
Text.count() always returning the single count as an integer
instead of a 1-tuple or None.
2024-02-11 12:43:14 +02:00
Serhiy Storchaka
573acb30f2
gh-115172: Fix explicit index extries for the C API (GH-115173)
2024-02-11 12:23:30 +02:00
Skip Montanaro
1b89591474
gh-101100: Fix dangling refs in bdb.rst ( #114983 )
...
Co-authored-by: AN Long <aisk@users.noreply.github.com>
2024-02-11 11:21:10 +02:00
Nikita Sobolev
4821f08674
gh-101100: Fix sphinx warnings in `c-api/gcsupport.rst` ( #114786 )
2024-02-10 15:59:23 -07:00
Mike Zimin
9d1a353230
gh-114894: add array.array.clear() method ( #114919 )
...
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-02-10 07:59:46 -08:00
Nikita Sobolev
e19103a346
gh-114552: Update `__dir__` method docs: it allows returning an iterable ( #114662 )
2024-02-10 08:34:23 +00:00
Laurie O
b2d9d134dc
gh-96471: Add shutdown() method to queue.Queue ( #104750 )
...
Co-authored-by: Duprat <yduprat@gmail.com>
2024-02-09 20:58:30 -08:00
Erlend E. Aasland
769d444826
Docs: correctly link to code objects ( #115214 )
2024-02-09 15:11:36 +01:00
Brett Cannon
c968dc7ff3
GH-113632: update configure.ac for WebAssembly support tiers ( #115192 )
...
Move WASI to tier 2 and drop Emscripten.
2024-02-09 09:21:49 +01:00
Nikita Sobolev
553c90ccc2
gh-101100: Fix sphinx warnings in `library/enum.rst` ( #114696 )
...
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2024-02-08 23:40:28 -07:00
Shantanu
17689e3c41
gh-107944: Improve error message for getargs with bad keyword arguments ( #114792 )
2024-02-08 01:04:41 -08:00
Mark Shannon
8a3c499ffe
GH-108362: Revert "GH-108362: Incremental GC implementation (GH-108038)" ( #115132 )
...
Revert "GH-108362: Incremental GC implementation (GH-108038)"
This reverts commit 36518e69d7
.
2024-02-07 12:38:34 +00:00
Skip Montanaro
d0322fdf2c
gh-101100: Fix Py_DEBUG dangling Sphinx references ( #115003 )
2024-02-07 10:48:42 +00:00
Edgar Ramírez Mondragón
60375a3809
gh-115114: Add missing slash to file URI prefix `file:/` ( #115115 )
...
Add missing slash to file URI prefix `file:/`
2024-02-07 05:22:47 +00:00
Finite State Machine
3f71c416c0
gh-115106 docs: 'enum.Flag.__iter__()' did not exist prior to Python 3.11 (GH-115107)
...
change versionchanged to versionadded
2024-02-06 17:28:01 -08:00
Sam Gross
de61d4bd4d
gh-112066: Add `PyDict_SetDefaultRef` function. ( #112123 )
...
The `PyDict_SetDefaultRef` function is similar to `PyDict_SetDefault`,
but returns a strong reference through the optional `**result` pointer
instead of a borrowed reference.
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-02-06 11:36:23 -05:00
da-woods
0e2ab73dc3
gh-114756: Update FAQ section on removing the GIL ( #114957 )
...
Update FAQ section on removing the GIL to reflect recent progress on PEP 703 and PEP 684.
Co-authored-by: AN Long <aisk@users.noreply.github.com>
2024-02-06 10:55:44 -05:00
Mariusz Felisiak
1a10437a14
gh-91602: Add iterdump() support for filtering database objects ( #114501 )
...
Add optional 'filter' parameter to iterdump() that allows a "LIKE"
pattern for filtering database objects to dump.
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-02-06 12:34:56 +01:00
Serhiy Storchaka
bb57ffdb38
gh-83648: Support deprecation of options, arguments and subcommands in argparse (GH-114086)
2024-02-06 00:41:34 +02:00
Serhiy Storchaka
652fbf88c4
gh-82626: Emit a warning when bool is used as a file descriptor (GH-111275)
2024-02-05 22:51:11 +02:00
HarryLHW
750489cc77
gh-114967: Fix "Built-in Exceptions" documentation ambiguous wording ( #114968 )
...
Change the somewhat vague "listed below" to "listed in this chapter" in Doc/library/exceptions.rst.
The exceptions are listed in multiple sections after two intermediate sections.
---------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-02-05 15:22:57 -05:00
Mark Shannon
36518e69d7
GH-108362: Incremental GC implementation (GH-108038)
2024-02-05 18:28:51 +00:00
Serhiy Storchaka
b4ba0f73d6
gh-43457: Tkinter: fix design flaws in wm_attributes() (GH-111404)
...
* When called with a single argument to get a value, it allow to omit
the minus prefix.
* It can be called with keyword arguments to set attributes.
* w.wm_attributes(return_python_dict=True) returns a dict instead of
a tuple (it will be the default in future).
* Setting wantobjects to 0 no longer affects the result.
2024-02-05 18:24:54 +02:00
Terry Jan Reedy
39ec7fbba8
Remove bogus syntax error marker in csv doc ( #115017 )
2024-02-05 04:11:31 +00:00
Dai Wentao
da8f9fb2ea
gh-113803: Fix inaccurate documentation for shutil.move when dst is an existing directory ( #113837 )
...
* fix the usage of dst and destination in shutil.move doc
* update shutil.move doc
2024-02-04 13:42:58 -05:00
Serhiy Storchaka
ca715e56a1
gh-69893: Add the close() method for xml.etree.ElementTree.iterparse() iterator (GH-114534)
2024-02-04 17:25:21 +02:00
Ethan Furman
ff7588b729
gh-114071: [Enum] update docs and code for tuples/subclasses (GH-114871)
...
Update documentation with `__new__` and `__init__` entries.
Support use of `auto()` in tuple subclasses on member assignment lines. Previously, auto() was only supported on the member definition line either solo or as part of a tuple:
RED = auto()
BLUE = auto(), 'azul'
However, since Python itself supports using tuple subclasses where tuples are expected, e.g.:
from collections import namedtuple
T = namedtuple('T', 'first second third')
def test(one, two, three):
print(one, two, three)
test(*T(4, 5, 6))
# 4 5 6
it made sense to also support tuple subclasses in enum definitions.
2024-02-04 07:22:55 -08:00
Skip Montanaro
ec69e1d0dd
gh-101100: Fix dangling references in pickle.rst ( #114972 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-04 14:24:24 +00:00
Hugo van Kemenade
848c86786b
gh-101100: Fix Sphinx warnings from PEP 3108 stdlib re-organisation ( #114327 )
...
* Fix Sphinx warnings from PEP 3108 stdblib re-organisation
* Apply suggestions from code review
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Update Doc/whatsnew/2.2.rst
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Apply suggestions from code review
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
---------
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-04 09:45:35 +00:00
Nikita Sobolev
72d2d0f10d
gh-114803: Mention that `@dataclass` should not be applied on enums (GH-114891)
...
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2024-02-03 13:55:38 -08:00
Skip Montanaro
ab76d37948
gh-101100: Fix Sphinx reference warnings in the glossary ( #114729 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-03 18:45:49 +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
AN Long
b4240fd68e
gh-114955: Add clear to MutableSequence's mixin methods in document (gh-114956)
2024-02-03 09:33:58 -06: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
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
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
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
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
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
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
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
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
Christophe Nanteuil
de6f97cd35
Fix typos in ElementTree documentation (GH-108848)
...
PI objects instead of comment objects.
2024-02-01 11:34:04 +02: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
Pradyot Ranjan
ff8939e5ab
gh-114811: Change '\*' to '*' in warnings.rst ( #114819 )
...
Regression in 3.12.
2024-01-31 20:48:39 -05:00
Aidan Holm
a79a27242f
gh-111112: Avoid potential confusion in TCP server example. ( #111113 )
...
Improve misleading TCP server docs and example.
socket.recv(), as documented by the Python reference documentation,
returns at most `bufsize` bytes, and the underlying TCP protocol means
there is no guaranteed correspondence between what is sent by the client
and what is received by the server.
This conflation could mislead readers into thinking that TCP is
datagram-based or has similar semantics, which will likely appear to
work for simple cases, but introduce difficult to reproduce bugs.
2024-01-31 16:42:38 -08:00
Bradley Reynolds
1836f674c0
Add note to `sys.orig_argv` clarifying the difference from `sys.argv` ( #114630 )
...
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-01-31 13:33:28 -08:00
Skip Montanaro
7a93db4425
gh-101100: Fix class reference in library/test.rst (GH-114769)
...
The text clearly seems to be referencing `TestFuncAcceptsSequencesMixin`,
for which no target is available. Name the class properly and suppress
the dangling reference.
2024-01-31 11:33:10 +02:00
Erlend E. Aasland
c8cf5d7d14
Docs: mark up dbm.gnu.open() and dbm.ndbm.open() using param list ( #114762 )
2024-01-31 07:59:34 +01:00
Skip Montanaro
3911b42cc0
gh-101100: Fix references in csv docs (GH-114658)
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-30 21:54:37 +00:00
Barney Gale
fda7445ca5
GH-70303: Make `pathlib.Path.glob('**')` return both files and directories ( #114684 )
...
Return files and directories from `pathlib.Path.glob()` if the pattern ends
with `**`. This is more compatible with `PurePath.full_match()` and with
other glob implementations such as bash and `glob.glob()`. Users can add a
trailing slash to match only directories.
In my previous patch I added a `FutureWarning` with the intention of fixing
this in Python 3.15. Upon further reflection I think this was an
unnecessarily cautious remedy to a clear bug.
2024-01-30 19:52:53 +00:00
Terry Jan Reedy
a1332a99cf
Clarify one-item tuple ( #114745 )
...
A 'single tuple' means 'one typle, of whatever length.
Remove the unneeded and slight distracting parenthetical 'singleton' comment.
2024-01-30 18:40:54 +00:00
Pablo Galindo Salgado
39d102c2ee
gh-113744: Add a new IncompleteInputError exception to improve incomplete input detection in the codeop module ( #113745 )
...
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
2024-01-30 16:21:30 +00:00
Hugo van Kemenade
4287e8608b
gh-109975: Copyedit "What's New in Python 3.13" ( #114401 )
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-30 17:12:11 +02:00
Serhiy Storchaka
ea30a28c3e
gh-113732: Fix support of QUOTE_NOTNULL and QUOTE_STRINGS in csv.reader (GH-113738)
2024-01-30 14:21:12 +02:00
Hugo van Kemenade
3996cbdd33
Set `hosted_on` for Read the Docs builds ( #114697 )
2024-01-29 14:24:21 -07:00
Steven Ward
2c089b09ac
gh-112240: Add option to calendar module CLI to specify the weekday to start each week (GH-112241)
2024-01-29 16:58:21 +00:00
Serhiy Storchaka
39c766b579
Fix more references to datetime and time classes (GH-114717)
...
They could be confused with references to datetime and time modules.
2024-01-29 18:20:13 +02:00
Soumendra Ganguly
e351ca3c20
gh-85984: Add POSIX pseudo-terminal functions. (GH-102413)
...
Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-01-29 16:10:28 +00:00
Skip Montanaro
e8b8f5e9c2
gh-101100: Fix datetime reference warnings (GH-114661)
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-29 16:43:44 +02:00
Hugo van Kemenade
b7a12ab214
gh-101100: Fix Sphinx warnings in `whatsnew/2.2.rst` ( #112366 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-29 13:12:19 +00:00
Nikita Sobolev
97fb2480e4
gh-101100: Fix sphinx warnings in `Doc/c-api/memoryview.rst` (GH-114669)
2024-01-29 11:56:11 +02:00
Shantanu
3b86891fd6
gh-110893: Improve the documentation for __future__ module ( #114642 )
...
nedbat took issue with the phrasing "real module". I'm actually fine
with that phrasing, but I do think the `__future__` page should be clear
about the way in which the `__future__` module is special. (Yes, there
was a footnote linking to the future statements part of the reference,
but there should be upfront discussion).
I'm sympathetic to nedbat's claim that no one really cares about
`__future__._Feature`, so I've moved the interesting table up to the
top.
2024-01-29 01:37:28 -08:00
Stanley
d7d0d13cd3
gh-89159: Add some TarFile attribute types (GH-114520)
...
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2024-01-29 09:19:22 +00:00
Hugo van Kemenade
3bb6912d88
gh-100734: Add 'Notable change in 3.11.x' to `whatsnew/3.11.rst` ( #114657 )
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-28 20:28:25 +00:00
Bhushan Mohanraj
d00fbed68f
Fix indentation in `__post_init__` documentation. (gh-114666)
2024-01-28 15:10:32 -05:00
Skip Montanaro
5ecfd750b4
Correction Skip Montanaro's email address ( #114677 )
2024-01-28 14:51:25 +00:00
Nikita Sobolev
a384b20c0c
gh-101100: Fix sphinx warnings in `reference/import.rst` ( #114646 )
2024-01-27 07:30:21 -07:00
Hugo van Kemenade
b6623d61d4
gh-101100: Fix Sphinx warnings in `whatsnew/3.11.rst` and related ( #114531 )
2024-01-27 06:06:59 -07:00
Nikita Sobolev
6a8944acb6
gh-101100: Fix sphinx warnings in `library/email.mime.rst` (GH-114635)
2024-01-27 10:45:40 +02:00
Nikita Sobolev
23fb9f0777
Fix `c-api/file.rst` indexes (GH-114608)
2024-01-27 10:45:07 +02:00
Sergey B Kirpichev
926881dc10
gh-113445: Amend PyObject_RichCompareBool() docs (GH-113891)
2024-01-27 09:55:33 +02:00
Barney Gale
7e31d6dea2
gh-88569: add `ntpath.isreserved()` ( #95486 )
...
Add `ntpath.isreserved()`, which identifies reserved pathnames such as "NUL", "AUX" and "CON".
Deprecate `pathlib.PurePath.is_reserved()`.
---------
Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2024-01-26 18:14:24 +00:00
Erlend E. Aasland
6c2b419fb9
Docs: rework the dbm.dumb introduction ( #114550 )
...
- consistently use correct parameter markup
- consistently use submodule name as database name
- improve accuracy of the dbm.dumb.open() spec
- remove dumbdbm class refs and replace them with generic "database object"
- use parameter list for dbm.dumb.open()
2024-01-26 19:12:48 +01:00
Sergey B Kirpichev
3f62bf32ca
Document PyOS_strtoul and PyOS_strtol (GH-114048)
2024-01-26 19:44:45 +02:00
Erlend E. Aasland
0bd8297a22
Docs: mark up dbm.open() with param list ( #114601 )
...
Also consolidate following paragraphs regarding database objects.
2024-01-26 16:11:45 +01:00
Ned Batchelder
30b7b4f73c
Docs: 'still' is a better word than 'nonetheless' ( #114598 )
2024-01-26 13:42:49 +00:00
Erlend E. Aasland
8710faeac2
Docs: fix versionchanged directives for dbm.open() and dbm.whichdb() ( #114594 )
2024-01-26 12:36:37 +00:00
Erlend E. Aasland
4cf068ed08
Docs: reword dbm.ndbm introduction ( #114549 )
...
- add abbreviation directives for NDBM and GDBM
- consistently spell NDBM as NDBM
- silence broken ndbm class refs
- improve accuracy of dbm.ndbm.open() spec
- use replacement text for NDBM/GDBM file format incompatibility note
2024-01-26 13:35:56 +01:00
Erlend E. Aasland
65cf5dce11
Docs: rework dbm introduction ( #114551 )
...
- add refs to other parts of the docs (dict, bytes, etc.)
- clarify whichdb() return value by using list markup
- silence refs to example or generic submodule methods (keys, get, etc.)
2024-01-26 11:15:34 +01:00
Erlend E. Aasland
06c5de36f2
Docs: reword dbm.gnu introduction ( #114548 )
...
Also...
- consistently spell GDBM as GDBM
- silence gdbm class refs
- improve accuracy of dbm.gdbm.open() spec
2024-01-26 11:05:08 +01:00
Nikita Sobolev
01d970c1b8
gh-101100: Fix sphinx warnings in `c-api/file.rst` ( #114546 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-26 02:55:22 -07:00
Barney Gale
b69548a0f5
GH-73435: Add `pathlib.PurePath.full_match()` ( #114350 )
...
In 49f90ba
we added support for the recursive wildcard `**` in
`pathlib.PurePath.match()`. This should allow arbitrary prefix and suffix
matching, like `p.match('foo/**')` or `p.match('**/foo')`, but there's a
problem: for relative patterns only, `match()` implicitly inserts a `**`
token on the left hand side, causing all patterns to match from the right.
As a result, it's impossible to match relative patterns from the left:
`PurePath('foo/bar').match('bar/**')` is true!
This commit reverts the changes to `match()`, and instead adds a new
`full_match()` method that:
- Allows empty patterns
- Supports the recursive wildcard `**`
- Matches the *entire* path when given a relative pattern
2024-01-26 01:12:46 +00:00
Nikita Sobolev
d96358ff9d
gh-114315: Make `threading.Lock` a real class, not a factory function ( #114479 )
...
`threading.Lock` is now the underlying class and is constructable rather than the old
factory function. This allows for type annotations to refer to it which had no non-ugly
way to be expressed prior to this.
---------
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-01-25 19:46:32 +00:00
Ned Batchelder
07ef63fb6a
Doc/library/sys.monitoring.rst: remove contradictory paragraph. (GH-113619)
2024-01-25 14:38:43 +00:00
plokmijnuhby
6888cccac0
gh-108731: Add description of __slots__ to MemberDescriptorType docs (GH-108745)
2024-01-24 21:58:34 +02:00
Mark Shannon
981d172f7f
GH-112354: `END_FOR` instruction to only pop one value. (GH-114247)
...
* Compiler emits END_FOR; POP_TOP instead of END_FOR. To support tier 2 side exits in loops.
2024-01-24 15:10:17 +00:00
Erlend E. Aasland
6fadd68da5
Docs: mark up the FTP_TLS() docs with param list ( #114510 )
...
Also turn sentence about prot_p() into a note.
2024-01-24 16:06:14 +01:00
Thomas Grainger
127a497852
gh-104360: remove reference to removed module-level wrap_socket (GH-104361)
...
* remove reference to removed module-level wrap_socket
* drive by typo fix
2024-01-24 15:24:00 +01:00
Hugo van Kemenade
51d9068ede
gh-101100: Fix Sphinx warnings in `c-api/structures.rst` ( #113564 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-01-24 15:40:09 +02:00
Nikita Sobolev
8744ecf589
gh-101100: Fix sphinx warnings in `concurrent.futures.rst` ( #114521 )
2024-01-24 15:30:50 +02:00
Nikita Sobolev
1e4f00ebd8
gh-101100: Fix sphinx warnings in `asyncio-task.rst` ( #114469 )
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-24 00:23:34 -07:00
Daniel Hollas
82cd8fee31
Fix a typo in the contextlib documentation ( #114507 )
2024-01-24 05:16:31 +01:00
Erlend E. Aasland
8c265408c5
Docs: use placeholders in dbm flag param docs ( #114482 )
...
Also correct the default flag param for dbm.dumb.open();
it's 'c', not 'r'.
2024-01-23 20:54:44 +01:00
Erlend E. Aasland
01105c7c4f
Docs: mark up FTP.connect() and FTP.login() with param lists ( #114395 )
...
Use rst substitutions to reduce raw text duplication.
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-23 13:57:23 +00:00
Erlend E. Aasland
5277d4c7db
Docs: mark up FTP.retrbinary and FTP.storbinary with param lists ( #114399 )
...
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2024-01-23 14:53:35 +01:00
Nikita Sobolev
7d21cae964
gh-101100: Fix sphinx warnings in `Doc/library/locale.rst` ( #114425 )
...
* gh-101100: Fix sphinx warnings in `Doc/library/locale.rst`
* Remove `/` from signatures
2024-01-23 13:05:27 +02:00
Barney Gale
b822b85ac1
GH-105900: Fix `pathlib.Path.symlink_to(target_is_directory=...)` docs ( #114035 )
...
Clarify that *target_is_directory* only matters if the target doesn't
exist.
2024-01-23 05:30:16 +00:00
Barney Gale
32c227470a
GH-82695: Clarify `pathlib.Path.mkdir()` documentation ( #114032 )
...
Remove a double negative in the documentation of `mkdir()`'s *exist_ok*
parameter.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-23 02:31:09 +00:00
Barney Gale
3a61d24062
GH-99334: Explain that `PurePath.is_relative_to()` is purely lexical. ( #114031 )
2024-01-23 01:06:44 +00:00
Ville Skyttä
9af9ac153a
gh-66944: Note that the `contextlib.closing` example is for illustrative purposes ( #112198 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-23 01:00:53 +00:00
Géry Ogam
647b6cc7f1
Docs: minor amendments to runpy.rst ( #18416 )
...
- Add missing single quote in inline code
- Align parameter formatting with style guide recommendations
- Fix punctuation around parenthesised sentence
2024-01-23 00:00:26 +00:00
Erlend E. Aasland
1d7bddd961
Docs: align usage of versionadded/versionchanged with recommended practice ( #114409 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2024-01-22 21:40:26 +00:00
Hugo van Kemenade
8ccd1ba461
gh-101100: Fix Sphinx warnings in `reference/expressions.rst` ( #114194 )
2024-01-22 18:21:14 +02:00
Serhiy Storchaka
1b719b39b9
gh-114321: Expose more constants in the fcntl module (GH-114322)
2024-01-22 18:09:22 +02:00
Kirill Podoprigora
6d30cbee01
Docs: Fix typo in code snippet (GH-114421)
2024-01-22 17:56:30 +02:00
Serhiy Storchaka
650f9e4c94
gh-114115: Update documentation of array.array (GH-114117)
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-22 08:42:50 +00:00
Gregory P. Smith
fd49e22670
gh-114328: tty cbreak mode should not alter ICRNL ( #114335 )
...
The terminal CR -> NL mapping setting should be inherited in cbreak mode as OSes do not specify altering it as part of their stty cbreak mode definition.
2024-01-21 15:25:52 -08:00
Erlend E. Aasland
336030161a
Docs: align sqlite3 docs with versionadded/versionchanged recommendations ( #114400 )
...
When a parameter is added to a function or method, use the 'versionchanged'
directive, not 'versionadded'.
2024-01-21 19:54:19 +00:00
Erlend E. Aasland
de17cf444a
Docs: link to sys.stdout in ftplib docs ( #114396 )
2024-01-21 17:41:21 +00:00
Nikita Sobolev
38768e4cdd
gh-114384: Align sys.set_asyncgen_hooks signature in docs to reflect implementation ( #114385 )
2024-01-21 13:49:49 +01:00
Erlend E. Aasland
96c15b1c8d
Docs: mark up FTP() constructor with param list ( #114359 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-21 12:27:33 +01:00
Nikita Sobolev
47133d8d86
gh-101100: Fix sphinx warnings in `Doc/c-api/memory.rst` ( #114373 )
2024-01-21 11:34:43 +02:00
Erlend E. Aasland
fbc28748ea
Docs: mark up the FTP debug levels as a list ( #114360 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-21 09:19:31 +00:00
cdzhan
b04c5005cc
Fix the confusing "User-defined methods" reference in the datamodel ( #114276 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-01-21 03:45:38 +00:00
Erlend E. Aasland
8f4f773647
Docs: Add missing line continuation to FTP_TLS class docs ( #114352 )
...
Regression introduced by b1ad5a5d4
.
2024-01-20 19:39:44 +00:00
Erlend E. Aasland
b1ad5a5d44
Docs: structure the ftplib reference ( #114317 )
...
Introduce the following headings and subheadings:
- Reference
* FTP objects
* FTP_TLS objects
* Module variables
2024-01-20 16:06:52 +01:00
Adam Turner
e6495159f6
GH-99380: Update to Sphinx 7 ( #99381 )
2024-01-20 11:20:51 +00:00
David H. Gutteridge
567a85e9c1
gh-114332: Fix the flags reference for ``re.compile()`` ( #114334 )
...
The GH-93000 change set inadvertently caused a sentence in re.compile()
documentation to refer to details that no longer followed. Correct this
with a link to the Flags sub-subsection.
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2024-01-20 11:17:41 +00:00
Barney Gale
6313cdde58
GH-79634: Accept path-like objects as pathlib glob patterns. ( #114017 )
...
Allow `os.PathLike` objects to be passed as patterns to `pathlib.Path.glob()` and `rglob()`. (It's already possible to use them in `PurePath.match()`)
While we're in the area:
- Allow empty glob patterns in `PathBase` (but not `Path`)
- Speed up globbing in `PathBase` by generating paths with trailing slashes only as a final step, rather than for every intermediate directory.
- Simplify and speed up handling of rare patterns involving both `**` and `..` segments.
2024-01-20 02:10:25 +00:00
Hugo van Kemenade
229ee5bea1
Retain shorter tables of contents for Sphinx 5.2.3+ ( #114318 )
...
Disable toc_object_entries, new in Sphinx 5.2.3
2024-01-19 18:52:42 +00:00
DerSchinken
68a7b78cd5
gh-112092: clarify unstable ABI recompilation requirements ( #112093 )
...
Use different versions in the examples for when extensions do and do not need to be recompiled to make the examples easier to understand.
2024-01-18 21:04:40 +01:00
Nikita Sobolev
9c93350f58
gh-108303: Move all doctest related files and tests to `Lib/test/test_doctest/` ( #112109 )
...
Co-authored-by: Brett Cannon <brett@python.org>
2024-01-18 16:58:11 +01:00
Miyashita Yosuke
ba683c22ec
gh-114231: Fix indentation in enum.rst ( #114232 )
2024-01-18 09:23:15 +00:00
Terry Jan Reedy
8cda72037b
gh-114211: Update EmailMessage doc about ordered keys ( #114224 )
...
Ordered keys are no longer unlike 'real dict's.
2024-01-18 02:25:22 +00:00
Steve Dower
f56d132deb
gh-112984 Update Windows build and installer for free-threaded builds (GH-113129)
2024-01-17 21:52:23 +00:00
Christophe Nanteuil
7573c44c32
Fix typo in tkinter.ttk.rst (GH-106157)
2024-01-17 18:23:25 +00:00
Sergey B Kirpichev
029ecee10d
gh-114070: fix token reference warnings in expressions.rst ( #114169 )
2024-01-17 18:39:50 +02:00
Karolina Surma
f49752552e
gh-111301: Advertise importlib methods removal in What's new in Python 3.12 (GH-111630)
2024-01-17 15:25:42 +01:00
Terry Jan Reedy
4a32275389
gh-72284: Revise lists in IDLE doc ( #114174 )
...
Tkinter is a fact, not necessarily a feature.
Reorganize editor key bindings in a logical order
and remove those that do not work, at least on Windows.
Improve shell bindings list.
2024-01-17 07:52:32 +00:00
Erlend E. Aasland
8d26db45df
gh-112043: Align concurrent.futures.Executor.map docs with implementation ( #114153 )
...
The first parameter is named 'fn', not 'func'.
2024-01-17 01:31:16 +00:00
Steffen Zeile
05008c27b7
gh-88531 Fix dataclass __post_init__/__init__ interplay documentation (gh-107404)
...
* Simplify __post_init__ example usage. It applies to all base classes, not just dataclasses.
2024-01-16 20:17:34 -05:00
Barney Gale
45e527dfb5
GH-110109: pathlib docs: bring `from_uri()` and `as_uri()` together. ( #110312 )
...
This is a very soft deprecation of `PurePath.as_uri()`. We instead document
it as a `Path` method, and add a couple of sentences mentioning that it's
also available in `PurePath`.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-16 22:51:57 +00:00
Kuan-Wei Chiu
1d6989f9b0
Fix typo in c_annotations.py comment ( #108773 )
...
"compatability" => "compatibility"
2024-01-16 23:36:01 +01:00
Erlend E. Aasland
6e84f3b56f
gh-94220: Align fnmatch docs with the implementation and amend markup ( #114152 )
...
- Align the argument spec for fnmatch functions with the actual
implementation.
- Update Sphinx markup to recent recommandations.
- Add link to 'iterable' glossary entry.
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-01-16 22:35:09 +00:00
Barney Gale
7092b3f131
GH-78988: Document `pathlib.Path.glob()` exception propagation. ( #114036 )
...
We propagate the `OSError` from the `is_dir()` call on the top-level
directory, and suppress all others.
2024-01-16 22:28:54 +00:00
solya0x
c86571e4c9
Update copyright years to 2024. (GH-113608)
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-01-16 21:54:05 +01:00
Erlend E. Aasland
b1db6278cf
Docs: Improve multiprocessing.SharedMemory reference ( #114093 )
...
Align the multiprocessing shared memory docs with Diatáxis's
recommendations for references.
- use a parameter list for the SharedMemory.__init__() argument spec
- use the imperative mode
- use versionadded, not versionchanged, for added parameters
- reflow touched lines according to SemBr
2024-01-16 16:43:13 +00:00
Terry Jan Reedy
31a2543c80
gh-114069: Revise Tutorial Methods paragraph ( #114127 )
...
Remove excess words in the first and third sentences.
2024-01-16 11:33:05 -05:00
Serhiy Storchaka
d2d8332f71
gh-113626: Add allow_code parameter in marshal functions (GH-113648)
...
Passing allow_code=False prevents serialization and de-serialization of
code objects which is incompatible between Python versions.
2024-01-16 18:05:15 +02:00
AN Long
a482bc67ee
gh-102468: Document `PyCFunction_New*` and `PyCMethod_New` (GH-112557)
...
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-01-16 16:17:03 +01:00
Erlend E. Aasland
af85274086
Docs: Align multiprocessing.shared_memory docs with Sphinx recommendations ( #114103 )
...
- add :class: and :mod: markups where needed
- fix incorrect escaping of a star in ShareableList arg spec
- mark up parameters with stars: *val*
- mark up list of built-in types using list markup
- remove unneeded parentheses from :meth: markups
2024-01-16 12:35:35 +00:00
Zackery Spytz
8fd287b18f
gh-78502: Add a trackfd parameter to mmap.mmap() (GH-25425)
...
If *trackfd* is False, the file descriptor specified by *fileno*
will not be duplicated.
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-16 08:51:46 +01:00
Sergey B Kirpichev
4f24b92aa0
gh-114070: correct the specification of ``digit`` in the float() docs ( #114080 )
2024-01-15 14:19:59 -08:00
Sergey B Kirpichev
0f2fa6150b
gh-109598: make PyComplex_RealAsDouble/ImagAsDouble use __complex__ (GH-109647)
...
`PyComplex_RealAsDouble()`/`PyComplex_ImagAsDouble` now try to convert
an object to a `complex` instance using its `__complex__()` method
before falling back to the ``__float__()`` method.
PyComplex_ImagAsDouble() also will not silently return 0.0 for
non-complex types anymore. Instead we try to call PyFloat_AsDouble()
and return 0.0 only if this call is successful.
2024-01-15 16:04:17 +01:00
Ronald Oussoren
2010d45327
gh-113666: Adding missing UF_ and SF_ flags to module 'stat' ( #113667 )
...
Add some constants to module 'stat' that are used on macOS.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-15 12:22:43 +01:00
Hugo van Kemenade
c2808431b3
gh-101100: Fix Sphinx warnings in `howto/urllib2.rst` and `library/http.client.rst` ( #114060 )
2024-01-14 20:38:53 +00:00
Barney Gale
e4ff131e01
GH-44626, GH-105476: Fix `ntpath.isabs()` handling of part-absolute paths ( #113829 )
...
On Windows, `os.path.isabs()` now returns `False` when given a path that
starts with exactly one (back)slash. This is more compatible with other
functions in `os.path`, and with Microsoft's own documentation.
Also adjust `pathlib.PureWindowsPath.is_absolute()` to call
`ntpath.isabs()`, which corrects its handling of partial UNC/device paths
like `//foo`.
Co-authored-by: Jon Foster <jon@jon-foster.co.uk>
2024-01-13 07:36:05 +00:00
Stanley
3aa4b839e4
gh-89159: Document missing TarInfo members ( #91564 )
2024-01-12 23:19:57 +00:00
InSync
a47353d587
datamodel: Fix a typo in ``object.__init_subclass__`` ( #111599 )
2024-01-12 22:59:24 +00:00
Pierre Equoy
e97da8677f
Link to the glossary for "magic methods" in ``MagicMock`` ( #111292 )
...
The MagicMock documentation mentions magic methods several times without
actually pointing to the term in the glossary. This can be helpful for
people to fully understand what those magic methods are.
2024-01-12 22:54:36 +00:00
Andrew Zipperer
32f3684b8f
Tutorial: Clarify 'nonzero exit status' in the appendix ( #112039 )
2024-01-12 22:42:51 +00:00
Alois Klink
dce30c9cbc
gh-95649: Document that asyncio contains uvloop code ( #107536 )
...
Some of the asyncio SSL changes in GH-31275 [1] were taken from
v0.16.0 of the uvloop project [2]. In order to comply with the MIT
license, we need to just need to document the copyright information.
[1]: https://github.com/python/cpython/pull/31275
[2]: https://github.com/MagicStack/uvloop/tree/v0.16.0
2024-01-12 22:21:13 +00:00
Gregory P. Smith
b44b9d9900
gh-113971: Make `zipfile.ZipInfo._compresslevel` public as `.compress_level` ( #113969 )
...
Make zipfile.ZipInfo.compress_level public.
A property is used to retain the behavior of the ._compresslevel.
People constructing zipfile.ZipInfo instances to pass into existing APIs to control per-file compression levels already treat this as public, there was never a reason for it not to be.
I used the more modern name compress_level instead of compresslevel as the keyword argument on other ZipFile APIs is called to be consistent with compress_type and a general long term preference of not runningwordstogether without a separator in names.
2024-01-12 20:15:05 +00:00
Ronald Oussoren
79970792fd
gh-113868: Add a number of MAP_* flags from macOS to module mmap ( #113869 )
...
The new flags were extracted from the macOS 14.2 SDK.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-12 16:56:18 +01:00
Ned Batchelder
e68806c712
Docs: Amend codeobject.co_lines docs; end number is exclusive ( #113970 )
...
The end number should be exclusive, not inclusive.
2024-01-12 16:04:14 +01:00
Raymond Hettinger
53d2e1f26c
Improve kde graph with better caption and number formatting (gh-113967)
2024-01-11 18:25:18 -06:00
Adam Turner
c9b8a22f34
GH-107678: Improve Unicode handling clarity in ``library/re.rst`` ( #107679 )
2024-01-11 23:56:10 +00:00
Zackery Spytz
b4d4aa9e8d
gh-81489: Use Unicode APIs for mmap tagname on Windows (GH-14133)
...
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-01-11 22:39:47 +00:00
Raymond Hettinger
2f126a70f3
Update KDE recipe to match the standard use of the h parameter (gh-#113958)
2024-01-11 16:21:21 -06:00
AN Long
ec23e90082
gh-112419: Document removal of sys.meta_path's 'find_module' fallback ( #112421 )
...
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-01-11 09:43:35 +00:00
Victor Stinner
1d75fa43a2
gh-77046: os.pipe() sets _O_NOINHERIT flag on fds ( #113817 )
...
On Windows, set _O_NOINHERIT flag on file descriptors
created by os.pipe() and io.WindowsConsoleIO.
Add test_pipe_spawnl() to test_os.
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2024-01-10 23:02:17 +01:00
Raymond Hettinger
901a971e16
gh-113625: Align object addresses in the Descriptor HowTo Guide ( #113894 )
2024-01-10 17:23:40 +01:00
Serhiy Storchaka
89cee94b31
gh-89850: Add default C implementations of persistent_id() and persistent_load() (GH-113579)
...
Previously the C implementation of pickle.Pickler and pickle.Unpickler
classes did not have such methods and they could only be used if
they were overloaded in subclasses or set as instance attributes.
Fixed calling super().persistent_id() and super().persistent_load() in
subclasses of the C implementation of pickle.Pickler and pickle.Unpickler
classes. It no longer causes an infinite recursion.
2024-01-10 15:30:37 +02:00
Serhiy Storchaka
a8629816c6
gh-113664: Improve style of Big O notation (GH-113695)
...
Use cursive to make it looking like mathematic formulas.
2024-01-10 15:01:18 +02:00
Stefano Rivera
3a9096c337
GH-113661: unittest runner: Don't exit 5 if tests were skipped ( #113856 )
...
The intention of exiting 5 was to detect issues where the test suite
wasn't discovered at all. If we skipped tests, it was correctly
discovered.
2024-01-09 19:50:01 +00:00
Raymond Hettinger
2fd2e74793
Simplify binomial approximation example with random.binomialvariate() (gh-113871)
2024-01-09 13:02:07 -06:00
Hugo van Kemenade
2e17cad2b8
gh-101100: Fix Sphinx warnings for 2.6 port-specific deprecations ( #113752 )
2024-01-09 10:18:15 +02:00
William Andrea
f3d5d4aa8f
Docs: Link tokens in the format string grammars ( #108184 )
...
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-01-09 02:47:59 +00:00
Ronald Oussoren
c6ca562138
gh-113791: Expose CLOCK_MONOTONIC_RAW_APPROX and CLOCK_UPTIME_RAW_APROX on macOS in the time module ( #113792 )
2024-01-08 20:44:00 +01:00
Raymond Hettinger
aef375f56e
Minor algebraic simplification for the totient() recipe (gh-113822)
2024-01-08 13:16:22 -06:00
Erlend E. Aasland
35fa13d48b
gh-113755: Fully adapt gcmodule.c to Argument Clinic ( #113756 )
...
Adapt the following functions to Argument Clinic:
- gc.set_threshold
- gc.get_referrers
- gc.get_referents
2024-01-08 18:32:34 +01:00
Sergey B Kirpichev
61dd77b04e
gh-113391: fix outdated PyObject_HasAttr docs ( #113420 )
...
After #53875 : PyObject_HasAttr is not an equivalent of hasattr.
PyObject_HasAttrWithError is; it already has the note.
2024-01-08 16:23:43 +01:00
Zackery Spytz
f19b93fce0
gh-73965: New environment variable PYTHON_HISTORY ( #13208 )
...
It can be used to set the location of a .python_history file
---------
Co-authored-by: Levi Sabah <0xl3vi@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-06 22:30:12 -08:00
AN Long
bbf214df23
gh-113537: support loads str in plistlib.loads ( #113582 )
...
Add support for loading XML plists from a string value instead of a only bytes value.
2024-01-06 10:26:59 +01:00
Serhiy Storchaka
d99d871225
gh-113360: Fix the documentation of module's attribute __test__ (GH-113393)
...
It can only be a dict since Python 2.4.
2024-01-06 00:23:16 +02:00
Hugo van Kemenade
eb53750757
gh-101100: Fix Sphinx warnings in `library/pyclbr.rst` ( #113739 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-01-05 19:15:07 +00:00
Hugo van Kemenade
e56c53334f
gh-101100: Fix Sphinx warnings for 2.6 deprecations and removals ( #113725 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-05 13:31:28 +00:00
Jamie Phan
1ae7ceba29
gh-113696: Docs: Annotate PyObject_CallOneArg and PyObject_CallNoArgs as returning a strong reference ( #113697 )
2024-01-04 15:05:31 +01:00
Alex Waygood
f1f8392432
Document the `co_lines` method on code objects ( #113682 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-03 19:29:24 +00:00
Hugo van Kemenade
fab7ad62ce
gh-101100: Fix Sphinx warnings for removed dead batteries ( #113669 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-01-03 13:04:26 +00:00
Rodrigo Girão Serrão
4de468cce1
`functools.partial` docs: Use the more common spelling for "referenceable" ( #113675 )
2024-01-03 12:50:44 +00:00
Ege Akman
ea978c645e
gh-113637: Let c_annotations.py to handle the spacing of Limited/Unstable API & Stable ABI translation strings ( #113638 )
2024-01-03 13:22:38 +02:00
John D. McDonald
8ff44f8554
gh-81094: Refer to PEP 318 in compound_statements.rst ( #113588 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-02 10:40:14 +02:00
Hugo van Kemenade
7595380347
gh-101100: Fix Sphinx warnings from removed `~!` references ( #113629 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-01-02 00:37:37 -07:00
AN Long
b4b2cc1012
gh-53502: add a new option aware_datetime in plistlib to loads or dumps aware datetime. ( #113363 )
...
* add options to loads and dumps aware datetime in plistlib
2024-01-01 19:51:24 +01:00
Ronald Oussoren
d0b0e3d2ef
gh-113536: Expose `os.waitid` on macOS ( #113542 )
...
* gh-113536: Expose `os.waitid` on macOS
This API has been available on macOS for a long time, but was
explicitly excluded due to unspecified problems with the API
in ancient versions of macOS.
* Document that the API is available on macOS starting in Python 3.13
2024-01-01 19:38:29 +01:00
Parth Doshi
9ce6c01e38
# gh-111700: Fix syntax highlighting for C code in the "What's New In Python 3.12" documentation ( #113609 )
...
Fix PEP 684 syntax highlighting in what's new Python 3.12
2024-01-01 10:08:05 +02:00
Irit Katriel
2849cbb53a
gh-101578: [doc] mention that PyErr_GetRaisedException returns NULL when the error indicator is not set ( #113369 )
2023-12-31 23:16:33 +00:00
Hugo van Kemenade
30a6d79fb8
gh-101100: Fix Sphinx warnings in `library/configparser.rst` ( #113598 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-31 10:57:33 -07:00
Delgan
471aa75241
Update ConfigParser docs defining valid section name ( #110506 )
2023-12-30 16:18:06 -07:00
Ronald Oussoren
f48a1bcb29
gh-89414: Document that SIGCLD is not available on macOS ( #113580 )
...
Document that SIGCLD is not available on macOS
2023-12-30 16:19:47 +01:00
Samet YASLAN
88cb972000
gh-112536: Add support for thread sanitizer (TSAN) (gh-112648)
2023-12-30 17:17:02 +09:00
John Hawkinson
db1c882239
Doc/library/os.rst: `os.waitid` absent on MacOS ( #104558 )
...
* Doc/library/os.rst: `os.waitid` absent on MacOS
Co-authored-by: AN Long <aisk@users.noreply.github.com>
2023-12-28 20:36:20 +01:00
Hugo van Kemenade
8e5d70f4b6
gh-101100: Fix Sphinx warnings in library/random.rst ( #112981 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-28 12:29:12 -07:00
Inada Naoki
bfee2f77e1
gh-73427: deprecate `_enablelegacywindowsfsencoding` ( #107729 )
2023-12-28 17:31:19 +09:00
Stanley
0651936ae2
gh-67641: Clarify documentation on bytes vs text with non-seeking tarfile stream (GH-31610)
2023-12-27 17:16:36 +00:00
Zackery Spytz
1ddd773293
gh-64020: Deprecate pydoc.ispackage() (GH-20908)
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-27 14:04:31 +00:00
Hugo van Kemenade
4acf825058
gh-101100: Fix Sphinx warnings in `library/cmd.rst` ( #113502 )
...
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-27 12:17:30 +02:00
Hugo van Kemenade
fb02b66960
gh-101100: Fix Sphinx warnings in `library/calendar.rst` ( #113500 )
2023-12-27 09:36:17 +00:00
Vaishnavi Maheshwari
00cdd416fc
gh-113350: Improve the wording of python logging docs to remove an ambiguity around use of the word "higher". (GH-113491)
...
Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
2023-12-27 07:51:45 +00:00
Hugo van Kemenade
2b53c767de
gh-101100: Fix Sphinx warnings in `library/bisect.rst` ( #113496 )
2023-12-26 14:12:15 -07:00
Hugo van Kemenade
4e67644d36
gh-101100: Fix Sphinx warnings in `howto/isolating-extensions.rst` ( #113493 )
2023-12-26 12:40:48 -07:00
Hugo van Kemenade
36adc79041
Docs: make htmllive: open browser when ready ( #113288 )
2023-12-26 05:02:13 -07:00
Serhiy Storchaka
e87cadc1ce
gh-66515: mailbox.MH now supports folders withou the ".mh_sequences" file (GH-804)
...
(for example Claws Mail IMAP-cache folders).
2023-12-26 11:15:14 +02:00
Raymond Hettinger
b5dc0f83ad
Misc minor improvements to the itertools recipes (gh-113477)
2023-12-25 16:26:04 -06:00
Zackery Spytz
3f5eb3e6c7
bpo-21360: mailbox.Maildir now ignores files with a leading dot (GH-11833)
...
The maildir format specification states that files with a leading dot
should be ignored.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-25 17:07:51 +02:00
denballakh
f7c5a7a0f9
fix bullet-list in `LOAD_SUPER_ATTR` documentation on `dis` page ( #113461 )
2023-12-24 12:28:39 -08:00
Serhiy Storchaka
1f06baeabd
gh-113191: Add support of os.fchmod() on Windows (GH-113192)
...
Also support a file descriptor in os.chmod().
2023-12-24 10:57:11 +00:00
Ronald Oussoren
593b4d81d2
gh-74573: document that ndbm can silently corrupt databases on macOS ( #113354 )
...
* gh-74573: document that ndbm can silently corrupt databases on macOS
The system ndbm implementation on macOS has an undocumented limitation
on the size of values and can silently corrupt database files when those
are exceeded.
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-12-23 13:33:34 +01:00
F-park
bdc8d667ab
gh-112925: Fix error in example of `datetime.time.fromisoformat` and add doctest marker (GH-112931)
2023-12-23 12:44:27 +02:00
Yan Yanchii
4a3d2419bb
gh-113212: Improve error message & document zero-arg super inside nested functions and generator expressions (GH-113307)
2023-12-22 17:12:08 +02:00
Raymond Hettinger
6a5b4736e5
gh-113313: Note that slice support is not required for all sequences. (gh-113377)
2023-12-21 15:54:59 -06:00
Jason R. Coombs
2d91409c69
gh-113174: Sync with importlib_metadata 7.0 ( #113175 )
...
* Sync with importlib_metadata 7.0.0
* Add blurb
* Update docs to reflect changes.
* Link datamodel docs for object.__getitem__
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Add what's new for removed __getattr__
* Link datamodel docs for object.__getitem__
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* Add exclamation point, as that seems to be used for other classes.
---------
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-21 15:04:05 -05:00
Jan Brasna
24f8ff28a3
Docs: OpenSSL wording ambiguity ( #113296 )
2023-12-21 00:50:25 -07:00
Kir
11ee912327
gh-113255: Clarify docs for `typing.reveal_type` ( #113286 )
...
Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2023-12-20 17:21:23 +00:00
Rodrigo Girão Serrão
5a7cc667f8
Fix typo in datamodel docs ( #113314 )
...
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-12-20 11:58:38 +00:00
David Greaves
22b8945d76
Fix typo in collections.abc docs example ( #113310 )
...
Calling the instance reference arg for the __next__ method, "next", seems misleading as it would normally just be "self"
2023-12-20 09:51:16 +00:00
Hugo van Kemenade
76bef3832b
gh-101100: Fix Sphinx warnings in `library/ast.rst` ( #113289 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-19 15:44:57 +00:00
ryan-duve
76d757b38b
gh-113234: tomllib docs: reorder conversion table & add remaining types (GH-113236)
2023-12-19 11:29:55 +01:00
Unique-Usman
d71fcdee0f
gh-113208: Mention namespace packages don't require __init__.py ( #113209 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-12-19 10:39:57 +02:00
dreamflow
59f0766ae5
gh-108113: [docs] mention PyCF_OPTIMIZED_AST in ast Compiler Flags ( #113241 )
2023-12-18 16:14:15 +00:00
Hugo van Kemenade
f428c4dafb
gh-101100: Fix Sphinx warnings in library/tarfile.rst ( #113237 )
...
Fix Sphinx warnings in library/tarfile.rst
2023-12-18 08:57:45 +02:00
Jakub Kulík
2b93f52242
gh-113117: Support posix_spawn in subprocess.Popen with close_fds=True ( #113118 )
...
Add support for `os.POSIX_SPAWN_CLOSEFROM` and
`posix_spawn_file_actions_addclosefrom_np` and have the `subprocess` module use
them when available. This means `posix_spawn` can now be used in the default
`close_fds=True` situation on many platforms.
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
2023-12-17 21:34:57 +00:00
Hugo van Kemenade
32d87a8899
Docs: Add label to grammar spec for linking from PEPs ( #113235 )
2023-12-17 12:23:14 -07:00
Taylor Packard
21d52995ea
gh-112890: `unittest` Test Discovery page updated "`unittest` dropped the namspace packages support" (GH-113195)
2023-12-17 13:14:21 +02:00