aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test
Commit message (Collapse)AuthorAge
* bpo-40280: Skip more tests/features that don't apply to Emscripten (GH-31791)Christian Heimes2022-03-10
| | | | | | | - fd inheritance can't be modified because Emscripten doesn't support subprocesses anyway. - setpriority always fails - geteuid no longer causes problems with latest emsdk - umask is a stub - geteuid / getuid always return 0, but process cannot chown to random uid.
* bpo-45138: Revert GH-28240: Expand traced SQL statements (GH-31788)Erlend Egeberg Aasland2022-03-09
| | | | | This reverts commit d1777515f9f53b452a4231d68196a7c0e5deb879. Automerge-Triggered-By: GH:JelleZijlstra
* bpo-46245: Add optional parameter dir_fd in shutil.rmtree() (GH-30365)Serhiy Storchaka2022-03-09
|
* bpo-45138: Expand traced SQL statements in `sqlite3` trace callback (GH-28240)Erlend Egeberg Aasland2022-03-08
|
* bpo-40280: Skip dysfunctional pipe tests on Emscripten (GH-31770)Christian Heimes2022-03-08
|
* bpo-40280: Block more non-working syscalls in Emscripten (GH-31757)Christian Heimes2022-03-08
| | | | | | | | | - getgroups always fails. - geteuid and getegid always return 0 (root), which confuse tarfile and tests. - hardlinks (link, linkat) always fails. - non-encodable file names are not supported by NODERAWFS layer. - mark more tests with dependency on subprocess and multiprocessing. Mocking does not work if the module fails to import.
* bpo-44439: _ZipWriteFile.write() handle buffer protocol correctly (GH-29468)Ma Lin2022-03-08
| | | | Co-authored-by: Marco Ribeiro <marcoffee@users.noreply.github.com>
* bpo-40059: Add tomllib (PEP-680) (GH-31498)Taneli Hukkinen2022-03-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new standard library module, `tomllib`, for parsing TOML. The implementation is based on Tomli (https://github.com/hukkin/tomli). ## Steps taken (converting `tomli` to `tomllib`) - Move everything in `tomli:src/tomli` to `Lib/tomllib`. Exclude `py.typed`. - Remove `__version__ = ...` line from `Lib/tomllib/__init__.py` - Move everything in `tomli:tests` to `Lib/test/test_tomllib`. Exclude the following test data dirs recursively: - `tomli:tests/data/invalid/_external/` - `tomli:tests/data/valid/_external/` - Create `Lib/test/test_tomllib/__main__.py`: ```python import unittest from . import load_tests unittest.main() ``` - Add the following to `Lib/test/test_tomllib/__init__.py`: ```python import os from test.support import load_package_tests def load_tests(*args): return load_package_tests(os.path.dirname(__file__), *args) ``` Also change `import tomli as tomllib` to `import tomllib`. - In `cpython/Lib/tomllib/_parser.py` replace `__fp` with `fp` and `__s` with `s`. Add the `/` to `load` and `loads` function signatures. - Run `make regen-stdlib-module-names` - Create `Doc/library/tomllib.rst` and reference it in `Doc/library/fileformats.rst`
* bpo-43224: Implement PEP 646 changes to typing.py (GH-31021)Matthew Rahtz2022-03-07
| | | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* bpo-46170: Improve the error message when subclassing NewType (GH-30268)James Hilton-Balfe2022-03-07
| | | | | Co-authored-by: Alex Waygood <alex.waygood@gmail.com> Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
* bpo-46841: Use inline caching for calls (GH-31709)Brandt Bucher2022-03-07
|
* bpo-41370: Evaluate strings as forward refs in PEP 585 generics (GH-30900)Niklas Rosenstein2022-03-07
| | | | | | This removes discrepancy between list["int"] and List["int"]. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* bpo-46933: Make pwd module optional (GH-31700)Christian Heimes2022-03-07
| | | Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-46940: Don't override existing AttributeError suggestion information ↵Pablo Galindo Salgado2022-03-07
| | | | | | | | | | | | (GH-31710) When an exception is created in a nested call to PyObject_GetAttr, any external calls will override the context information of the AttributeError that we have already placed in the most internal call. This will cause the suggestions we create to nor work properly as the attribute name and object that we will be using are the incorrect ones. To avoid this, we need to check first if these attributes are already set and bail out if that's the case.
* bpo-43292: Fix file leak in `ET.iterparse()` when not exhausted (GH-31696)Jacob Walls2022-03-07
| | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Use assertEqual, not assertEquals, in test_unicode (GH-31718)Dennis Sweeney2022-03-07
| | | Fixes a DeprecationWarning
* bpo-14156: Make argparse.FileType work correctly for binary file modes when ↵MojoVampire2022-03-06
| | | | | | | argument is '-' (GH-13165) Also made modes containing 'a' or 'x' act the same as a mode containing 'w' when argument is '-' (so 'a'/'x' return sys.stdout like 'w', and 'ab'/'xb' return sys.stdout.buffer like 'wb').
* bpo-46921: Vectorcall support for `super()` (GH-31687)Ken Jin2022-03-06
| | | Co-Authored-By: Dong-hee Na <donghee.na@python.org>
* Remove trailing spaces (GH-31695)Serhiy Storchaka2022-03-05
|
* bpo-46927: Include the type's name in the error message for subscripting ↵Serhiy Storchaka2022-03-05
| | | | non-generic types (GH-31694)
* bpo-46903: Handle str-subclasses in virtual instance dictionaries. (GH-31658)Mark Shannon2022-03-04
|
* bpo-46913: test_hashlib skips _sha3 tests on UBSan (GH-31673)Victor Stinner2022-03-04
| | | | | | | If Python is built with UBSan, test_hashlib skips tests on the _sha3 extension which currently has undefined behaviors. This change allows to run test_hashlib to check for new UBSan regression, but the known _sha3 undefined behavior must be fixed.
* bpo-46841: Use inline caching for attribute accesses (GH-31640)Brandt Bucher2022-03-03
|
* bpo-46874: Speed up sqlite3 user-defined aggregate 'step' method (GH-31604)Erlend Egeberg Aasland2022-03-03
|
* bpo-46891: Fix creating a new instance of a module subclass with slots ↵Mark Shannon2022-03-03
| | | | (GH-31643)
* Fix EncodingWarning in libregrtest (GH-31654)Inada Naoki2022-03-03
|
* bpo-40116: dict: Add regression test for iteration order. (GH-31550)Inada Naoki2022-03-03
|
* bpo-46643: Fix stringized P.args/P.kwargs with get_type_hints (GH-31238)Gregory Beauregard2022-03-02
|
* bpo-46195: Do not add `Optional` in `get_type_hints` (GH-30304)Nikita Sobolev2022-03-01
| | | | Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* bpo-46845: Reduce dict size when all keys are Unicode (GH-31564)Inada Naoki2022-03-02
|
* bpo-46841: Use inline cache for `BINARY_SUBSCR`. (GH-31618)Mark Shannon2022-03-01
|
* bpo-46633: Skip tests on ASAN and/or MSAN builds (GH-31632)Victor Stinner2022-03-01
| | | | | | | | | | | | Skip tests on ASAN and/or MSAN builds: * multiprocessing tests * test___all__ * test_concurrent_futures * test_decimal * test_peg_generator * test_tools The ASAN job of GitHub Actions no longer excludes these tests.
* bpo-46841: Use inline caching for `COMPARE_OP` (GH-31622)Brandt Bucher2022-03-01
|
* bpo-46771: Remove two controversial lines from Task.cancel() (GH-31623)Guido van Rossum2022-02-28
| | | | | | | | | | | | | | | Also from the _asyncio C accelerator module, and adjust one test that the change caused to fail. For more discussion see the discussion starting here: https://github.com/python/cpython/pull/31394#issuecomment-1053545331 (Basically, @asvetlov proposed to return False from cancel() when there is already a pending cancellation, and I went along, even though it wasn't necessary for the task group implementation, and @agronholm has come up with a counterexample that fails because of this change. So now I'm changing it back to the old semantics (but still bumping the counter) until we can have a proper discussion about this.)
* bpo-46841: Move the cache for `LOAD_GLOBAL` inline. (GH-31575)Mark Shannon2022-02-28
|
* bpo-46786: Make ElementTree write the HTML tags embed, source, track, wbr as ↵Jannis Vajen2022-02-27
| | | | | | empty tags (GH-31406) See https://html.spec.whatwg.org/multipage/syntax.html#void-elements for reference.
* bpo-46852: Restore test_getformat() test (GH-31601)Victor Stinner2022-02-27
|
* bpo-46857: Fix refleak in OSError INIT_ALIAS() (GH-31594)Victor Stinner2022-02-27
| | | _Py_GetRefTotal() no longer decrements _PySet_Dummy refcount.
* Taskgroup tweaks (GH-31559)Tin Tvrtković2022-02-26
| | | Now uses .cancel()/.uncancel(), for even fewer broken edge cases.
* bpo-45735: Promise the long-time truth that `args=list` works (GH-30982)Charlie Zhao2022-02-25
| | | | | | For threads, and for multiprocessing, it's always been the case that ``args=list`` works fine when passed to ``Process()`` or ``Thread()``, and such code is common in the wild. But, according to the docs, only a tuple can be used. This brings the docs into synch with reality. Doc changes by Charlie Zhao. Co-authored-by: Tim Peters <tim.peters@gmail.com>
* bpo-46852: Remove the float.__set_format__() method (GH-31585)Victor Stinner2022-02-26
| | | | | | Remove the undocumented private float.__set_format__() method, previously known as float.__set_format__() in Python 3.7. Its docstring said: "You probably don't want to use this function. It exists mainly to be used in Python's test suite."
* bpo-46857: Fix test_embed.test_no_memleak() on Windows (GH-31589)Victor Stinner2022-02-25
| | | Tolerate a leak of 1 reference and 1 memory block until it's fixed.
* bpo-46841: Use *inline* caching for `BINARY_OP` (GH-31543)Brandt Bucher2022-02-25
|
* bpo-46756: Fix authorization check in urllib.request (GH-31353)Serhiy Storchaka2022-02-25
| | | | | | Fix a bug in urllib.request.HTTPPasswordMgr.find_user_password() and urllib.request.HTTPPasswordMgrWithPriorAuth.is_authenticated() which allowed to bypass authorization. For example, access to URI "example.org/foobar" was allowed if the user was authorized for URI "example.org/foo".
* bpo-46820: Refactor tests for ambiguous end of numerical literal (GH-31494)Serhiy Storchaka2022-02-25
|
* bpo-46623: Skip two test_zlib tests on s390x (GH-31096)Victor Stinner2022-02-25
| | | | Skip test_pair() and test_speech128() of test_zlib on s390x since they fail if zlib uses the s390x hardware accelerator.
* bpo-1635741: test_embed cheks that Python does not leak (GH-31555)Victor Stinner2022-02-25
|
* bpo-46757: Add a test to verify dataclass's __post_init__ isn't being ↵Eric V. Smith2022-02-23
| | | | automatically added. (GH-31523)
* Inherit asyncio proactor datagram transport from asyncio.DatagramTransport ↵Andrew Svetlov2022-02-23
| | | | (#31512)
* bpo-46659: Deprecate locale.getdefaultlocale() (GH-31206)Victor Stinner2022-02-22
| | | | | | The locale.getdefaultlocale() function is deprecated and will be removed in Python 3.13. Use locale.setlocale(), locale.getpreferredencoding(False) and locale.getlocale() functions instead.