summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-32602: Test ECDSA certs (#5247)Christian Heimes2018-01-2021-440/+1049
| | | | | | | | Add test certs and test for ECDSA cert and EC/RSA dual mode. I'm also adding certs for IDNA 2003/2008 tests and simplify some test data handling. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-32598: Use autoconf to detect usable OpenSSL (#5242)Christian Heimes2018-01-209-83/+585
| | | | | | | | | | | | | | Add https://www.gnu.org/software/autoconf-archive/ax_check_openssl.html to auto-detect compiler flags, linker flags and libraries to compile OpenSSL extensions. The M4 macro uses pkg-config and falls back to manual detection. Add autoconf magic to detect usable X509_VERIFY_PARAM_set1_host() and related functions. Refactor setup.py to use new config vars to compile _ssl and _hashlib modules. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-32226: PEP 560: improve typing module (#4906)Ivan Levkivskyi2018-01-205-1626/+757
| | | | This PR re-designs the internal typing API using the new PEP 560 features. However, there are only few minor changes in the public API.
* bpo-32028: Fix suggestions for indented print statements (GH-4688)Sanyam Khurana2018-01-203-5/+23
| | | | | | | The suggested replacement for print statements previously failed to account for leading whitespace and hence could end up including unwanted text in the proposed call to the print builtin. Patch by Sanyam Khurana.
* bpo-32596: Lazy import concurrent.futures.process and thread (GH-5241)INADA Naoki2018-01-202-2/+37
|
* bpo-25910: Link redirections in docs (#1933)Sanyam Khurana2018-01-2037-63/+61
| | | Fixes some redirection links in docs.
* bpo-32410: Make SendfileNotAvailableError exception public (#5243)Andrew Svetlov2018-01-196-25/+42
|
* bpo-32588: Move _findvs into its own module and add missing _queue module to ↵Steve Dower2018-01-1811-23/+132
| | | | installer (#5227)
* Removed unnecesssary bit inversion which doesn't improve dispersion ↵Raymond Hettinger2018-01-181-1/+1
| | | | statistics (#5235)
* bpo-9566: Fix size_t=>int downcast warnings (#5230)Victor Stinner2018-01-185-14/+14
| | | | * Use wider types (int => Py_ssize_t) to avoid integer overflows. * Fix gc.get_freeze_count(): use Py_ssize_t type rather than int, since gc_list_size() returns a Py_ssize_t.
* bpo-32576: use queue.SimpleQueue in critical places (#5216)Antoine Pitrou2018-01-183-9/+14
| | | | Where a queue may be invoked from a weakref callback, we need to use the reentrant SimpleQueue.
* Fix typo in thread_nt.h code comment (GH-5211)hui shang2018-01-171-1/+1
| | | | The comment for PyThread_allocate_lock says "It has too be implemented ...". There was an extra "o" in ".. to be implemented.."
* Use assertCountEqual instead of assertEqual. (#5223)Gregory P. Smith2018-01-171-3/+3
| | | | This test doesn't care about order, the underlying filesystem APIs do not guarantee directory listings on subsequent calls will be in the same order.
* bpo-32226: Fix memory leak in generic_alias_dealloc() (#5212)Victor Stinner2018-01-171-0/+1
|
* pythoninfo: add time.time and datetime.datetime.now (#5214)Victor Stinner2018-01-171-1/+13
|
* bpo-32248: Fix test_importlib.test_open() (#5213)Victor Stinner2018-01-171-2/+2
| | | | Use the binary.file instead of utf-8.file to avoid issues with Unix newlines vs Windows newlines.
* Fix Git attributes of test_importlib data files (#5209)Victor Stinner2018-01-171-0/+1
| | | | bpo-32248: Make sure that Git checks out data files with Unix line ending on Windows as well.
* bpo-32549: Compile OpenSSL 1.1.0 on Travis CI (#5180)Christian Heimes2018-01-164-53/+95
| | | | | | Use an improved version of multissl test helper to compile a local copy of OpenSSL 1.1.0g. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-32403: Faster date and datetime constructors (#4993)Paul Ganssle2018-01-164-45/+171
| | | | | | | | | | | | | | * Add tests for date subclass alternate constructors * Switch over alternate date constructors to fast path * Switch datetime constructors to fastpath, fix bpo-32404 * Add fast path for datetime in date subclass constructor * Set fold in constructor in datetime.combine * Add news entries.
* bpo-32410: Implement loop.sock_sendfile() (#4976)Andrew Svetlov2018-01-168-0/+609
|
* Skip test_readline.test_nonascii() on C locale (#5203)Victor Stinner2018-01-161-0/+8
| | | | | bpo-29240: On FreeBSD, if the LC_CTYPE locale is "C" or "POSIX", writing and reading non-ASCII bytes into/from a TTY works, but readline or ncurses ignores non-ASCII bytes on read.
* bpo-31572: Get rid of PyObject_HasAttr() and _PyObject_HasAttrId() in the ↵Serhiy Storchaka2018-01-165-63/+105
| | | | _io module. (#3726)
* bpo-32544: Speed up hasattr() and getattr() (GH-5173)INADA Naoki2018-01-165-19/+71
| | | | | AttributeError was raised always when attribute is not found. This commit skip raising AttributeError when `tp_getattro` is `PyObject_GenericGetAttr`. It makes hasattr() and getattr() about 4x faster when attribute is not found.
* bpo-26163: Frozenset hash improvement (#5194)Raymond Hettinger2018-01-162-0/+3
|
* bpo-14976: Reentrant simple queue (#3346)Antoine Pitrou2018-01-1512-12/+1125
| | | | Add a queue.SimpleQueue class, an unbounded FIFO queue with a reentrant C implementation of put().
* Implement the get_resource_reader() API for file system imports (#5168)Barry Warsaw2018-01-156-1258/+1351
|
* Make asyncio tests run when there's no SSL module (#5196)Yury Selivanov2018-01-151-3/+0
|
* bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174)Victor Stinner2018-01-158-19/+151
| | | | | | | | * Add _Py_GetLocaleconvNumeric() function: decode decimal_point and thousands_sep fields of localeconv() from the LC_NUMERIC encoding, rather than decoding from the LC_CTYPE encoding. * Modify locale.localeconv() and "n" formatter of str.format() (for int, float and complex to use _Py_GetLocaleconvNumeric() internally.
* bpo-29240: Fix locale encodings in UTF-8 Mode (#5170)Victor Stinner2018-01-1512-505/+472
| | | | | | | | | | | | | | | | | | | | | | | | | | | Modify locale.localeconv(), time.tzname, os.strerror() and other functions to ignore the UTF-8 Mode: always use the current locale encoding. Changes: * Add _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx(). On decoding or encoding error, they return the position of the error and an error message which are used to raise Unicode errors in PyUnicode_DecodeLocale() and PyUnicode_EncodeLocale(). * Replace _Py_DecodeCurrentLocale() with _Py_DecodeLocaleEx(). * PyUnicode_DecodeLocale() now uses _Py_DecodeLocaleEx() for all cases, especially for the strict error handler. * Add _Py_DecodeUTF8Ex(): return more information on decoding error and supports the strict error handler. * Rename _Py_EncodeUTF8_surrogateescape() to _Py_EncodeUTF8Ex(). * Replace _Py_EncodeCurrentLocale() with _Py_EncodeLocaleEx(). * Ignore the UTF-8 mode to encode/decode localeconv(), strerror() and time zone name. * Remove PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize() and PyUnicode_EncodeLocale() now ignore the UTF-8 mode: always use the "current" locale. * Remove _PyUnicode_DecodeCurrentLocale(), _PyUnicode_DecodeCurrentLocaleAndSize() and _PyUnicode_EncodeCurrentLocale().
* bpo-26330: Update shutil.disk_usage() documentation (GH-5184)Cheryl Sabella2018-01-151-1/+2
| | | | Clarify that on Windows, path must be a directory. On Unix, path can be a file or a directory.
* bpo-15221: Update os.path.is*() documentation (GH-5185)Cheryl Sabella2018-01-151-6/+9
| | | | | `os.path.is*()` can return False if the file can't be accessed. The behaviour is documented in details in `os.path.exists()`. Link to `os.path.exists()` from `os.path.is*()`.
* bpo-29476: Simplify set_add_entry() (#5175)Raymond Hettinger2018-01-141-2/+2
|
* Add itertools recipe for directly finding the n-th combination (#5161)Raymond Hettinger2018-01-132-0/+56
|
* Improve enum.Flag code example (GH-5167)Julian Kahnert2018-01-131-1/+1
| | | | The code example that demonstrate how to use enum.Flag was missing the import of enum.auto.
* bpo-32248: Introduce the concept of Loader.get_resource_reader() (GH-5108)Brett Cannon2018-01-124-13/+57
|
* bpo-31993: Do not use memoryview when pickle large strings. (#5154)Serhiy Storchaka2018-01-123-35/+36
| | | | | | PyMemoryView_FromMemory() created a memoryview referring to the internal data of the string. When the string is destroyed the memoryview become referring to a freed memory.
* bpo-32521: nis libtirpc (#5137)Christian Heimes2018-01-122-5/+14
| | | | | | glibc has removed Sun RPC. Use replacement libtirpc headers and library in nis module Signed-off-by: Christian Heimes <christian@python.org>
* bpo-32473: Improve ABCMeta._dump_registry() readability (GH-5091)yahya-abou-imran2018-01-122-1/+4
|
* OrderedDict import is no longer needed (#4890)Raymond Hettinger2018-01-121-2/+1
|
* Lexical Analysis ref doc: Fix a typo in the string concatenation internal ↵İsmail Arılık2018-01-121-1/+1
| | | | | | | link (GH-5157) In lexical analysis reference documentation, the internal link to the string literal concatenation section was written as`.. _string-catenation:`. Changed that to `.. _string-concatenation:`.
* bpo-31145: Use dataclasses to create a prioritization wrapper (#5153)Raymond Hettinger2018-01-122-0/+21
|
* bpo-32467: Let collections.abc.ValuesView inherit from Collection (#5152)Raymond Hettinger2018-01-124-4/+6
|
* bpo-31113: Get rid of recursion in the compiler for normal control flow. (#3015)Serhiy Storchaka2018-01-113-78/+110
|
* bpo-31993: Do not create frames for large bytes and str objects (#5114)Serhiy Storchaka2018-01-113-104/+97
| | | | | | | when serialize into memory buffer with C pickle implementations. This optimization already is performed when serialize into memory with Python pickle implementations or into a file with both implementations.
* bpo-29240: Ignore UTF-8 Mode in time module (#5148)Victor Stinner2018-01-114-8/+17
| | | | | | time.strftime() must use the current LC_CTYPE encoding, not UTF-8 if the UTF-8 mode is enabled. Add _PyUnicode_DecodeCurrentLocale() function.
* bpo-32320: Add default value support to collections.namedtuple() (#4859)Raymond Hettinger2018-01-114-4/+93
|
* Fix obvious typos in docstrings (#5151)Raymond Hettinger2018-01-111-6/+7
|
* bpo-29240: readline now ignores the UTF-8 Mode (#5145)Victor Stinner2018-01-106-42/+125
| | | | | | | | | | | | Add new fuctions ignoring the UTF-8 mode: * _Py_DecodeCurrentLocale() * _Py_EncodeCurrentLocale() * _PyUnicode_DecodeCurrentLocaleAndSize() * _PyUnicode_EncodeCurrentLocale() Modify the readline module to use these functions. Re-enable test_readline.test_nonascii().
* Fix when parsing tz offsets microseconds shorter than 6 (#4781)Mario Corchero2018-01-092-1/+7
| | | | As the remainder was directly parsed as an int, strings like .600 were parsed as 600 microseconds rather than milliseconds.
* bpo-24340: Fix estimation of the code stack size. (#5076)Serhiy Storchaka2018-01-096-1161/+1504
|