Commits
main
Name already in use
Commits on Jun 15, 2023
-
-
-
gh-105751, test_ctypes: Remove disabled tests (#105826)
* The following tests were disabled since the initial ctypes commit in 2006, commit babddfc: * 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 5dc4fe0. * Remove check_perf() and run_test() of test_numbers.
-
gh-105821: Use a raw f-string in test_httpservers.py (#105822)
Use a raw f-string in test_httpservers.py
-
gh-105751: Remove platform usage in test_ctypes (#105819)
The MACHINE variable is no longer used in test_structures.
-
gh-105751: Reenable disable test_ctypes tests (#105818)
Reenable 3 tests: * test_overflow() * test_basic_wstrings() * test_toolong()
-
gh-105751: Remove dead code in test_ctypes (#105817)
* Remove "except: print(tp); raise" debug code. * Remove unused NoNullHandle() function. * Remove commented code.
-
-
-
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.
Commits on Jun 14, 2023
-
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.
-
-
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.
-
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
-
gh-75905: Remove test_xmlrpc_net: skipped since 2017 (#105796)
test_xmlrpc_net was skipped since 2017: commit 73ffd3f. The public buildbot.python.org server has no XML-RPC interface anymore, and no replacement server was found in 6 years.
-
-
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
-
-
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>
-
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", {})`.
-
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.
-
gh-105566: Deprecate unusual ways of creating
typing.NamedTuple
cla……sses (#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 (#1…
…04878) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
-
-
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.
-
_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.
-
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.