summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30622: Fix backport of NPN fix (#6102)Christian Heimes2018-03-281-1/+1
| | | | | Fix backport a79591cf of bpo-30622 to 3.6 branch. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-33016: Fix potential use of uninitialized memory in nt._getfinalpathname ↵Steve Dower2018-03-081-22/+32
| | | | (GH-6032)
* [3.6] bpo-30353: Fix pass by value for structs on 64-bit Cygwin/MinGW ↵Miss Islington (bot)2018-03-082-2/+39
| | | | | | | | (GH-1559) (GH-5954) (cherry picked from commit 9ba3aa4d02a110d1a1ea464a8aff3be7dd9c63c3) Co-authored-by: Erik Bray <erik.m.bray@gmail.com>
* bpo-32969: Expose some missing constants in zlib and fix the doc (GH-5988)Miss Islington (bot)2018-03-071-3/+18
| | | | | (cherry picked from commit bc3f2289b9007396bfb7f986bee477b6176c1822) Co-authored-by: Xiang Zhang <angwerzx@126.com>
* [3.6] bpo-33001: Prevent buffer overrun in os.symlink (GH-5989) (GH-5990)Steve Dower2018-03-051-28/+38
|
* bpo-32903: Fix a memory leak in os.chdir() on Windows (GH-5801) (#5946)Miss Islington (bot)2018-03-011-7/+7
| | | | | (cherry picked from commit 3e197c7a6740d564ad52fb7901c07d5ff49460f5) Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
* [3.6] bpo-32922: dbm.open() now encodes filename with the filesystem ↵Serhiy Storchaka2018-02-274-18/+45
| | | | | | | encoding. (GH-5832). (GH-5906) (cherry picked from commit 6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Fix _socket module compilation on Cygwin. (GH-4137) (GH-4145)Miss Islington (bot)2018-02-261-1/+1
| | | (cherry picked from commit 63ae04461fb0cc93ca57cd151103a8dd295581d6)
* [3.6] bpo-32394: Remove some TCP options on older version Windows. (GH-5585)animalize2018-02-261-0/+67
|
* [3.6] bpo-30622: Fix NPN for OpenSSL 1.1.1-pre1 (GH-5876) (#5881)Christian Heimes2018-02-252-24/+29
| | | | | | Signed-off-by: Christian Heimes <christian@python.org>. (cherry picked from commit 29eab55309b9f78b79074d26db16a44e7841c639) Co-authored-by: Christian Heimes <christian@python.org>
* [3.6] bpo-30622: Improve NPN support detection (GH-5859) (#5861)Christian Heimes2018-02-252-11/+24
| | | | | | | | | The ssl module now detects missing NPN support in LibreSSL. Co-Authored-By: Bernard Spil <brnrd@FreeBSD.org> Signed-off-by: Christian Heimes <christian@python.org>. (cherry picked from commit 6cdb7954b0a578d899e4b78b868ea59eef08480a) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-32185: Don't send IP in SNI TLS extension (#5865)Christian Heimes2018-02-251-2/+40
| | | | | | The SSL module no longer sends IP addresses in SNI TLS extension on platforms with OpenSSL 1.0.2+ or inet_pton. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-17232: Clarify docs for -O and -OO command line options (GH-5839)Miss Islington (bot)2018-02-251-2/+4
| | | | | | The 'optimization' is for space in the executable file, not for run time. (cherry picked from commit 186b606d8a2ea4fd51b7286813302c8e8c7006cc) Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
* bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. (GH-5754)Miss Islington (bot)2018-02-241-0/+3
| | | | | (cherry picked from commit 42c35d9c0c8175332f50fbe034a001fe52f057b9) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* closes bpo-32859: Don't retry dup3() if it is not available at runtime (GH-5708)Miss Islington (bot)2018-02-211-1/+1
| | | | | | | | | | | os.dup2() tests for dup3() system call availability at runtime, but doesn't remember the result across calls, repeating the test on each call with inheritable=False. Since the caller of os.dup2() is expected to hold the GIL, fix this by making the variable holding the test result static. (cherry picked from commit b3caf388a0418f6c031e4dbdcc0c1ce7e5cc36bd) Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
* Update comment in posixmodule.c (GH-5681)Miss Islington (bot)2018-02-141-1/+1
| | | | | | | | A closing parentheses was missing. Signed-off-by: Ngie Cooper <yaneurabeya@gmail.com> (cherry picked from commit 7745ec4e356ac1f4eaf43b155f4482c20a907d48) Co-authored-by: ngie-eign <1574099+ngie-eign@users.noreply.github.com>
* bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995)INADA Naoki2018-02-134-9/+21
| | | (cherry picked from commit d019bc8319ea35e93bf4baa38098ff1b57cd3ee5)
* bpo-29248: Fix os.readlink() on Windows (GH-5577)Miss Islington (bot)2018-02-121-3/+3
| | | | | | | | The PrintNameOffset field of the reparse data buffer was treated as a number of characters instead of bytes. (cherry picked from commit 3c34aad4e7a95913ec7db8e5e948a8fc69047bf7) Co-authored-by: SSE4 <tomskside@gmail.com>
* bpo-32777: Fix _Py_set_inheritable async-safety in subprocess (GH-5560) ↵Miss Islington (bot)2018-02-061-4/+4
| | | | | | | | | | | | (GH-5563) Fix a rare but potential pre-exec child process deadlock in subprocess on POSIX systems when marking file descriptors inheritable on exec in the child process. This bug appears to have been introduced in 3.4 with the inheritable file descriptors support. This also changes Python/fileutils.c `set_inheritable` to use the "slow" two `fcntl` syscall path instead of the "fast" single `ioctl` syscall path when asked to be async signal safe (by way of being asked not to raise exceptions). `ioctl` is not a POSIX async-signal-safe approved function. ref: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html (cherry picked from commit c1e46e94de38a92f98736af9a42d89c3975a9919) Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
* [3.6] bpo-32746: Fix multiple typos (GH-5144) (GH-5522)Terry Jan Reedy2018-02-044-4/+4
| | | | | | | | | Fix typos found by codespell in docs, docstrings, and comments. Fixes for the following files were in post-3.6 code and not backported: Lib/ctypes/_aix.py (new), Lib/test/test_concurrent_futures.py, Modules/_asynciomodule.c, Modules/_pickle.c, Objects/obmalloc.c. (cherry picked from commit c3d9508ff22ece9a96892b628dd5813e2fb0cd80)
* bpo-31106: Fix handling of erros in posix_fallocate() and posix_fadvise() ↵Miss Islington (bot)2018-02-011-10/+20
| | | | | (GH-3000) (GH-3000) (#4101) (cherry picked from commit d4b93e21c2664d6a78e0656e7a7be0807be1c352)
* [3.6] bpo-32228: Reset raw_pos after unwinding the raw stream (GH-4858) (#5389)Antoine Pitrou2018-01-281-4/+10
| | | | | Ensure that ``truncate()`` preserves the file position (as reported by ``tell()``) after writes longer than the buffer size.. (cherry picked from commit 059f58ce938d9c3f0286412a4efb1b9131339421)
* [3.6] bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174) (#5192)Victor Stinner2018-01-151-6/+26
| | | | | | | | | | * 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. (cherry picked from commit cb064fc2321ce8673fe365e9ef60445a27657f54)
* correct the typos (GH-4950) (#4951)Miss Islington (bot)2017-12-211-2/+2
| | | (cherry picked from commit 83cb778b4a3f856f2243b0f0d36fefb5c44b388f)
* bpo-32329: Fix sys.flags.hash_randomization (#4875)Victor Stinner2017-12-151-1/+0
| | | | sys.flags.hash_randomization is now properly set to 0 when hash randomization is turned off by PYTHONHASHSEED=0.
* bpo-32277: Fix exception raised from chmod(..., follow_symlinks=False) ↵Miss Islington (bot)2017-12-141-0/+1
| | | | | (GH-4797) (#4869) (cherry picked from commit 233ef249cc5c18d796fb581747179c5e062b4083)
* [3.6] bpo-32297: Fix misspellings in Python source code comments (GH-4803) ↵Andrew Svetlov2017-12-141-1/+1
| | | | | | | | | | | | | | (#4864) * [3.6] bpo-32297: Few misspellings found in Python source code comments. (GH-4803) * Fix multiple typos in code comments * Add spacing in comments (test_logging.py, test_math.py) * Fix spaces at the beginning of comments in test_logging.py. (cherry picked from commit 53f7a7c2814fbfd8a29200926601a32fa48bacb3)
* bpo-32255: Always quote a single empty field when write into a CSV file. ↵Miss Islington (bot)2017-12-121-1/+1
| | | | | | (GH-4769) (#4810) This allows to distinguish an empty row from a row consisting of a single empty field. (cherry picked from commit 2001900b0c02a397d8cf1d776a7cc7fcb2a463e3)
* bpo-32252: Fix faulthandler_suppress_crash_report() (GH-4794) (#4795)Miss Islington (bot)2017-12-111-1/+1
| | | | | Fix faulthandler_suppress_crash_report() used to prevent core dump files when testing crashes. getrlimit() returns zero on success. (cherry picked from commit 48d4dd974f0c8d47c54990eedd322b96b19c60ec)
* bpo-32186: Release the GIL during lseek and fstat (GH-4652) (#4661)Miss Islington (bot)2017-12-011-1/+5
| | | | | | | In _io_FileIO_readall_impl(), lseek() and _Py_fstat_noraise() were called without releasing the GIL. This can cause all threads to hang for unlimited time when calling FileIO.read() and the NFS server is not accessible. (cherry picked from commit 6a89481680b921e7b317c29877bdda9a6031e5ad)
* bpo-28416: Break reference cycles in Pickler and Unpickler subclasses ↵Miss Islington (bot)2017-11-301-38/+98
| | | | | | (GH-4080) (#4653) with the persistent_id() and persistent_load() methods. (cherry picked from commit 986375ebde0dd5ff2b7349e445a06bd28a3a8ee2)
* bpo-31440: Changed default module search path for windows (#4613)Miss Islington (bot)2017-11-281-2/+2
| | | (cherry picked from commit 08d2b86a1058b733bb7f1ae2b55818dd9687d21c)
* bpo-31701: faulthandler: ignore MSC and COM Windows exception (#3929) (#4416)Victor Stinner2017-11-161-3/+19
| | | (cherry picked from commit 6e3d6b5dc22cd06d8c4d44a38a8a3415e4bebb16)
* bpo-32020: arraymodule: Correct missing Py_DECREF in failure case of ↵Miss Islington (bot)2017-11-141-1/+3
| | | | | make_array() (GH-4391) (#4392) (cherry picked from commit 56935a53b11b9a70f3e13e460777ec81a5b9195e)
* bpo-32013: _pickle: Add missing Py_DECREF in error case in fast_save_enter() ↵Miss Islington (bot)2017-11-131-1/+5
| | | | | (GH-4384) (#4385) (cherry picked from commit f76231f89a7231fd486b37f728fbb4aab389e4d7)
* [3.6] bpo-31927: Fix bugs in socketmodule.c on NetBSD and other issues. ↵Serhiy Storchaka2017-11-092-58/+61
| | | | | | | | | (GH-4235) (#4352) * Fix compilation of the socket module on NetBSD 8. * Fix the assertion failure or reading arbitrary data when parse a AF_BLUETOOTH address on NetBSD and DragonFly BSD. * Fix other potential errors and make the code more reliable. (cherry picked from commit d3187158c09cf899e9849f335bdff10594209167)
* bpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor ↵Miss Islington (bot)2017-11-071-0/+5
| | | | | object is uninitialized (GH-3958) (#4303) (cherry picked from commit edb13ae48c17210fa4b2d40a6833ca09db5c121b)
* bpo-31770: Prevent a crash and refleaks when calling ↵Miss Islington (bot)2017-11-071-8/+7
| | | | | sqlite3.Cursor.__init__() more than once (GH-3968) (#4301) (cherry picked from commit e56ab746a965277ffcc4396d8a0902b6e072d049)
* bpo-31933: fix blake2 multi-byte params on big endian platforms (GH-4250) ↵Miss Islington (bot)2017-11-032-4/+8
| | | | | | | | | | | | | | | (#4262) All Blake2 params have to be encoded in little-endian byte order. For the two multi-byte integer params, leaf_length and node_offset, that means that assigning a native-endian integer to them appears to work on little-endian platforms, but gives the wrong result on big-endian. The current libb2 API doesn't make that very clear, and @sneves is working on new API functions in the GH issue above. In the meantime, we can work around the problem by explicitly assigning little-endian values to the parameter block. See https://github.com/BLAKE2/libb2/issues/12. (cherry picked from commit dcfb0e3c04f1b29a0d09bb0a81dcd5ee5a5fef1a)
* bpo-30057: Fix potential missed signal in signal.signal(). (GH-4258) (#4261)Miss Islington (bot)2017-11-031-1/+4
| | | | Bug report and patch by Jeroen Demeyer. (cherry picked from commit f6f90ff079a22b79a58d47b6117cc8a8c7d366f3)
* [3.6] bpo-31926: fix missing *_METHODDEF statements by argument clinic ↵Tal Einat2017-11-032-5/+5
| | | | | | | | | | | (GH-4230) (#4253) When a single .c file contains several functions and/or methods with the same name, a safety _METHODDEF GH-define statement is generated only for one of them. This fixes the bug by using the full name of the function to avoid duplicates rather than just the name.. (cherry picked from commit 4f57409a2f7bdf8fb559cddc7c6533ca2c471c67)
* bpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse(). ↵Miss Islington (bot)2017-11-011-12/+26
| | | | | (GH-4220) (#4221) (cherry picked from commit 4f469c096628af730b17798d0ebfd8925bfde836)
* bpo-15037: Add a workaround for getkey() in curses for ncurses 5.7 and ↵Miss Islington (bot)2017-11-011-2/+10
| | | | | | | earlier. (GH-3826) (#4218) Skip a test for unget_wch()/get_wch() on OpenBSD since they are broken in ncurses 5.7. (cherry picked from commit 7e68790f3db75a893d5dd336e6201a63bc70212b)
* bpo-31919: Fix building the curses module on OpenIndiana. (GH-4211) (#4215)Miss Islington (bot)2017-11-011-2/+4
| | | (cherry picked from commit 894ebd065e02debf20c0657d26020ecc42b7534f)
* Remove nested comments in blake2 (GH-4173) (#4214)Miss Islington (bot)2017-11-011-2/+4
| | | | | | | | | | | | Replace occurence of nested comments in blake2 reference implementation with preprocessor directive for disabling unused code. `blake2s-load-xop.h` is conditionally pulled in only on chips with XOP support, among others the AMD Bulldozer. The malformed comments in the source file breaks the build of `hashlib`'s `_blake2` on GCC 6.3.0. Official reference code on github uses `GH-if` so this change should be uncontroversial. (cherry picked from commit 388cd85e51aa9c73f8e7f35f0d06c258be7b579c)
* bpo-25720: Fix the method for checking pad state of curses WINDOW (GH-4164) ↵Miss Islington (bot)2017-11-011-8/+16
| | | | | | | | | | | (#4212) Modify the code to use ncurses is_pad() instead of checking WINDOW _flags field. If your platform does not provide the is_pad(), the existing way that checks the field will be enabled. Note: This change does not drop support for platforms where do not have both WINDOW _flags field and is_pad(). (cherry picked from commit 8bc7d63560024681dce9f40445f2877b2987e92c)
* bpo-31893: Fix errors in b9052a0f91d2e83bbc27267247a5920c82b242a3. (GH-4196) ↵Miss Islington (bot)2017-10-311-4/+4
| | | | | | | (#4201) * Fix a compilation error on FreeBSD. * Fix the data attribute size on Mac OS X. (cherry picked from commit 2298fad5ff907dd48ea0fb5c71fa22334ef28c6b)
* bpo-31893: Fixed select.kqueue(). (GH-4166) (#4190)Miss Islington (bot)2017-10-311-47/+71
| | | | | * Fixed the layout of the kqueue_event structure on OpenBSD and NetBSD. * Fixed the comparison of the kqueue_event objects. (cherry picked from commit b9052a0f91d2e83bbc27267247a5920c82b242a3)
* bpo-31891: Fix building the curses module on NetBSD. (GH-4165) (#4189)Miss Islington (bot)2017-10-311-33/+40
| | | (cherry picked from commit baac01e629d90f63dfde6b5cc433f4bc65c5feeb)
* [3.6] bpo-30697: Fix PyErr_NormalizeException() when no memory (GH-2327). ↵xdegaye2017-10-261-0/+63
| | | | | (#4135) (cherry picked from commit 56d1f5ca32892c7643eb8cee49c40c1644f1abfe)