Commit Graph

118309 Commits

Author SHA1 Message Date
Serhiy Storchaka db55383829
gh-107298: Fix references to deprecated and removed PyUnicode C API (GH-108077) 2023-08-21 20:05:15 +03:00
Irit Katriel 10a91d7e98
gh-108113: Make it possible to create an optimized AST (#108154) 2023-08-21 16:31:30 +00:00
David Lechner 47022a079e
docs: fix grammar in isolating-extensions.rst (#108037) 2023-08-21 15:41:34 +00:00
Serhiy Storchaka 60942cccb1
gh-95065, gh-107704: Argument Clinic: support multiple '/ [from ...]' and '* [from ...]' markers (GH-108132) 2023-08-21 13:59:58 +00:00
Nikita Sobolev 13104f3b74
gh-107905: Test raising `__value__` for `TypeAliasType` (#107997) 2023-08-21 13:52:37 +00:00
Hugo van Kemenade 71962e5237
Run sphinx-lint on Misc/NEWS.d/next/ (#108212)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-21 13:13:55 +00:00
balmeida-nokia 37135d25e2
gh-107396: tarfiles: set self.exception before _init_read_gz() (GH-107485)
In the stack call of: _init_read_gz()
```
_read, tarfile.py:548
read, tarfile.py:526
_init_read_gz, tarfile.py:491
```
a try;except exists that uses `self.exception`, so it needs to be set before
calling _init_read_gz().
2023-08-21 11:39:06 +00:00
Serhiy Storchaka 80bdebdd85
gh-107916: Save the error code before decoding the filename in PyErr_SetFromErrnoWithFilename() etc (GH-107929) 2023-08-21 14:16:31 +03:00
Petr Viktorin acbd3f9c5c
gh-107845: Fix symlink handling for tarfile.data_filter (GH-107846)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Lumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
2023-08-21 12:56:46 +02:00
Serhiy Storchaka 622ddc4167
Improve references in the tutorial (GH-108069)
* Use full qualified names for references (even if they do not work now,
  they will work in future).
* Silence references to examples.
2023-08-21 13:41:01 +03:00
Raymond Hettinger 20cc90c0df
gh-105736: Sync pure python version of OrderedDict with the C version (#108098) 2023-08-21 11:49:08 +02:00
Joon Hwan 김준환 014a5b71e7
gh-107895: Fix test_asyncio.test_runners when run it in CPython's "development mode" (GH-108168) 2023-08-21 07:55:09 +00:00
Adam Turner 8f3d09bf5d
Resolve reference warnings in faq/gui.rst (#108147)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-08-21 07:37:52 +00:00
Dong-hee Na 4fdf3fda0f
gh-107265: Fix code_richcompare for ENTER_EXECUTOR case (gh-108165) 2023-08-21 05:50:09 +00:00
Dong-hee Na 04f7875c44
gh-107526: Fix test_module_level_callable_unrepresentable_default (gh-108187) 2023-08-21 04:51:31 +00:00
Nikita Sobolev db6dc6ce41
gh-107526: Revert "gh-100357: Convert several functions in bltinsmodule to AC" (#107542) 2023-08-20 17:54:10 -07:00
Alex Waygood 05ef4ca94c
gh-104504: cases generator: Add `--warn-unreachable` to the mypy config (#108112) 2023-08-21 00:40:41 +01:00
Adam Turner 6323bc33ff
Resolve reference warnings in faq/library.rst (#108149)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-08-20 19:01:13 +00:00
Adam Turner 92815cc7cf
Resolve reference warnings in faq/design.rst (#108148) 2023-08-20 12:34:27 -06:00
Erlend E. Aasland f904aa4e1f
Docs: document 'manager' and '_log' attrs of logging.Logging (#108145)
Authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-20 16:01:10 +00:00
Adam Turner a390ec20f5
Resolve reference warnings in faq/programming.rst (#108150) 2023-08-20 19:23:28 +05:30
Erlend E. Aasland c735e79afb
Docs: Fix Sphinx warnings in logging.rst (GH-108139)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-08-20 12:19:07 +01:00
Erlend E. Aasland 4d4393139f
Docs: Fix Sphinx warnings in license.rst (#108142)
- Fix links to stdlib modules
- Silence links to external functions
2023-08-20 13:10:48 +02:00
Erlend E. Aasland 29fa7afef9
Docs: Fix Sphinx warnings in sys.rst (#108106)
- Mark up named tuple attributes as attributes
- Remove links for external functions
- io.BufferedIOBase has no 'buffer' attribute;
  remove the link and mark up using :attr:`!buffer`
- (Re)format some tables as bullet lists:
  - sys._emscripten_info
  - sys.hash_info
  - sys.int_info
  - sys.thread_info
- In the paragraphs mentioning 'f_trace_lines' and 'f_trace_opcodes',
  add links to the frame objects reference.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-20 13:09:33 +02:00
Tomas R beffb30dc7
gh-107659: Improve wording of the description of `ctypes.pointer` and `ctypes.POINTER` (#107769)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-08-20 10:54:06 +00:00
Hadházy Tamás 1a713eac47
gh-107619: Extend functools LRU cache docs with generators and async functions (#107934)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-08-20 10:33:15 +00:00
Kumar Aditya b1e5d2c601
Fix patchcheck for `asyncio.tasks` (#108159) 2023-08-20 09:00:42 +00:00
Rafael Fontenelle 1dc0c58d2b
Fix misspellings in sysconfig docs (#108156) 2023-08-20 08:11:39 +00:00
Tin Tvrtković a47c13cae5
gh-107980: fix doc role for asyncio.timeouts (#108126) 2023-08-19 13:14:38 -07:00
Erlend E. Aasland c31c61c04e
Docs: Remove links to external C functions and macros in os.rst (#108138)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-19 17:03:26 +00:00
Serhiy Storchaka 633ea217a8
gh-107915: Handle errors in C API functions PyErr_Set*() and PyErr_Format() (GH-107918)
Such C API functions as PyErr_SetString(), PyErr_Format(),
PyErr_SetFromErrnoWithFilename() and many others no longer crash or
ignore errors if it failed to format the error message or decode the
filename. Instead, they keep a corresponding error.
2023-08-19 14:51:03 +03:00
Serhiy Storchaka 79db9d9a0e
gh-72684: Tkinter: provide interface for "tk busy" subcommands (GH-107684)
Add tkinter.Misc methods: tk_busy_hold(), tk_busy_configure(), tk_busy_cget(),
tk_busy_forget(), tk_busy_current(), and tk_busy_status().
2023-08-19 14:48:02 +03:00
Erlend E. Aasland ca0c6c1f1e
Docs: format sys.float_info properly (#108107)
- Normalise capitalisation and punctuation
- Use attribute markup for named tuple attributes
- Use :c:macro: markup for C macros
- Use a list for the 'rounds' attribute values
- Use list-table, for better .rst readability
- Remove one unneeded sys.float_info.dig link

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-19 08:34:34 +00:00
Serhiy Storchaka 2f311437cd
gh-107704: Argument Clinic: add support for deprecating keyword use of parameters (GH-107984)
It is now possible to deprecate passing keyword arguments for
keyword-or-positional parameters with Argument Clinic, using the new
'/ [from X.Y]' syntax.
(To be read as "positional-only from Python version X.Y")

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-19 10:13:35 +03:00
C.A.M. Gerlach eb953d6e44
gh-101100: Only show GitHub check annotations on changed doc paragraphs (#108065)
* Only show GitHub check annotations on changed doc paragraphs
* Improve check-warnings script arg parsing following Hugo's suggestions
* Factor filtering warnings by modified diffs into helper function
* Build docs on unmerged branch so warning lines match & avoid deep clone

---------

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-18 19:43:28 -05:00
Ned Deily dc7b630b23
gh-107565: Update macOS installer to use OpenSSL 3.0.10. (GH-107897) 2023-08-18 17:38:24 -04:00
Ned Deily ed25f09716
gh-107565: Update multissltests and GitHub CI workflows to use OpenSSL 1.1.1v, 3.0.10, and 3.1.2. (GH-107896) 2023-08-18 15:48:20 -04:00
Erlend E. Aasland dd4442c8f5
gh-107801: Improve the accuracy of os.lseek docs (#107935)
- name the last parameter *whence*, like it is for seek() methods on
  file objects
- add param docstrings
- structure the valid *whence* params

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-18 19:53:51 +02:00
Raymond Hettinger 6db39b1460
Minor code clean-up for the factor() recipe (GH-108114) 2023-08-18 12:13:58 -05:00
Tyler Smart 9bb576cb07
gh-107995: Fix doctest collection of functools.cached_property objects (#107996)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-18 15:44:38 +00:00
Dong-hee Na 28cab71f95
gh-104504: Run mypy on cases_generator in CI (and blacken the code) (gh-108090)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-18 22:42:45 +09:00
Erlend E. Aasland fd19509220
gh-108083: Don't ignore exceptions in sqlite3.Connection.__init__() and .close() (#108084)
- Add explanatory comments
- Add return value to connection_close() for propagating errors
- Always check the return value of connection_exec_stmt()
- Assert pre/post state in remove_callbacks()
- Don't log unraisable exceptions in case of interpreter shutdown
- Make sure we're not initialized if reinit fails
- Try to close the database even if ROLLBACK fails

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-18 11:39:12 +00:00
Victor Stinner 3ff5ef2ad3
gh-108014: Add Py_IsFinalizing() function (#108032)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-18 12:34:41 +02:00
Erlend E. Aasland cc58ec9724
Docs: emphasise warning and add accurate markups for sys.unraisablehook (#108105) 2023-08-18 12:16:22 +02:00
Erlend E. Aasland 02079b010c
gh-107801: Improve the docs of the SEEK_* constants (#108099) 2023-08-17 20:41:35 +00:00
Erlend E. Aasland 5c76899dad
Docs: Fix Sphinx warnings in io.rst (#107903)
- Mark up parameter and argument names properly
- If possible, link to docs for methods like `seek`, `tell`, `write`, `read`, etc.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-08-17 19:19:01 +00:00
Pablo Galindo Salgado 75b3db8445
gh-107944: Improve error message for function calls with bad keyword arguments (#107969) 2023-08-17 19:39:42 +01:00
Guido van Rossum 61c7249759
gh-106581: Project through calls (#108067)
This finishes the work begun in gh-107760. When, while projecting a superblock, we encounter a call to a short, simple function, the superblock will now enter the function using `_PUSH_FRAME`, continue through it, and leave it using `_POP_FRAME`, and then continue through the original code. Multiple frame pushes and pops are even possible. It is also possible to stop appending to the superblock in the middle of a called function, when running out of space or encountering an unsupported bytecode.
2023-08-17 11:29:58 -07:00
Erlend E. Aasland 292a22bdc2
gh-104683: Argument Clinic: Remove unreachable code from _module_and_class() (#108092)
'not hasattr(parent, "classes")' is always false, since 'parent' is an
instance of either the Module, Class, or Clinic classes, and all of
them has a "classes" attribute.
2023-08-17 18:16:08 +00:00
Nikita Sobolev 80f30cf51b
gh-102029: Deprecate passing arguments to `_PyRLock` in `threading` (#102071) 2023-08-17 09:19:07 -07:00