summaryrefslogtreecommitdiffstats
path: root/Doc
Commit message (Collapse)AuthorAgeFilesLines
* GH-101578: Normalize the current exception (GH-101607)Mark Shannon2023-02-082-1/+82
| | | | | | | | | | * Make sure that the current exception is always normalized. * Remove redundant type and traceback fields for the current exception. * Add new API functions: PyErr_GetRaisedException, PyErr_SetRaisedException * Add new API functions: PyException_GetArgs, PyException_SetArgs
* gh-47937: Note that Popen attributes are read-only (#93070)Stanley2023-02-081-11/+12
| | | | | | * Note that Popen attributes aren't meant to be set by users by rewording the text about the attributes. * Also update some universal_newlines references to mention the modern text parameter name while in the area. Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-101632: Add the new RETURN_CONST opcode (#101633)penguin_wwy2023-02-071-0/+7
|
* gh-97725: Fix documentation for the default file of ↵Oleg Iarygin2023-02-071-1/+1
| | | | `asyncio.Task.print_stack` (#101652)
* Fix nesting of 'Pending Removal in Python 3.14' (#101637)Oleg Iarygin2023-02-071-1/+1
|
* Doctest: Pin sphinxext-opengraph==0.7.5 to prevent importing NumPy (#101642)Hugo van Kemenade2023-02-071-1/+1
|
* gh-85747: Active voice & suggested edits, 'running/stopping loop' & ↵Brian Skinn2023-02-071-18/+24
| | | | | | 'callbacks' subsections of asyncio-eventloop.rst (#100270) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* GH-101616: Mention the Docs Discourse forum in the "reporting docs issues" ↵Mariatta Wijaya2023-02-061-0/+3
| | | | | (GH-101617) Fixes https://github.com/python/cpython/issues/101616
* bpo-33591: Add support for path like objects to `ctypes.CDLL` (#7032)mrh19972023-02-051-0/+16
| | | Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* gh-76961: Fix the PEP3118 format string for ctypes.Structure (#5561)Eric Wieser2023-02-051-0/+1
| | | | | | | | | | | | | | | | | | | | The summary of this diff is that it: * adds a `_ctypes_alloc_format_padding` function to append strings like `37x` to a format string to indicate 37 padding bytes * removes the branches that amount to "give up on producing a valid format string if the struct is packed" * combines the resulting adjacent `if (isStruct) {`s now that neither is `if (isStruct && !isPacked) {` * invokes `_ctypes_alloc_format_padding` to add padding between structure fields, and after the last structure field. The computation used for the total size is unchanged from ctypes already used. This patch does not affect any existing aligment computation; all it does is use subtraction to deduce the amount of paddnig introduced by the existing code. --- Without this fix, it would never include padding bytes - an assumption that was only valid in the case when `_pack_` was set - and this case was explicitly not implemented. This should allow conversion from ctypes structs to numpy structs Fixes https://github.com/numpy/numpy/issues/10528
* Revert "gh-89381: Fix invalid signatures of math/cmath.log (#101404)" (#101580)Mark Dickinson2023-02-052-5/+6
| | | This reverts commit 0ef92d979311ba82d4c41b22ef38e12e1b08b13d.
* gh-101221: Add options in the documentation of timeit command (#101222)busywhitespace2023-02-051-1/+1
|
* Add missing preposition in argparse docs (#101548)alnoki2023-02-051-1/+1
|
* GH-56426: Add cross-reference to the documentation for faulthandler, ↵Furkan Onder2023-02-043-2/+26
| | | | | traceback, and pdb. (#101157) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* Add missing `versionadded` directive for `PyCode_Addr2Location` (#101347)Max Bachmann2023-02-041-0/+2
|
* gh-84559: Remove the new multiprocessing warning, too disruptive. (#101551)Gregory P. Smith2023-02-033-22/+21
| | | | This reverts the core of #100618 while leaving relevant documentation improvements and minor refactorings in place.
* docs: replace PyPI description with link (#101506)François Magimel2023-02-031-2/+2
|
* gh-100920: Update documentation for `asyncio.StreamWriter.wait_closed` (#101514)Viet Than2023-02-031-2/+8
|
* gh-100925: Move array methods under class in array doc (#101485)C.A.M. Gerlach2023-02-031-90/+89
| | | | | * Move array methods under class in array doc * Fix a few internal references related to the touched lines
* GH-84559: Deprecate fork being the multiprocessing default. (#100618)Gregory P. Smith2023-02-023-43/+83
| | | | | | | | This starts the process. Users who don't specify their own start method and use the default on platforms where it is 'fork' will see a DeprecationWarning upon multiprocessing.Pool() construction or upon multiprocessing.Process.start() or concurrent.futures.ProcessPool use. See the related issue and documentation within this change for details.
* docs: Fix enum reassign `str` documentation (GH-101507)Peter Gessler2023-02-021-2/+2
|
* Docs: improve accuracy of sqlite3 `check_same_thread` parameter (#101351)Marcos Pereira2023-02-011-4/+7
| | | | Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-101467: Correct py.exe handling of prefix matches and cases when only one ↵Steve Dower2023-02-011-5/+30
| | | | runtime is installed (GH-101468)
* gh-101498 : Fix asyncio.Timeout example in docs (#101499)Raj2023-02-011-1/+1
| | | Doc/library/asyncio-task.rst#timeout
* gh-101454: fix documentation for END_ASYNC_FOR (#101455)Irit Katriel2023-02-011-4/+3
|
* gh-101317: Add `ssl_shutdown_timeout` parameter for ↵beavailable2023-02-011-1/+9
| | | | | `asyncio.StreamWriter.start_tls` (#101335) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* datetime.rst: fix combine() signature (#101490)John Belmonte2023-02-011-1/+1
| | | | | The default `tzinfo` param of the `combine()` signature pseudocode was erroneously `self.tzinfo`. `self` has no meaning in the context of a classmethod, and the datetime class itself has no `tzinfo` attribute. The correct default pseudocode is `time.tzinfo`, reflecting that the default is the `tzinfo` attribute of the `time` parameter.
* gh-101440: fix json snippet error in logging-cookbook.rst (#101439)Peter Jiping Xie2023-01-311-1/+1
|
* gh-99276 - Updated Doc/faq/general.rst (#101396)Raj2023-01-311-2/+2
| | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Add JOBS parameter to docs Makefile (#101395)Christophe Nanteuil2023-01-311-1/+2
|
* gh-77607: Improve accuracy of os.path.join docs (#101406)Shantanu2023-01-311-5/+5
| | | | | | | | | | | This is a follow-up to #100811. One of the changes in that PR isn't accurate in that `os.path.join('', '')` will not end in a separator. This reverts that change to the previous wording that used "only", but explicitly calls out the case where the last part ends in a separator, which is what caused confusin in #77607 and motivated the change in #100811.
* Fixes typo in asyncio.TaskGroup context manager code example (#101449)Ben2023-01-311-1/+1
|
* gh-101422: (docs) TarFile default errorlevel argument is 1, not 0 (GH-101424)Owain Davies2023-01-301-1/+1
|
* gh-89381: Fix invalid signatures of math/cmath.log (#101404)Sergey B Kirpichev2023-01-292-6/+5
|
* Fix trivial typo in shebang example (GH-101385)socal-nerdtastic2023-01-281-1/+1
| | | The example was showing the current version, but should be pinned to 3.7 to match the example command.
* gh-101386: fix typos found by codespell (#101387)Peter Jiping Xie2023-01-284-6/+6
|
* gh-39615: Add warnings.warn() skip_file_prefixes support (#100840)Gregory P. Smith2023-01-281-5/+35
| | | | | `warnings.warn()` gains the ability to skip stack frames based on code filename prefix rather than only a numeric `stacklevel=` via a new `skip_file_prefixes=` keyword argument.
* [doc] Add a section on logging handler configuration order. (GH-101380)Vinay Sajip2023-01-271-0/+23
|
* [doc] Add some notices to logging configuration documentation. (GH-101373)Vinay Sajip2023-01-271-0/+10
|
* gh-101000: Add os.path.splitroot() (#101002)Barney Gale2023-01-272-3/+41
| | | | Co-authored-by: Eryk Sun <eryksun@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* datetime.rst: improve combine() docs (#101338)John Belmonte2023-01-261-4/+3
| | | | | The explanation on handling of datetime as the date arg was confusingly mixed with an unrelated item, and lacked proper arg name formatting.
* GH-88597: Rename uuid's new CLI args to be in line with uuidgen. (#101248)achhina2023-01-251-11/+12
| | | this way they match an existing uuidgen command line tool.
* GH-100762: Don't call `gen.throw()` in `gen.close()`, unless necessary. ↵Mark Shannon2023-01-241-1/+4
| | | | | | (GH-101013) * Store exception stack depth in YIELD_VALUE's oparg and use it avoid expensive gen.throw() in gen.close() where possible.
* gh-101152: Implement PEP 699 (GH-101193)ram vikram singh2023-01-241-0/+5
| | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Ken Jin <kenjin@python.org>
* [docs] Mention how to get/set a bigint PyLong via the C API (#101270)Gregory P. Smith2023-01-241-0/+4
| | | | | | We don't need direct C APIs to get at a bigint representation of PyLong but we do want the few people who need to understand how. Additional Author: CAM-Gerlach
* Added asyncio REPL example to docs. (#101243)Carlton Gibson2023-01-231-0/+12
| | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-83122: Deprecate testing element truth values in `ElementTree` (#31149)Jacob Walls2023-01-232-3/+14
| | | | | | | When testing element truth values, emit a DeprecationWarning in all implementations. This had emitted a FutureWarning in the rarely used python-only implementation since ~2.7 and has always been documented as a behavior not to rely on. Matching an element in a tree search but having it test False can be unexpected. Raising the warning enables making the choice to finally raise an exception for this ambiguous behavior in the future.
* GH-101097: Switch from standard interval notation to greater or less than ↵Andrew Hong2023-01-221-3/+3
| | | | signs for random.random()'s documentation (#101119)
* gh-67790: Support float-style formatting for Fraction instances (#100161)Mark Dickinson2023-01-222-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR adds support for float-style formatting for `Fraction` objects: it supports the `"e"`, `"E"`, `"f"`, `"F"`, `"g"`, `"G"` and `"%"` presentation types, and all the various bells and whistles of the formatting mini-language for those presentation types. The behaviour almost exactly matches that of `float`, but the implementation works with the exact `Fraction` value and does not do an intermediate conversion to `float`, and so avoids loss of precision or issues with numbers that are outside the dynamic range of the `float` type. Note that the `"n"` presentation type is _not_ supported. That support could be added later if people have a need for it. There's one corner-case where the behaviour differs from that of float: for the `float` type, if explicit alignment is specified with a fill character of `'0'` and alignment type `'='`, then thousands separators (if specified) are inserted into the padding string: ```python >>> format(3.14, '0=11,.2f') '0,000,003.14' ``` The exact same effect can be achieved by using the `'0'` flag: ```python >>> format(3.14, '011,.2f') '0,000,003.14' ``` For `Fraction`, only the `'0'` flag has the above behaviour with respect to thousands separators: there's no special-casing of the particular `'0='` fill-character/alignment combination. Instead, we treat the fill character `'0'` just like any other: ```python >>> format(Fraction('3.14'), '0=11,.2f') '00000003.14' >>> format(Fraction('3.14'), '011,.2f') '0,000,003.14' ``` The `Fraction` formatter is also stricter about combining these two things: it's not permitted to use both the `'0'` flag _and_ explicit alignment, on the basis that we should refuse the temptation to guess in the face of ambiguity. `float` is less picky: ```python >>> format(3.14, '0<011,.2f') '3.140000000' >>> format(Fraction('3.14'), '0<011,.2f') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/mdickinson/Repositories/python/cpython/Lib/fractions.py", line 414, in __format__ raise ValueError( ValueError: Invalid format specifier '0<011,.2f' for object of type 'Fraction'; can't use explicit alignment when zero-padding ```
* GH-88597: Added command line interface to UUID module. (#99463)achhina2023-01-222-0/+65
| | | | | | | | | | | | The `uuid` module now supports command line usage. ```python ❯ ./python.exe -m uuid 5f2d57b1-90e8-417c-ba5d-69b9b6f74289 ❯ ./python.exe -m uuid -h usage: uuid.py [-h] [-u {uuid1,uuid3,uuid4,uuid5}] [-ns NAMESPACE] [-n NAME] ... ```