summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Test specialization's thread-safety (GH-105953)Brandt Bucher2023-06-221-1/+511
|
* gh-105979: Fix exception handling in `unmarshal_frozen_code` ↵chgnrdv2023-06-221-0/+8
| | | | (`Python/import.c`) (#105980)
* gh-98931: Add custom error messages to invalid import/from with multiple ↵Pablo Galindo Salgado2023-06-221-0/+16
| | | | | | targets (#105985) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* GH-89812: Add `pathlib.UnsupportedOperation` (GH-105926)Barney Gale2023-06-222-12/+42
| | | | | | | This new exception type is raised instead of `NotImplementedError` when a path operation is not supported. It can be raised from `Path.readlink()`, `symlink_to()`, `hardlink_to()`, `owner()` and `group()`. In a future version of pathlib, it will be raised by `AbstractPath` for these methods and others, such as `AbstractPath.mkdir()` and `unlink()`.
* GH-91095: Specialize calls to normal Python classes. (GH-99331)Mark Shannon2023-06-224-2/+26
|
* gh-105927: Add PyWeakref_GetRef() function (#105932)Victor Stinner2023-06-211-0/+1
| | | | Add tests on PyWeakref_NewRef(), PyWeakref_GetObject(), PyWeakref_GET_OBJECT() and PyWeakref_GetRef().
* gh-105915: Fix SyntaxWarning becoming a SyntaxError with -We in test_fstring ↵Lysandros Nikolaou2023-06-201-3/+3
| | | | (#105943)
* gh-105915: Add 'r' prefix to not emit SyntaxWarning in test_fstring (#105940)Lysandros Nikolaou2023-06-201-1/+1
| | | Co-authored-by: @sunmy2019
* gh-105938: Emit a SyntaxWarning for escaped braces in an f-string (#105939)Lysandros Nikolaou2023-06-201-2/+9
|
* gh-105922: Add PyImport_AddModuleRef() function (#105923)Victor Stinner2023-06-202-0/+25
| | | | | | * Add tests on PyImport_AddModuleRef(), PyImport_AddModule() and PyImport_AddModuleObject(). * pythonrun.c: Replace Py_XNewRef(PyImport_AddModule(name)) with PyImport_AddModuleRef(name).
* gh-105481: generate _specializations and _specialized_instructions from ↵Irit Katriel2023-06-193-91/+102
| | | | bytecodes.c (#105913)
* gh-105908: fix `barry_as_FLUFL` future import (#105909)Crowthebird2023-06-191-0/+8
|
* GH-105808: Fix a regression introduced in GH-101251 (#105910)T. Wouters2023-06-192-1/+51
| | | | Fix a regression introduced in pythonGH-101251, causing GzipFile.flush() to not flush the compressor (nor pass along the zip_mode argument).
* gh-71299: Fix __all__ in tokenize (#105907)Lysandros Nikolaou2023-06-192-135/+137
| | | Co-authored-by: Unit03
* GH-104584: Assorted fixes for the optimizer API. (GH-105683)Mark Shannon2023-06-191-8/+57
| | | | | | * Add test for long loops * Clear ENTER_EXECUTOR when deopting code objects.
* gh-105875: Require SQLite 3.15.2 or newer (#105876)Erlend E. Aasland2023-06-185-78/+38
| | | SQLite 3.15.2 was released 2016-11-28.
* gh-105481: remove HAS_ARG, HAS_CONST, IS_JUMP_OPCODE, IS_PSEUDO_OPCODE and ↵Irit Katriel2023-06-171-8/+2
| | | | replace by their new versions (#105865)
* GH-105840: Fix assertion failures when specializing calls with too many ↵Brandt Bucher2023-06-161-0/+29
| | | | __defaults__ (GH-105847)
* gh-104799: PEP 695 backward compatibility for ast.unparse (#105846)Jelle Zijlstra2023-06-162-3/+77
|
* gh-105834: Add tests for calling `issubclass()` between two protocols (#105835)Alex Waygood2023-06-161-0/+74
| | | Some parts of the implementation of `typing.Protocol` had poor test coverage
* gh-105433: Add `pickle` tests for PEP695 (#105443)Nikita Sobolev2023-06-162-4/+131
|
* GH-103124: Multiline statement support for pdb (GH-103125)Tian Gao2023-06-152-4/+55
|
* GH-105588: Add missing error checks to some obj2ast_* converters (GH-105589)Brandt Bucher2023-06-151-0/+27
|
* gh-105820: Fix tok_mode expression buffer in file & readline tokenizer (#105828)Lysandros Nikolaou2023-06-152-1/+27
|
* gh-105751, test_ctypes: Remove disabled tests (#105826)Victor Stinner2023-06-155-131/+2
| | | | | | | | | | | | | | * The following tests were disabled since the initial ctypes commit in 2006, commit babddfca758abe34ff12023f63b18d745fae7ca9: * 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 5dc4fe09b7648f9801558e766b21a3d3b2dcad3b. * Remove check_perf() and run_test() of test_numbers.
* gh-105821: Use a raw f-string in test_httpservers.py (#105822)Pablo Galindo Salgado2023-06-151-2/+2
| | | Use a raw f-string in test_httpservers.py
* gh-105751: Remove platform usage in test_ctypes (#105819)Victor Stinner2023-06-151-7/+0
| | | The MACHINE variable is no longer used in test_structures.
* gh-105751: Reenable disable test_ctypes tests (#105818)Victor Stinner2023-06-152-31/+25
| | | | | | | Reenable 3 tests: * test_overflow() * test_basic_wstrings() * test_toolong()
* gh-105751: Remove dead code in test_ctypes (#105817)Victor Stinner2023-06-1515-128/+37
| | | | | * Remove "except: print(tp); raise" debug code. * Remove unused NoNullHandle() function. * Remove commented code.
* GH-89812: Churn `pathlib.Path` test methods (#105807)Barney Gale2023-06-151-315/+315
| | | | | | | | | | | | | | 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.
* gh-105800: Issue SyntaxWarning in f-strings for invalid escape sequences ↵Pablo Galindo Salgado2023-06-151-0/+3
| | | | (#105801)
* gh-105751: Cleanup test_ctypes imports (#105803)Victor Stinner2023-06-1445-240/+250
| | | | | | * 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.
* gh-105751: test_ctypes avoids the operator module (GH-105797)Victor Stinner2023-06-1410-80/+85
| | | | | | | * 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.
* gh-105751: test_ctypes: Remove @need_symbol decorator (GH-105798)Victor Stinner2023-06-1417-66/+10
| | | | | | | | | | 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
* gh-75905: Remove test_xmlrpc_net: skipped since 2017 (#105796)Victor Stinner2023-06-141-31/+0
| | | | | | | test_xmlrpc_net was skipped since 2017: commit 73ffd3f2036179ed54591ef0455e5ba5694ae5bd. The public buildbot.python.org server has no XML-RPC interface anymore, and no replacement server was found in 6 years.
* GH-77273: Better bytecodes for f-strings (GH-6132)Mark Shannon2023-06-144-21/+19
|
* xmlrpc.client uses datetime.datetime.isoformat() (#105741)Victor Stinner2023-06-142-32/+12
| | | | | | Reimplement _iso8601_format() using the datetime isoformat() method. Ignore the timezone. Co-Authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
* gh-105570: Deprecate unusual ways of creating empty TypedDicts (#105780)Alex Waygood2023-06-142-2/+51
| | | 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", {})`.
* gh-105566: Deprecate unusual ways of creating `typing.NamedTuple` classes ↵Alex Waygood2023-06-142-12/+119
| | | | | | | (#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", [])`.
* gh-104873: Add typing.get_protocol_members and typing.is_protocol (#104878)Jelle Zijlstra2023-06-142-2/+109
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-102541: Hide traceback in help prompt (gh-102614)Kirill Podoprigora2023-06-141-8/+13
|
* gh-105745: Fix open method of webbrowser.Konqueror (#105746)Nikita Sobolev2023-06-141-9/+0
|
* gh-105687: Remove deprecated objects from `re` module (#105688)Nikita Sobolev2023-06-145-53/+6
|
* GH-89812: Clean up pathlib tests. (#104829)Barney Gale2023-06-141-84/+96
| | | | | | Clean up pathlib tests. Merge `PurePathTest` into `_BasePurePathTest`, and `PathTest` into `_BasePathTest`.
* gh-105751: test_ctypes avoids "from ctypes import *" (#105768)Victor Stinner2023-06-1448-83/+179
| | | | | | Using "import *" prevents linters like pyflakes to detect undefined names (usually missing imports). Replace c_voidp with c_void_p.
* gh-105751: test_ctypes.test_numbers uses top level imports (#105762)Victor Stinner2023-06-141-32/+8
| | | Moroever, c_ulonglong and c_bool are always available.
* gh-105751: test_ctypes gets Windows attrs from ctypes (#105758)Victor Stinner2023-06-1411-64/+75
| | | | | | | | | | | | | | | test_ctypes now gets attributes specific to Windows from the ctypes module, rather than relying on "from ctypes import *". Attributes: * ctypes.FormatError * ctypes.WINFUNCTYPE * ctypes.WinError * ctypes.WinDLL * ctypes.windll * ctypes.oledll * ctypes.get_last_error() * ctypes.set_last_error()
* gh-104812: Skip Pending Calls Tests if No Threading (gh-105761)Eric Snow2023-06-141-0/+2
| | | This fixes the WASM buildbots.
* GH-104554: Add RTSPS support to `urllib/parse.py` (#104605)zentarim2023-06-131-5/+5
| | | | | | | | | | | | | * GH-104554: Add RTSPS support to `urllib/parse.py` RTSPS is the permanent scheme defined in https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml alongside RTSP and RTSPU schemes. * 📜🤖 Added by blurb_it. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-105436: Ignore unrelated errors when checking empty env (GH-105742)Steve Dower2023-06-131-3/+4
|