T. Wouters
161012fc25
GH-106160: Fix test_gzip failing under WASI, which does not have zlib. ( #106167 )
...
Fix test_gzip's failure under WASI, which does not have zlib, by using
test.support.import_helper.import_module to import zlib. (gzip
unconditionally imports zlib, so this does not cause any new skips.)
2023-06-28 00:55:11 +00:00
Terry Jan Reedy
eaa1eae55e
IDLE: Condense run.main threading.Thread start. ( #106125 )
...
Use daemon argument added in 3.3 and directly call .start.
Remove now unused 'sockthread' name.
2023-06-27 13:12:56 -04:00
Łukasz Langa
d3af83b934
Revert "GH-96145: Add AttrDict to JSON module for use with object_hook ( #96146 )" ( #105948 )
...
This reverts commit 1f0eafa844
.
2023-06-26 20:35:53 +02:00
Barney Gale
219effa876
GH-105793: Add follow_symlinks argument to `pathlib.Path.is_dir()` and `is_file()` (GH-105794)
...
Brings `pathlib.Path.is_dir()` and `in line with `os.DirEntry.is_dir()`, which
will be important for implementing generic path walking and globbing.
Likewise `is_file()`.
2023-06-26 17:58:17 +01:00
Bruce Eckel
1a2bc94fc2
Update test.support.interpreters to include missing RunFailedError import ( #103841 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-26 17:30:20 +02:00
Gabriel Venberg
dac3d389e7
gh-104527: zippapp will now avoid appending an archive to itself. (gh-106076)
...
zippapp will now avoid appending an archive to itself.
2023-06-26 10:09:08 +01:00
James Webber
a12e8ffb49
gh-106075: add `asyncio.taskgroups.__all__` to `asyncio.__all__` ( #106090 )
...
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2023-06-26 07:54:03 +00:00
Alex Waygood
93a970ffbc
gh-106046: Improve error message from `os.fspath` if `__fspath__` is set to `None` ( #106082 )
2023-06-26 00:06:12 +01:00
chgnrdv
d2cbb6e918
gh-105987: Fix reference counting issue in `_asyncio._swap_current_task` ( #105989 )
2023-06-24 10:53:24 +05:30
Erlend E. Aasland
4849a80dd1
gh-102251: Disable non-rerunnable test in test_import ( #106013 )
2023-06-24 01:34:05 +02:00
Irit Katriel
d8ca5a11bc
gh-105730: support more callables in ExceptionGroup.split() and subgroup() ( #106035 )
2023-06-23 19:47:47 +01:00
Erlend E. Aasland
41ad4dfc04
gh-105063: Disable test_peg_generator.TestCParser bco. ref leaks ( #106024 )
...
Since gh-104798 (Use setuptools in peg-generator and reenable
tests), the TestCParser test case has been producing ref leaks.
2023-06-23 19:04:17 +02:00
Alex Waygood
9499b0f138
gh-105974: Revert unintentional behaviour change for protocols with non-callable members and custom `__subclasshook__` methods ( #105976 )
2023-06-23 14:59:25 +00:00
Erlend E. Aasland
37c5c40125
gh-85136: Remove disabled remote IMAP tests ( #106022 )
...
Tests had been disabled since Jun 12, 2020 (gh-20836).
2023-06-23 13:39:50 +00:00
Brandt Bucher
403a574b00
Test specialization's thread-safety (GH-105953)
2023-06-22 22:02:38 +00:00
chgnrdv
cd5280367a
gh-105979: Fix exception handling in `unmarshal_frozen_code` (`Python/import.c`) ( #105980 )
2023-06-22 21:30:19 +00:00
Pablo Galindo Salgado
13237a2da8
gh-98931: Add custom error messages to invalid import/from with multiple targets ( #105985 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-22 15:56:40 +00:00
Barney Gale
a8006706f7
GH-89812: Add `pathlib.UnsupportedOperation` (GH-105926)
...
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()`.
2023-06-22 14:35:51 +01:00
Mark Shannon
04492cbc9a
GH-91095: Specialize calls to normal Python classes. (GH-99331)
2023-06-22 09:48:19 +01:00
Victor Stinner
9c44656feb
gh-105927: Add PyWeakref_GetRef() function ( #105932 )
...
Add tests on PyWeakref_NewRef(), PyWeakref_GetObject(),
PyWeakref_GET_OBJECT() and PyWeakref_GetRef().
2023-06-21 11:40:09 +02:00
Lysandros Nikolaou
6e40ee6e84
gh-105915: Fix SyntaxWarning becoming a SyntaxError with -We in test_fstring ( #105943 )
2023-06-20 16:13:07 +02:00
Lysandros Nikolaou
4b431d2e90
gh-105915: Add 'r' prefix to not emit SyntaxWarning in test_fstring ( #105940 )
...
Co-authored-by: @sunmy2019
2023-06-20 14:49:00 +02:00
Lysandros Nikolaou
6586cee27f
gh-105938: Emit a SyntaxWarning for escaped braces in an f-string ( #105939 )
2023-06-20 12:38:46 +00:00
Victor Stinner
03f1a132ee
gh-105922: Add PyImport_AddModuleRef() function ( #105923 )
...
* Add tests on PyImport_AddModuleRef(), PyImport_AddModule() and
PyImport_AddModuleObject().
* pythonrun.c: Replace Py_XNewRef(PyImport_AddModule(name)) with
PyImport_AddModuleRef(name).
2023-06-20 08:48:14 +02:00
Irit Katriel
33f0a8578b
gh-105481: generate _specializations and _specialized_instructions from bytecodes.c ( #105913 )
2023-06-19 23:47:04 +01:00
Crowthebird
28187a9c4f
gh-105908: fix `barry_as_FLUFL` future import ( #105909 )
2023-06-19 22:50:57 +01:00
T. Wouters
1858db7cbd
GH-105808: Fix a regression introduced in GH-101251 ( #105910 )
...
Fix a regression introduced in pythonGH-101251, causing GzipFile.flush() to
not flush the compressor (nor pass along the zip_mode argument).
2023-06-19 17:09:04 +00:00
Lysandros Nikolaou
ab3823a97b
gh-71299: Fix __all__ in tokenize ( #105907 )
...
Co-authored-by: Unit03
2023-06-19 13:31:57 +02:00
Mark Shannon
581619941e
GH-104584: Assorted fixes for the optimizer API. (GH-105683)
...
* Add test for long loops
* Clear ENTER_EXECUTOR when deopting code objects.
2023-06-19 10:32:20 +01:00
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
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
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
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
Nikita Sobolev
1af8251d9e
gh-105433: Add `pickle` tests for PEP695 ( #105443 )
2023-06-15 17:58:40 -07: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
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 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 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
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
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
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
Mark Shannon
1d857da7f0
GH-77273: Better bytecodes for f-strings (GH-6132)
2023-06-14 16:15:08 +01:00