Alexey Izbyshev
8fdd331bbf
closes bpo-34493: Objects/genobject.c: Add missing NULL check to compute_cr_origin() (GH-8911)
2018-08-25 00:15:23 -07:00
Alexander Vasin
416cbce22d
Fixed typo with asynccontextmanager code example (GH-8845)
...
`yield conn`, instead of just `yield`.
2018-08-24 19:38:11 -07:00
Danish Prakash
09efe49c07
bpo-34426: fix typo (__lltrace__ -> __ltrace__) (GH-8822)
2018-08-24 19:00:25 -07:00
Gregory P. Smith
76be0fffff
bpo-13312: Avoid int underflow in time year. (GH-8912)
...
Avoids an integer underflow in the time module's year handling code.
2018-08-24 18:08:50 -07:00
Alexey Izbyshev
eb746dbae8
bpo-34492: Python/coreconfig.c: Fix _Py_wstrlist_copy() (GH-8910)
...
bpo-34492: Python/coreconfig.c: Add missing NULL check to _Py_wstrlist_copy().
Fix _Py_wstrlist_clear() call on a wrong list.
Reported by Svace static analyzer.
2018-08-25 01:34:56 +02:00
Michael Osipov
3738fadc67
bpo-34448: Improve output of usable wchar_t check (GH-8846)
2018-08-24 19:17:19 +03:00
Alexey Izbyshev
498845368f
closes bpo-34471: _datetime: Add missing NULL check to tzinfo_from_isoformat_results. (GH-8869)
...
Reported by Svace static analyzer.
2018-08-24 08:53:16 -07:00
Vladimir Matveev
91cb298f81
bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks (GH-8864)
2018-08-24 17:18:00 +03:00
Daniel Dương
075b3c3259
Fix typo in the dataclasses's doc (GH-8896)
2018-08-24 05:19:24 -04:00
Alexey Izbyshev
7ecae3ca0b
closes bpo-34468: Objects/rangeobject.c: Fix an always-false condition in range_repr() (GH-8880)
...
Also, propagate the error from PyNumber_AsSsize_t() because we don't care
only about OverflowError which is not reported if the second argument is NULL.
Reported by Svace static analyzer.
2018-08-23 21:39:45 -07:00
Alexey Izbyshev
2b824b2538
closes bpo-34474: Python/bltinmodule.c: Add missing NULL check in builtin_sum_impl() (GH-8872)
...
Reported by Svace static analyzer.
2018-08-23 21:27:52 -07:00
Alexey Izbyshev
f6247aac08
closes bpo-34477: Objects/typeobject.c: Add missing NULL check to type_init() (GH-8876)
...
Reported by Svace static analyzer.
2018-08-23 21:22:16 -07:00
Anthony Sottile
cc18258daf
Fix doc for `add_subparsers` arguments (GH-8884)
...
There was a missing comma.
2018-08-23 20:08:54 -07:00
Jelle Zijlstra
b8a181f4ae
Fix typo in asyncio.BoundedSemaphore docs (GH-8882)
...
semapthores -> semaphores
2018-08-23 18:50:00 -07:00
Paul Ganssle
096329f0b2
bpo-34454: fix .fromisoformat() methods crashing on inputs with surrogate code points (GH-8862)
...
The current C implementations **crash** if the input includes a surrogate
Unicode code point, which is not possible to encode in UTF-8.
Important notes:
1. It is possible to pass a non-UTF-8 string as a separator to the
`.isoformat()` methods.
2. The pure-Python `datetime.fromisoformat()` implementation accepts
strings with a surrogate as the separator.
In `datetime.fromisoformat()`, in the special case of non-UTF-8 separators,
this implementation will take a performance hit by making a copy of the
input string and replacing the separator with 'T'.
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Co-authored-by: Paul Ganssle <paul@ganssle.io>
2018-08-23 18:06:20 +03:00
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