summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* bpo-33189: pygettext.py now accepts only literal strings (GH-6364)Serhiy Storchaka2018-04-191-6/+65
| | | | as docstrings and translatable strings, and rejects bytes literals and f-string expressions.
* bpo-33308: Fix a crash in the parser module when convert an ST object. (#6519)Serhiy Storchaka2018-04-181-7/+22
| | | | Converting with line_info=False and col_info=True crashed before.
* bpo-33295: Skip test using missing external site (GH-6504)INADA Naoki2018-04-171-0/+1
| | | | | `test_urllib2net.OtherNetworkTests.test_sites_no_connection_close` used `http://www.imdb.com/` but it is moved to https so the test is not valid anymore. Skip test for the moment to allow CI to proceed.
* bpo-33144: random.Random and subclasses: split _randbelow implementation ↵Wolfgang Maier2018-04-171-15/+65
| | | | (GH-6291)
* Fix spelling typo (GH-6443)jdemeyer2018-04-171-1/+1
|
* bpo-33185: Improve wording and markup (GH-6477)Nick Coghlan2018-04-151-1/+1
| | | | | | Adds some working and markup fixes that I missed in the initial commit for this issue. (Follow-up to GH-6419)
* bpo-33185: Fix regression in pydoc CLI sys.path handling (GH-6419)Nick Coghlan2018-04-151-0/+67
| | | | | | | | | | The pydoc CLI assumed -m pydoc would add the empty string to sys.path, and hence got confused when it switched to adding the full initial working directory instead. This refactors the pydoc CLI path manipulation to be more testable, and ensures it won't accidentally remove the standard library directory containing pydoc itself from sys.path.
* bpo-33176: Add a toreadonly() method to memoryviews. (GH-6466)Antoine Pitrou2018-04-142-16/+34
|
* bpo-33097: Fix submit accepting callable after executor shutdown by ↵Mark Nemec2018-04-101-0/+28
| | | | | | interpreter exit (GH-6144) Executors in concurrent.futures accepted tasks after executor was shutdown by interpreter exit. Tasks were left in PENDING state forever. This fix changes submit to instead raise a RuntimeError.
* bpo-31920: Fixed handling directories as arguments in the ``pygettext`` ↵Serhiy Storchaka2018-04-091-1/+25
| | | | | script. (GH-6259) Based on patch by Oleg Krasnikov.
* bpo-32759: Free unused arenas in multiprocessing.heap (GH-5827)Antoine Pitrou2018-04-091-23/+58
| | | | | Large shared arrays allocated using multiprocessing would remain allocated until the process ends.
* Add a prepend() recipe to teach a chain() idiom (GH-6415)Raymond Hettinger2018-04-081-0/+8
|
* bpo-29613: Added support for SameSite cookies (GH-6413)Alex Gaynor2018-04-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bpo-29613: Added support for SameSite cookies Implemented as per draft https://tools.ietf.org/html/draft-west-first-party-cookies-07 * Documented SameSite And suggestions by members. * Missing space :( * Updated News and contributors * Added version changed details. * Fix in documentation * fix in documentation * Clubbed test cases for same attribute into single. * Updates * Style nits + expand tests * review feedback
* bpo-33169: Remove values of `None` from sys.path_importer_cache when ↵Brett Cannon2018-04-062-1/+22
| | | | | invalidating caches (GH-6402) An entry of None in sys.path_importer_cache represents a negative/missing finder for a path, so clearing it out makes sense.
* bpo-33224: PEP 479 fix for difflib.mdiff() (GH-6381)Raymond Hettinger2018-04-051-0/+8
|
* bpo-33203: Ensure random.choice always raises IndexError on empty sequence ↵Wolfgang Maier2018-04-051-1/+4
| | | | | | (GH-6338)
* Clean up and enhance frozen dataclass tests. (GH-6380)Eric V. Smith2018-04-051-27/+38
| | | | | * Add a test for frozen with unhashable field value. * Improve a comment.
* bpo-32873: Remove a name hack for generic aliases in typing module (GH-6376)Ivan Levkivskyi2018-04-051-2/+3
| | | | This removes a hack and replaces it with a proper mapping {'list': 'List', 'dict': 'Dict', ...}.
* Call super in Generic.__init_subclass__ (#6356)Ivan Levkivskyi2018-04-041-0/+19
|
* bpo-29922: Add more tests for error messages in 'async with'. (GH-6370)Serhiy Storchaka2018-04-041-1/+41
| | | | Different paths are executed for normal exit and for leaving the 'async with' block with 'break', 'continue' or 'return'.
* bpo-33209: End framing at the end of C implementation of ↵Serhiy Storchaka2018-04-031-17/+18
| | | | pickle.Pickler.dump(). (GH-6363)
* bpo-29922: Improve error messages in 'async with' (GH-6352)Serhiy Storchaka2018-04-021-4/+9
| | | when __aenter__() or __aexit__() return non-awaitable object.
* Allow dynamic creation of generic dataclasses (GH-6319)Ivan Levkivskyi2018-03-311-1/+18
|
* bpo-33175: dataclasses should look up __set_name__ on class, not instance ↵Eric V. Smith2018-03-291-5/+34
| | | | (GH-6305)
* bpo-32872: Avoid regrtest compatibility issue with namespace packages. (GH-6276)Ned Deily2018-03-281-1/+1
|
* bpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037) ↵Ned Deily2018-03-271-1/+1
| | | | | | | | | | | | (GH-6113) test_asyncio hangs indefinitely on macOS 10.13.2+ on `read_pty_output()` using the KqueueSelector. Closing `proto.transport` (as is done in `write_pty_output()`) seems to fix it. (cherry picked from commit 12f74d8608c15cacd9d5786524e2be9ca36f007e) Co-authored-by: Nathan Henrie <n8henrie@users.noreply.github.com> Also, re-enable test_read_pty_output on macOS.
* bpo-33151: Handle submodule resources (GH-6268)Barry Warsaw2018-03-272-3/+32
|
* bpo-27212: Modify islice recipe to consume initial values preceding start ↵Cheryl Sabella2018-03-271-0/+67
| | | | (GH-6195)
* bpo-32873: Treat type variables and special typing forms as immutable by ↵Ivan Levkivskyi2018-03-261-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | copy and pickle (GH-6216) This also fixes python/typing#512 This also fixes python/typing#511 As was discussed in both issues, some typing forms deserve to be treated as immutable by copy and pickle modules, so that: * copy(X) is X * deepcopy(X) is X * loads(dumps(X)) is X # pickled by reference This PR adds such behaviour to: * Type variables * Special forms like Union, Any, ClassVar * Unsubscripted generic aliases to containers like List, Mapping, Iterable This not only resolves inconsistencies mentioned in the issues, but also improves backwards compatibility with previous versions of Python (including 3.6). Note that this requires some dances with __module__ for type variables (similar to NamedTuple) because the class TypeVar itself is define in typing, while type variables should get module where they were defined. https://bugs.python.org/issue32873
* bpo-32844: Fix a subprocess misredirection of a low fd (GH5689)Alexey Izbyshev2018-03-261-0/+50
| | | | | | | | | | bpo-32844: subprocess: Fix a potential misredirection of a low fd to stderr. When redirecting, subprocess attempts to achieve the following state: each fd to be redirected to is less than or equal to the fd it is redirected from, which is necessary because redirection occurs in the ascending order of destination descriptors. It fails to do so in a couple of corner cases, for example, if 1 is redirected to 2 and 0 is closed in the parent.
* bpo-33141: Have dataclasses.Field pass through __set_name__ to any default ↵Eric V. Smith2018-03-261-0/+42
| | | | | argument. (GH-6260) This is part of PEP 487 and the descriptor protocol.
* bpo-6986: Add a comment to clarify a test of _json.make_encoder(). (GH-3789)Oren Milman2018-03-261-0/+2
|
* Minor fixes to dataclass tests. (GH-6243)Eric V. Smith2018-03-261-42/+41
| | | Also, re-enable a test for ClassVars with default_factory.
* bpo-33053: Remove test_cmd_line_script debugging print (GH-6237)Nick Coghlan2018-03-251-2/+0
| | | | I noticed this had slipped into the original commit when resolving a merge conflict for the backport to 3.7.
* Trivial improvements to dataclasses tests. (GH-6234)Eric V. Smith2018-03-251-2/+3
|
* bpo-33053: -m now adds *starting* directory to sys.path (GH-6231)Nick Coghlan2018-03-255-67/+70
| | | | | | | | | | | | Historically, -m added the empty string as sys.path zero, meaning it resolved imports against the current working directory, the same way -c and the interactive prompt do. This changes the sys.path initialisation to add the *starting* working directory as sys.path[0] instead, such that changes to the working directory while the program is running will have no effect on imports when using the -m switch.
* bpo-33042: Fix pre-initialization sys module configuration (GH-6157)Nick Coghlan2018-03-251-5/+26
| | | | | | | | | - new test case for pre-initialization of sys.warnoptions and sys._xoptions - restored ability to call these APIs prior to Py_Initialize - updated the docs for the affected APIs to make it clear they can be called before Py_Initialize - also enhanced the existing embedding test cases to check for expected settings in the sys module
* bpo-33136: Harden ssl module against CVE-2018-8970 (GH-6229)Christian Heimes2018-03-251-0/+3
| | | | | | | Harden ssl module against LibreSSL CVE-2018-8970. X509_VERIFY_PARAM_set1_host() is called with an explicit namelen. A new test ensures that NULL bytes are not allowed. Signed-off-by: Christian Heimes <christian@python.org>
* Fix invalid escape sequence: use raw string. (GH-6225)Eric V. Smith2018-03-251-1/+1
|
* bpo-32932: More revealing error message when non-str objects in __all__ ↵Xiang Zhang2018-03-241-0/+21
| | | | (GH-5848)
* bpo-30953: Improve error messages and add tests for jumping (GH-6196)Serhiy Storchaka2018-03-231-6/+64
| | | | into/out of an except block.
* bpo-33041: Rework compiling an "async for" loop. (#6142)Serhiy Storchaka2018-03-233-2/+86
| | | | | | | | * Added new opcode END_ASYNC_FOR. * Setting global StopAsyncIteration no longer breaks "async for" loops. * Jumping into an "async for" loop is now disabled. * Jumping out of an "async for" loop no longer corrupts the stack. * Simplify the compiler.
* bpo-32505: dataclasses: raise TypeError if a member variable is of type ↵Eric V. Smith2018-03-221-0/+43
| | | | | Field, but doesn't have a type annotation. (GH-6192) If a dataclass has a member variable that's of type Field, but it doesn't have a type annotation, raise TypeError.
* Add 'Field' to dataclasses.__all__. (GH-6182)Eric V. Smith2018-03-211-4/+5
| | | | - Add missing 'Field' to __all__. - Improve tests to catch this.
* FIX failure on OSX sem_getvalue (#6180)Thomas Moreau2018-03-211-2/+7
|
* bpo-33078 - Fix queue size on pickling error (GH-6119)Thomas Moreau2018-03-211-0/+13
|
* bpo-32896: Fix error when subclassing a dataclass with a field that uses a ↵Eric V. Smith2018-03-211-0/+49
| | | | | default_factory (GH-6170) Fix the way that new annotations in a class are detected.
* bpo-27683: Fix a regression for host() of ipaddress network objects (GH-6016)Xiang Zhang2018-03-211-3/+23
| | | | | | The result of host() was not empty when the network is constructed by a tuple containing an integer mask and only 1 bit left for addresses.
* bpo-18802: Add more details to ipaddress documentation (GH-6083)Cheryl Sabella2018-03-211-0/+3
| | | | Original patch by Jon Foster and Berker Peksag.
* bpo-33034: Improve exception message when cast fails for ↵Matt Eaton2018-03-201-0/+10
| | | | {Parse,Split}Result.port (GH-6078)