Commit Graph

102068 Commits

Author SHA1 Message Date
Ville Skyttä c33bb5d401 Make it more clear that setUpClass runs before each class, not "class run" (GH-8844) 2018-08-23 07:49:18 -07:00
Michael Osipov 48ce4897f8 bpo-34412: Make signal.strsignal() work on HP-UX (GH-8786)
Introduce a configure check for strsignal(3) which defines HAVE_STRSIGNAL for
signalmodule.c. Add some common signals on HP-UX. This change applies for
Windows and HP-UX.
2018-08-23 16:27:19 +03:00
Victor Stinner 89487f51b8
bpo-34207: Fix pymain_read_conf() for UTF-8 Mode (GH-8868)
bpo-34170, bpo-34207: pymain_read_conf() now sets Py_UTF8Mode to
config->utf8_mode. pymain_read_conf() calls indirectly
Py_DecodeLocale() and Py_EncodeLocale() which depend on Py_UTF8Mode.
2018-08-23 12:23:46 +02:00
Alexey Izbyshev ccd9975267 bpo-34436: Fix check that disables overallocation for the last fmt specifier (GH-8826)
Reported by Svace static analyzer.
2018-08-23 09:50:52 +02:00
Grant Jenks 65bef36f0b Remove superseded line from argparse.HelpFormatter() (GH-8839) 2018-08-22 23:14:14 +03:00
Alexey Izbyshev c583919ffc bpo-34462: Add missing NULL check to _copy_raw_string() (GH-8863)
Reported by Svace static analyzer.
2018-08-22 21:27:32 +03:00
Berker Peksag e7d4b2f205
bpo-2122: Make mmap.flush() behave same on all platforms (GH-8692)
Previously, its behavior was platform-dependent and there was no error checking
under Windows.
2018-08-22 21:21:05 +03:00
Alexey Izbyshev 28853a249b bpo-34457: Python/ast.c: Add missing NULL check to alias_for_import_name(). (GH-8852)
Reported by Svace static analyzer.
2018-08-22 07:55:16 +03:00
Alexey Izbyshev f8c06b0280 bpo-34456: pickle: Add missing NULL check to save_global(). (GH-8851)
Reported by Svace static analyzer.
2018-08-22 07:51:25 +03:00
Berker Peksag ef8861c112
Fix Doc/whatsnew/3.8.rst (GH-8848)
The entry about deprecation of __getitem__ methods of
several classes was placed in the wrong section.
2018-08-21 17:58:49 +03:00
Zackery Spytz 3e26e42c90 bpo-34400: Fix more undefined behavior in parsetok.c (GH-8833) 2018-08-20 20:11:40 -07:00
Alexey Izbyshev cdbf50cba1 bpo-34441: Fix ABC.__subclasscheck__ crash on classes with invalid __subclasses__ (GH-8835)
The missing NULL check was reported by Svace static analyzer.
2018-08-20 23:04:19 +03:00
Xiang Zhang 4c8555773a
bpo-30411: Use --git-dir instead of -C to make git work under version below 1.8.5. (GH-8744) 2018-08-20 22:36:19 +08:00
Alexey Izbyshev 74a307d48e bpo-34435: Add missing NULL check to unicode_encode_ucs1(). (GH-8823)
Reported by Svace static analyzer.
2018-08-19 21:52:04 +03:00
Berker Peksag 225b055480
bpo-22057: Clarify eval() documentation (GH-8812)
If a globals dictionary without a '__builtins__' key is passed to
eval(), a '__builtins__' key will be inserted to the dictionary:

    >>> eval("print('__builtins__' in globals())", {})
    True

(As a result of this behavior, we can use the builtins
print() and globals() even if we passed a dictionary without a
'__builtins__' key to eval().)
2018-08-19 13:25:33 +03:00
Serhiy Storchaka 77d5781835
bpo-34318: Convert deprecation warnings to errors in assertRaises() etc. (GH-8623) 2018-08-19 10:00:11 +03:00
Zackery Spytz e349bf2358 bpo-22602: Raise an exception in the UTF-7 decoder for ill-formed sequences starting with "+". (GH-8741)
The UTF-7 decoder now raises UnicodeDecodeError for ill-formed
sequences starting with "+" (as specified in RFC 2152).
2018-08-19 07:43:38 +03:00
Vinay Sajip d3d3171da8
bpo-34415: Updated logging.Formatter docstring. (GH-8811) 2018-08-19 05:14:19 +01:00
Andrés Delfino 93b5655c04 bpo-34432: doc Mention complex and decimal.Decimal on str.format not about locales (GH-8808) 2018-08-18 13:36:24 -04:00
Michael Osipov cae8ff93a6 bpo-34381: refer to 'Running & Writing Tests' in README.rst (GH-8797) 2018-08-17 17:43:34 -04:00
davidair 2b32da2fea Improve error message when mock.assert_has_calls fails (GH-8205)
This makes the assertion error message more useful, aiding debugging.

Thanks @davidair!
2018-08-17 12:09:58 -07:00
Alfred Perlstein a2510732da Warn not to set SIGPIPE to SIG_DFL (#6773) 2018-08-17 14:48:05 +01:00
Michael Osipov 0e6e7a1e52 bpo-34419: selectmodule.c does not compile on HP-UX due to bpo-31938 (GH-8796)
Fix compile errors reported by HP aCC by fixing bugs introduced in 6dc57e2a20
which do not cause trouble on clang or GCC.

Patch by Michael Osipov.
2018-08-17 14:43:02 +03:00
Sebastian Rittau c53aaec793 bpo-34418: Fix HTTPErrorProcessor documentation (GH-8793)
The http_response() and https_response() methods of the HTTPErrorProcessor
class have two required parameters, 'request' and 'response'.
2018-08-17 12:47:32 +03:00
Christian Heimes 1590c39336
bpo-34391: Fix ftplib test for TLS 1.3 (GH-8787)
Read from data socket to avoid "[SSL] shutdown while in init" exception
during shutdown of the dummy server.

Signed-off-by: Christian Heimes <christian@python.org>


<!-- issue-number: [bpo-34391](https://www.bugs.python.org/issue34391) -->
https://bugs.python.org/issue34391
<!-- /issue-number -->
2018-08-16 19:43:44 +02:00
Erik Janssens e6a4755e67 bpo-34217: Use lowercase for windows headers (GH-8472) 2018-08-16 15:40:50 +09:00
Sergey Fedoseev 67b9cc8e60 bpo-34395: Fix memory leaks caused by incautious usage of PyMem_Resize(). (GH-8756) 2018-08-16 07:27:50 +03:00
Steve Dower 864a892af3
bpo-34405: Updated to OpenSSL 1.1.0i for Windows builds. (GH-8775) 2018-08-15 13:29:24 -07:00
Berker Peksag e0b5b2096e
bpo-34384: Fix os.readlink() on Windows (GH-8740)
os.readlink() now accepts path-like and bytes objects on Windows.
Previously, support for path-like and bytes objects was only
implemented on Unix.

This commit also merges Unix and Windows implementations of
os.readlink() in one function and adds basic unit tests to increase
test coverage of the function.
2018-08-15 13:03:41 +03:00
Zackery Spytz 7c4ab2afb1 closes bpo-34400: Fix undefined behavior in parsetok(). (GH-4439)
Avoid undefined pointer arithmetic with NULL.
2018-08-14 23:27:26 -07:00
Christian Heimes 88bfd0bce0
bpo-34399: 2048 bits RSA keys and DH params (#8762)
Downstream vendors have started to deprecate weak keys. Update all RSA keys
and DH params to use at least 2048 bits.

Finite field DH param file use RFC 7919 values, generated with

    certtool --get-dh-params --sec-param=high

Signed-off-by: Christian Heimes <christian@python.org>
2018-08-14 12:54:19 +02:00
Benjamin Peterson aa4e4a40db
Make regular expressions in test_tasks.py raw strings. (GH-8759)
Follow up to bpo-34270.

Fixes:
```
Lib/test/test_asyncio/test_tasks.py:330: DeprecationWarning: invalid escape sequence \d
  match1 = re.match("^<Task pending name='Task-(\d+)'", repr(t1))
Lib/test/test_asyncio/test_tasks.py:332: DeprecationWarning: invalid escape sequence \d
  match2 = re.match("^<Task pending name='Task-(\d+)'", repr(t2))
```
2018-08-13 21:32:30 -07:00
Ville Skyttä da12063f2f smtplib documentation fixes (GH-8708)
* SMTP.startssl: Fix doc on keyfile and certfile use

* SMTP.startssl: Add missing keyfile and certfile deprecation notice

* SMTP: Doc grammar fixes
2018-08-12 20:39:19 -07:00
Rémy HUBSCHER 10b59f1b01 Fix misindented yaml in logging how to example (GH-8604) 2018-08-12 16:58:26 -07:00
Raymond Hettinger a47f394af8
Minor code clean-up. Don't alter the input vector. Use variables instead. GH-8748 2018-08-12 14:18:56 -07:00
Raymond Hettinger 00414597b4
Add more tests and assertions for math.hypot() and math.dist() (GH-8747) 2018-08-12 12:15:23 -07:00
Vadim Pushtaev 4d12e4dc28 bpo-34213: Allow dataclasses to work with a field named 'object'. (GH-8452) 2018-08-12 07:46:05 -04:00
Andrés Delfino 65b5ef02ec Fix the versionadded indentation in exec_module doc (GH-8719) 2018-08-11 23:50:46 -07:00
Raymond Hettinger c630e10440
Factor-out common code. Also, optimize common cases by preallocating space on the stack. GH-8738
Improves speed by 9 to 10ns per call.
2018-08-11 18:39:05 -07:00
Raymond Hettinger 1399074535
Replace straight addition with Kahan summation and move max to the end (GH-8727) 2018-08-11 11:26:36 -07:00
Sergey Fedoseev 2fc46979b8 bpo-34151: Improve performance of some list operations (GH-8332) 2018-08-11 21:12:07 +08:00
Evan Allrich 9e84084851 bpo-34379: Doc: Move note for json.dump (GH-8730) 2018-08-11 16:34:02 +09:00
Paul Price db6075ab3a closes bpo-34377: Update Valgrind suppressions. (GH-8729)
Valgrind isn't seeing PyObject_Free/PyObject_Realloc, but using _PyObject_Free/_PyObject_Realloc works.
2018-08-10 23:41:34 -07:00
Berker Peksag c8b0dbc492
bpo-26818: Add a test to make sure the bug is fixed (GH-8664)
The main cause of this bug was fixed as part of bpo-31908.
2018-08-11 09:15:43 +03:00
Berker Peksag 84a13fbda0
bpo-9372: Deprecate several __getitem__ methods (GH-8609)
The __getitem__ methods of DOMEventStream, FileInput,
and FileWrapper classes ignore their 'index' parameters
and return the next item instead.
2018-08-11 09:05:04 +03:00
Berker Peksag 423d05f6f5
bpo-34333: Fix %-formatting in Path.with_suffix() (GH-8663) 2018-08-11 08:45:06 +03:00
Tal Einat 077059e0f0
bpo-34047: IDLE: fix mousewheel scrolling direction on macOS (GH-8678) 2018-08-10 09:02:08 +03:00
GPery b92c526ed5 closes bpo-34353: Add sockets to stat.filemode fallback python implementation. (GH-8703) 2018-08-09 22:12:08 -07:00
Alex Grönholm a7548230ff Fixed inconsistency in string handling in the Task C implementation (GH-8717) 2018-08-09 16:49:49 -04:00
Andriy Maletsky 22d131a7f9 Doc: add missing capture_output arg to subprocess.run() signature (#8374) 2018-08-09 13:01:54 -07:00