Commit Graph

118390 Commits

Author SHA1 Message Date
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
Irit Katriel 0b243c2f66
gh-105481: opcode.h is no longer generated during the build (#108080) 2023-08-17 17:07:58 +01:00
Adam Turner 4cb08188e8
Add workflow for automatic issue headers (#108054)
We don't get the "Bug report" and "Feature or enhancement" titles anymore, with the new issue forms. This brings them back!
2023-08-17 16:37:07 +01:00
Erlend E. Aasland 8a19f225b9
gh-107801: Document SEEK_HOLE and SEEK_DATA (#107936)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Antoine Pitrou <antoine@python.org>
2023-08-17 16:14:01 +02:00
Irit Katriel 2da67a5789
gh-105481: fix out of date comment (#108079) 2023-08-17 10:25:28 +00:00
Mark Shannon 006e44f950
GH-108035: Remove the `_PyCFrame` struct as it is no longer needed for performance. (GH-108036) 2023-08-17 11:16:03 +01:00
Adam Turner 33e6e3fec0
GH-107987: Remove the Distributing Python Modules guide (#108016) 2023-08-17 13:01:14 +03:00
Serhiy Storchaka f51f0466c0
gh-107298: Fix some references in the C API documentation (GH-108072) 2023-08-17 11:16:00 +03:00
Erlend E. Aasland 1344cfac43
gh-105539: Explict resource management for connection objects in sqlite3 tests (#108017)
- Use memory_database() helper
- Move test utility functions to util.py
- Add convenience memory database mixin
- Add check() helper for closed connection tests
2023-08-17 08:45:48 +02:00
Serhiy Storchaka c9d83f93d8
gh-107298: Add standard exceptions and warnings in the nitpick_ignore list (GH-108029) 2023-08-17 09:44:05 +03:00
Guido van Rossum dc8fdf5fd5
gh-106581: Split `CALL_PY_EXACT_ARGS` into uops (#107760)
* Split `CALL_PY_EXACT_ARGS` into uops

This is only the first step for doing `CALL` in Tier 2.
The next step involves tracing into the called code object and back.
After that we'll have to do the remaining `CALL` specialization.
Finally we'll have to deal with `KW_NAMES`.

Note: this moves setting `frame->return_offset` directly in front of
`DISPATCH_INLINED()`, to make it easier to move it into `_PUSH_FRAME`.
2023-08-16 16:26:43 -07:00
Irit Katriel 665a4391e1
gh-105481: generate op IDs from bytecode.c instead of hard coding them in opcode.py (#107971) 2023-08-16 22:25:18 +00:00
Adam Turner e88eb3775e
GH-92584: Remove references to Distutils in configure.rst (#108043)
Remove references to Distutils in configure.rst
2023-08-16 23:13:05 +02:00
Adam Turner fbb7cbc0e9
GH-92584: Remove Installing Python Modules (Distutils version) (#108020) 2023-08-16 21:06:56 +00:00
Adam Turner 636ca313b2
GH-92584: Remove references to Distutils in ``PYTHONUSERBASE`` (#108040)
Remove references to Distutils in ``PYTHONUSERBASE``
2023-08-16 22:43:30 +02:00
Adam Turner 902864256c
GH-92584: Redirect macOS package installation to the PPUG (#108044) 2023-08-16 20:42:23 +00:00
Serhiy Storchaka 882cb79afa
gh-56166: Deprecate passing confusing positional arguments in re functions (#107778)
Deprecate passing optional arguments maxsplit, count and flags in
module-level functions re.split(), re.sub() and re.subn() as positional.
They should only be passed by keyword.
2023-08-16 13:35:35 -07:00
Victor Stinner fb8fe377c4
gh-107211: Fix select extension build on Solaris (#108012)
Export the internal _Py_open() and _Py_write() functions for Solaris:
the select shared extension uses them.
2023-08-16 22:26:22 +02:00
Adam Turner 57fcf96e4f
GH-92584: Remove reference to Distutils in ``cx_Freeze``'s description (#108047)
Remove reference to Distutils in ``cx_Freeze``'s description
2023-08-16 22:23:12 +02:00
Nikita Sobolev 199438b7cc
gh-105522: [Enum] Correctly handle possible exceptions during testing (GH-105523) 2023-08-16 12:17:28 -07:00