Commit graph

117480 commits

Author SHA1 Message Date
Erlend E. Aasland
6849acb3fe
gh-105875: Require SQLite 3.15.2 or newer (#105876)
SQLite 3.15.2 was released 2016-11-28.
2023-06-19 00:29:08 +02:00
Hugo van Kemenade
bc07c8f096
Docs: move sphinx-lint to pre-commit (#105750) 2023-06-18 11:52:05 +00:00
Erlend E. Aasland
dba7217511
gh-105844: Use devguide terminology to denote versions (#105882) 2023-06-18 12:25:23 +02:00
Irit Katriel
14d01262da
gh-105481: remove HAS_ARG, HAS_CONST, IS_JUMP_OPCODE, IS_PSEUDO_OPCODE and replace by their new versions (#105865) 2023-06-17 17:00:16 +01:00
Erlend E. Aasland
34e93d3998
CI: Bump macOS build to use OpenSSL v3.0 (#105538) 2023-06-16 21:00:37 +02:00
Brandt Bucher
2beab5bdef
GH-105840: Fix assertion failures when specializing calls with too many __defaults__ (GH-105847) 2023-06-16 11:01:15 -07:00
Carl Meyer
b356a4749a
gh-105678: document SET_FUNCTION_ATTRIBUTE (#105843) 2023-06-16 12:36:59 -05:00
Jelle Zijlstra
957a974d4f
gh-104799: PEP 695 backward compatibility for ast.unparse (#105846) 2023-06-16 09:31:23 -07:00
Alex Waygood
70c075c194
gh-105834: Add tests for calling issubclass() between two protocols (#105835)
Some parts of the implementation of `typing.Protocol` had poor test coverage
2023-06-16 15:47:55 +00:00
Hugo van Kemenade
101d5ec7d7
CI: Remove docs build from Azure Pipelines (#105823) 2023-06-16 14:04:34 +03:00
Erlend E. Aasland
0bffe1acd7
gh-105844: Consistently use 'minor version' for X.Y versions (#105851) 2023-06-16 10:41:47 +02:00
chgnrdv
0d0963737a
Fix inaccuracies in "Assorted Topics" section of "Defining Extension Types" tutorial (#104969) 2023-06-16 07:10:59 +00:00
Nikita Sobolev
1af8251d9e
gh-105433: Add pickle tests for PEP695 (#105443) 2023-06-15 17:58:40 -07:00
Alex Doe
486b52a315
bpo-44530: Document the change in MAKE_FUNCTION behavior (#93189)
* bpo-44530: Document the change in MAKE_FUNCTION behavior

Fixes dis module documentation for MAKE_FUNCTION due to 2f180ce2cb (bpo-44530, released as part of 3.11) removes the qualified name at TOS
2023-06-15 19:04:57 -05:00
Tian Gao
25a64fd28a
GH-103124: Multiline statement support for pdb (GH-103125) 2023-06-15 23:34:42 +00:00
Brandt Bucher
a4056c8f9c
GH-105588: Add missing error checks to some obj2ast_* converters (GH-105589) 2023-06-15 15:45:13 -07:00
Lysandros Nikolaou
3af2dc7588
gh-105831: Fix NEWS blurb from gh-105828 (#105833) 2023-06-15 19:10:33 +02:00
Lysandros Nikolaou
d382ad4915
gh-105820: Fix tok_mode expression buffer in file & readline tokenizer (#105828) 2023-06-15 16:21:24 +00:00
Victor Stinner
8f10140e74
gh-105751, test_ctypes: Remove disabled tests (#105826)
* The following tests were disabled since the initial ctypes commit
  in 2006, commit babddfca75:

  * Callbacks.test_char_p()
  * DeletePointerTestCase.test_X()
  * NumberTestCase.test_perf()
  * StructureTestCase.test_subclass_creation()
  * Tests.test_X() of test_byteswap

* NumberTestCase.test_bool_from_address() was disabled in 2007 by
  commit 5dc4fe09b7.
* Remove check_perf() and run_test() of test_numbers.
2023-06-15 12:22:01 +00:00
Pablo Galindo Salgado
09ce8c3b48
gh-105821: Use a raw f-string in test_httpservers.py (#105822)
Use a raw f-string in test_httpservers.py
2023-06-15 10:48:01 +00:00
Victor Stinner
c5111aec2b
gh-105751: Remove platform usage in test_ctypes (#105819)
The MACHINE variable is no longer used in test_structures.
2023-06-15 09:44:54 +00:00
Victor Stinner
b496ff3109
gh-105751: Reenable disable test_ctypes tests (#105818)
Reenable 3 tests:

* test_overflow()
* test_basic_wstrings()
* test_toolong()
2023-06-15 09:36:41 +00:00
Victor Stinner
0841ca7932
gh-105751: Remove dead code in test_ctypes (#105817)
* Remove "except: print(tp); raise" debug code.
* Remove unused NoNullHandle() function.
* Remove commented code.
2023-06-15 09:31:09 +00:00
Alex Waygood
da911a6b22
More reorganisation of the typing docs (#105787) 2023-06-15 06:52:18 +01:00
Alex Waygood
006a453205
Improve docs for typing.dataclass_transform (#105792) 2023-06-15 06:51:42 +01:00
Barney Gale
10bf2cd404
GH-89812: Churn pathlib.Path test methods (#105807)
Re-arrange `pathlib.Path` test methods in source code. No other changes.

The test methods are arranged in two groups. The first group checks
`stat()`, `open()`, `iterdir()`, `readlink()`, and derived methods like
`exists()`, `read_text()`, `glob()` and `resolve()`. The second group
checks all other `Path` methods. To minimise the diff I've maintained the
method order within groups where possible.

This patch prepares the ground for a new `_AbstractPath` class, which will
support methods in the first group above. By churning the test methods
here, subsequent patches will be easier to review and less likely to break
things.
2023-06-15 01:31:30 +00:00
Pablo Galindo Salgado
12b6d844d8
gh-105800: Issue SyntaxWarning in f-strings for invalid escape sequences (#105801) 2023-06-15 01:08:12 +01:00
Victor Stinner
698a0da7d4
gh-105751: Cleanup test_ctypes imports (#105803)
* Move imports at top level and sort imports.
* Replace c_buffer() with create_string_buffer(): c_buffer is a
  deprecated alias.
* PEP 8: Add empty lines for readability between imports and classes.
2023-06-14 23:31:45 +00:00
Irit Katriel
d1b0297d3e
gh-105481: add HAS_JUMP flag to opcode metadata (#105791) 2023-06-14 23:14:22 +00:00
Victor Stinner
5ab13c5f97
gh-105751: test_ctypes avoids the operator module (GH-105797)
* Replace operator.delitem(obj, index) with "del obj[index]".
* Replace operator.setitem(obj, index, value) with
  "obj[index] = value".
* Replace delattr(obj, "attr) with "del obj.attr".
* Replace grc() with sys.getrefcount() for readability.
2023-06-14 21:29:05 +00:00
Victor Stinner
e7507bd131
gh-105751: test_ctypes: Remove @need_symbol decorator (GH-105798)
Remove the @need_symbol('...') decorator of test.test_ctypes since
requested symbols are now always always available in ctypes.

Use the @unittest.skipUnless() decorator directly for the two types
only available on Windows:

* ctypes.WINFUNCTYPE
* ctypes.oledll
2023-06-14 20:56:01 +00:00
Guido van Rossum
4caa728b2c
gh-104909: Implement conditional stack effects for macros (#105748) 2023-06-14 20:50:48 +00:00
Victor Stinner
820febc535
gh-75905: Remove test_xmlrpc_net: skipped since 2017 (#105796)
test_xmlrpc_net was skipped since 2017:
commit 73ffd3f203.

The public buildbot.python.org server has no XML-RPC interface
anymore, and no replacement server was found in 6 years.
2023-06-14 21:26:34 +02:00
Guido van Rossum
d50930a6a8
gh-105481: Fix types and a bug for pseudos (#105788) 2023-06-14 10:06:50 -07:00
Guido van Rossum
74c2422fa2
Update DSL docs for cases generator (#105753)
* Clarify things around goto error/ERROR_IF a bit
* Remove docs for super-instructions
* Add pseudo; fix heading markup
2023-06-14 08:19:24 -07:00
Mark Shannon
1d857da7f0
GH-77273: Better bytecodes for f-strings (GH-6132) 2023-06-14 16:15:08 +01:00
Victor Stinner
307bceaa65
xmlrpc.client uses datetime.datetime.isoformat() (#105741)
Reimplement _iso8601_format() using the datetime isoformat() method.
Ignore the timezone.

Co-Authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
2023-06-14 17:00:40 +02:00
Alex Waygood
7b1f0f204a
gh-105570: Deprecate unusual ways of creating empty TypedDicts (#105780)
Deprecate two methods of creating typing.TypedDict classes with 0 fields using the functional syntax: `TD = TypedDict("TD")` and `TD = TypedDict("TD", None)`. Both will be disallowed in Python 3.15. To create a TypedDict class with 0 fields, either use `class TD(TypedDict): pass` or `TD = TypedDict("TD", {})`.
2023-06-14 14:58:41 +00:00
TATHAGATA ROY
d32e8d6070
gh-105196: Fix indentations of section headings in C API docs (#105672) 2023-06-14 15:21:30 +01:00
Alex Waygood
4a113e24a3
Typing docs: move the deprecated stuff below the non-deprecated stuff (#105781) 2023-06-14 15:19:27 +01:00
Mark Shannon
7199584ac8
GH-100987: Allow objects other than code objects as the "executable" of an internal frame. (GH-105727)
* Add table describing possible executable classes for out-of-process debuggers.

* Remove shim code object creation code as it is no longer needed.

* Make lltrace a bit more robust w.r.t. non-standard frames.
2023-06-14 13:46:37 +01:00
Alex Waygood
ad56340b66
gh-105566: Deprecate unusual ways of creating typing.NamedTuple classes (#105609)
Deprecate creating a typing.NamedTuple class using keyword arguments to denote the fields (`NT = NamedTuple("NT", x=int, y=str)`). This will be disallowed in Python 3.15. Use the class-based syntax or the functional syntax instead.

Two methods of creating `NamedTuple` classes with 0 fields using the functional syntax are also deprecated, and will be disallowed in Python 3.15: `NT = NamedTuple("NT")` and `NT = NamedTuple("NT", None)`. To create a `NamedTuple` class with 0 fields, either use `class NT(NamedTuple): pass` or `NT = NamedTuple("NT", [])`.
2023-06-14 13:38:49 +01:00
Jelle Zijlstra
fc8037d84c
gh-104873: Add typing.get_protocol_members and typing.is_protocol (#104878)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-14 05:35:06 -07:00
Kirill Podoprigora
ba516e70c6
gh-102541: Hide traceback in help prompt (gh-102614) 2023-06-14 21:17:12 +09:00
Victor Stinner
0316063031
gdb libpython.py: Remove compatibility code (#105739)
Remove compatibility code for Python 2 and early Python 3 versions.

* Remove os_fsencode() reimplementation: use os.fsencode() directly.
  os.fsencode() was added to Python 3.2.
* Remove references to Python 2 and "Python 3": just say "Python".
* Remove outdated u'' string format: use '' instead.
2023-06-14 12:30:22 +02:00
Nikita Sobolev
e5d45b7444
gh-105745: Fix open method of webbrowser.Konqueror (#105746) 2023-06-14 12:29:16 +02:00
Nikita Sobolev
67f69dba0a
gh-105687: Remove deprecated objects from re module (#105688) 2023-06-14 12:26:20 +02:00
Victor Stinner
fb655e0c45
_ctypes callbacks.c uses _Py_COMP_DIAG_IGNORE_DEPR_DECLS (#105732)
Replace #pragma with _Py_COMP_DIAG_PUSH,
_Py_COMP_DIAG_IGNORE_DEPR_DECLS and _Py_COMP_DIAG_POP to ease Python
maintenance. Also add a comment explaining why callbacks.c ignores a
deprecation warning.
2023-06-14 12:12:25 +02:00
Jelle Zijlstra
5cdd5ba49d
tarfile: Fix positional-only syntax in docs (GH-105770)
The syntax used in the current docs (a / before any args) is invalid.

I think the right approach is for the arguments to arbitrary
filter functions to be treated as positional-only, meaning that users
can supply filter functions with any names for the argument. tarfile.py
only calls the filter function with positional arguments.
2023-06-14 09:26:48 +02:00
Eddie Elizondo
6199fe3b32
gh-105587: Remove assertion from _PyStaticObject_CheckRefcnt (#105638) 2023-06-14 10:03:32 +05:30