summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* gh-95754: Better AttributeError on partially initialised module (#112577)Shantanu2023-12-212-0/+11
| | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-113174: Sync with importlib_metadata 7.0 (#113175)Jason R. Coombs2023-12-213-56/+106
| | | | | | | | | | | | | | | | | | | | | | | * Sync with importlib_metadata 7.0.0 * Add blurb * Update docs to reflect changes. * Link datamodel docs for object.__getitem__ Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> * Add what's new for removed __getattr__ * Link datamodel docs for object.__getitem__ Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> * Add exclamation point, as that seems to be used for other classes. --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-113325: Remove a debugging print accidentally left in test_symtable ↵Serhiy Storchaka2023-12-211-1/+0
| | | | (GH-113368)
* gh-87277: Don't look for X11 browsers on macOS in webbrowser (#24480)Ronald Oussoren2023-12-211-0/+11
| | | | | | | | The installation of XQuartz on macOS will unconditionally set the $DISPLAY variable. The X11 server will be launched when a program tries to access the display. This results in launching the X11 server when using the webbrowser module, even though X11 browsers won't be used in practice.
* GH-111485: Delete the old generator code. (GH-113321)Mark Shannon2023-12-211-46/+31
|
* gh-113336: Remove the 'version' directive from Argument Clinic (#113341)Erlend E. Aasland2023-12-211-65/+0
| | | | | The 'version' directive was introduced with gh-63929 in Nov 2013. It has not been in use in the CPython code base, and the 'version' variable has never been bumped.
* GH-113214: Fix SSLProto exception handling in SSL-over-SSL scenarios (#113334)Martijn Pieters2023-12-201-1/+14
| | | | | | When wrapped, `_SSLProtocolTransport._force_close(exc)` is called just like in the unwrapped scenario `_SelectorTransport._force_close(exc)` or `_ProactorBasePipeTransport._force_close(exc)` would be called, except here the exception needs to be passed through the `SSLProtocol._abort()` method, which didn't accept an exception object. This commit ensures that this path works, in the same way that the uvloop implementation of SSLProto passes on the exception (on which the current implementation of SSLProto is based).
* GH-111485: Generate instruction and uop metadata (GH-113287)Mark Shannon2023-12-201-2/+3
|
* gh-112205: Support docstring for `@getter` (#113160)Donghee Na2023-12-202-5/+30
| | | | | --------- Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-87264: Convert tarinfo type to stat type (GH-113230)Marat Idrisov2023-12-191-4/+16
| | | Co-authored-by: val-shkolnikov <val@nvsoft.net>
* gh-112205: Require @getter and @setter to be methods (#113278)Erlend E. Aasland2023-12-191-0/+11
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-113054: Compiler no longer replaces a redundant jump with no line number ↵Irit Katriel2023-12-191-0/+4
| | | | by a NOP (#113139)
* gh-113199: Make read1() and readline() of HTTPResponse close IO after ↵Illia Volochii2023-12-181-2/+14
| | | | reading all data (GH-113200)
* GH-111485: Break up instructions with unused cache entries into component ↵Mark Shannon2023-12-181-0/+4
| | | | micro-ops (GH-113169)
* GH-111485: Test the new cases generator (GH-113252)Mark Shannon2023-12-181-50/+64
|
* gh-113117: Support posix_spawn in subprocess.Popen with close_fds=True (#113118)Jakub Kulík2023-12-171-0/+5
| | | | | | | | Add support for `os.POSIX_SPAWN_CLOSEFROM` and `posix_spawn_file_actions_addclosefrom_np` and have the `subprocess` module use them when available. This means `posix_spawn` can now be used in the default `close_fds=True` situation on many platforms. Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
* gh-113149: Improve error message when JSON has trailing comma (GH-113227)Carson Radtke2023-12-171-3/+5
|
* GH-110109: pathlib tests: store base directory as test class attribute (#113221)Barney Gale2023-12-172-222/+210
| | | | | | | | | Store the test base directory as a class attribute named `base` rather than module constants named `BASE`. The base directory is a local file path, and therefore not ideally suited to the pathlib ABC tests. In a future commit we'll change its value in `test_pathlib_abc.py` such that it points to a totally fictitious path, which will help to ensure we're not touching the local filesystem.
* GH-110109: Move tests for pathlib ABCs to new module. (#112904)Barney Gale2023-12-163-1893/+1926
|
* gh-113202: Add a strict option to itertools.batched() (gh-113203)Raymond Hettinger2023-12-161-0/+4
|
* gh-67790: Support basic formatting for Fraction (#111320)Mark Dickinson2023-12-161-5/+47
| | | | | | | | | | | PR #100161 added fancy float-style formatting for the Fraction type, but left us in a state where basic formatting for fractions (alignment, fill, minimum width, thousands separators) still wasn't supported. This PR adds that support. --------- Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* GH-112383: Fix test_loop_quicken when an executor is installed (GH-113153)Brandt Bucher2023-12-151-2/+7
|
* [CVE-2023-27043] gh-102988: Reject malformed addresses in email.parseaddr() ↵Victor Stinner2023-12-151-8/+179
| | | | | | | | | | (#111116) Detect email address parsing errors and return empty tuple to indicate the parsing error (old API). Add an optional 'strict' parameter to getaddresses() and parseaddr() functions. Patch by Thomas Dwyer. Co-Authored-By: Thomas Dwyer <github@tomd.tel>
* gh-112278: Add retry in WMI tests in case of slow initialization (GH-113154)AN Long2023-12-151-7/+19
|
* gh-61648: Detect line numbers of properties in doctests (GH-113161)Serhiy Storchaka2023-12-152-0/+18
|
* gh-112720: Move dis's cache output code to the Formatter, labels lookup to ↵Irit Katriel2023-12-151-4/+13
| | | | the arg_resolver. Reduce the number of parameters passed around. (#113108)
* gh-112716: Fix SystemError when __builtins__ is not a dict (GH-112770)Serhiy Storchaka2023-12-141-0/+26
| | | | | | It was raised in two cases: * in the import statement when looking up __import__ * in pickling some builtin type when looking up built-ins iter, getattr, etc.
* gh-59616: Support os.chmod(follow_symlinks=True) and os.lchmod() on Windows ↵Serhiy Storchaka2023-12-141-2/+2
| | | | (GH-113049)
* gh-113090: Fix test.support.os_support.can_chmod() on Windows (GH-113091)Serhiy Storchaka2023-12-144-6/+12
|
* gh-111049: Fix crash during garbage collection of the BytesIO buffer object ↵Serhiy Storchaka2023-12-141-0/+21
| | | | (GH-111221)
* gh-113086: Add tests for os.chmod() and os.lchmod() (GH-113087)Serhiy Storchaka2023-12-142-1/+118
| | | Also make test_copymode_symlink_to_symlink in test_shutil more strict.
* gh-86179: Implement realpath() on Windows for getpath.py calculations ↵Steve Dower2023-12-131-1/+22
| | | | (GH-113033)
* Move optimizer/executor tests to new file test_capi/test_opt.py (#113072)Guido van Rossum2023-12-132-535/+544
|
* bpo-40648: Test modes that file can get with chmod() on Windows (GH-20130)Pavol Babinčák‏2023-12-131-0/+7
| | | | | Order of tests matter second part makes testing file writable and possible to remove again.
* gh-110190: Fix ctypes structs with array on PPCLE64 (GH-112959)Diego Russo2023-12-131-148/+84
| | | | | Fix the same issue of PR #112604 on PPC64LE platform Refactor tests to make easier to add more platfroms if needed.
* gh-111650: Ensure pyconfig.h includes Py_GIL_DISABLED on Windows (GH-112778)Steve Dower2023-12-132-9/+17
|
* gh-112205: Support `@setter` annotation from AC (gh-112922)Donghee Na2023-12-132-3/+83
| | | | | | --------- Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-112962: in dis module, put cache information in the Instruction instead ↵Irit Katriel2023-12-134-13/+53
| | | | of creating fake Instructions to represent it (#113016)
* gh-76785: Avoid Pickled TracebackException for Propagated Subinterpreter ↵Eric Snow2023-12-131-1/+1
| | | | | Exceptions (gh-113036) We need the TracebackException of uncaught exceptions for a single purpose: the error display. Thus we only need to pass the formatted error display between interpreters. Passing a pickled TracebackException is overkill.
* gh-76785: Show the Traceback for Uncaught Subinterpreter Exceptions (gh-113034)Eric Snow2023-12-133-4/+143
| | | When an exception is uncaught in Interpreter.exec_sync(), it helps to show that exception's error display if uncaught in the calling interpreter. We do so here by generating a TracebackException in the subinterpreter and passing it between interpreters using pickle.
* gh-112320: Implement on-trace confidence tracking for branches (#112321)Guido van Rossum2023-12-121-0/+31
| | | We track the confidence as a scaled int.
* gh-76785: Add Interpreter.prepare_main() (gh-113021)Eric Snow2023-12-125-17/+90
| | | This is one of the last pieces to get test.support.interpreters in sync with PEP 734.
* gh-76785: More Fixes for test.support.interpreters (gh-113012)Eric Snow2023-12-122-86/+168
| | | This brings the module (along with the associated extension modules) mostly in sync with PEP 734. There are only a few small things to wrap up.
* gh-76785: Fix test_threading on Non-Subinterpreter Builds (gh-113014)Eric Snow2023-12-121-1/+1
| | | gh-112982 broke test_threading on one of the s390 buildbots (Fedora Clang Installed). Apparently ImportError is raised (rather than ModuleNotFoundError) for the name part of "from" imports. This fixes that by catching ImportError in test_threading.py.
* gh-76785: Fixes for test.support.interpreters (gh-112982)Eric Snow2023-12-1219-1333/+2005
| | | This involves a number of changes for PEP 734.
* gh-112532: Require mimalloc in `--disable-gil` builds (gh-112883)Sam Gross2023-12-125-9/+34
|
* GH-83162: Rename re.error for better clarity. (#101677)achhina2023-12-111-22/+25
| | | | | | | | | Renamed re.error for clarity, and kept re.error for backward compatibility. Updated idlelib files at TJR's request. --------- Co-authored-by: Matthias Bussonnier <mbussonnier@ucmerced.edu> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-108303: Move `double_const` to `test_import` where it belongs (#112108)Nikita Sobolev2023-12-112-3/+6
|
* gh-94606: Fix error when message with Unicode surrogate not surrogateescaped ↵Sidney Markowitz2023-12-111-0/+29
| | | | | string (GH-94641) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Fix SyntaxWarning in test_syntax.py (GH-112944)Anthony Sottile2023-12-111-1/+1
|