Commit Graph

103468 Commits

Author SHA1 Message Date
Pablo Galindo d6acf17c05
Add example to the documentation for calling unittest.mock.patch with create=True (GH-11056) 2019-01-09 21:43:24 +00:00
Terry Jan Reedy ee65594367
bpo-35641: Move IDLE blurb to IDLE directory (#11479) 2019-01-09 10:44:07 -05:00
Sanyam Khurana cbb1645993 bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff (#10639) 2019-01-09 05:38:38 -08:00
Victor Stinner a234e14839
bpo-32710: Fix leak in Overlapped_WSASend() (GH-11469)
Fix a memory leak in asyncio in the ProactorEventLoop when ReadFile()
or WSASend() overlapped operation fail immediately: release the
internal buffer.
2019-01-08 14:23:09 +01:00
Steve Dower 872bd2b57c
bpo-35596: Use unchecked PYCs for the embeddable distro to avoid zipimport restrictions (GH-11465)
Also adds extra steps to the CI build for Windows on Azure Pipelines to validate that the various layouts at least execute.
2019-01-08 02:38:01 -08:00
Vladimir Matveev c24c6c2c93 bpo-35568: add 'raise_signal' function (GH-11335)
As in title, expose C `raise` function as `raise_function` in `signal` module. Also drop existing `raise_signal` in `_testcapi` module and replace all usages with new function.


https://bugs.python.org/issue35568
2019-01-08 01:58:25 -08:00
chrullrich e61cc481e0 bpo-35374: Avoid trailing space in hhc file name if found on PATH. (GH-10849) 2019-01-07 18:57:29 -08:00
Pierre Glaser 202d1bde8f Remove spurious quote in Azure Pipelines script (GH-10763) 2019-01-07 18:02:26 -08:00
Victor Stinner 80fda712c8
bpo-35682: Fix _ProactorBasePipeTransport._force_close() (GH-11462)
bpo-32622, bpo-35682: Fix asyncio.ProactorEventLoop.sendfile(): don't
attempt to set the result of an internal future if it's already done.

Fix asyncio _ProactorBasePipeTransport._force_close(): don't set the
result of _empty_waiter if it's already done.
2019-01-08 02:46:59 +01:00
Gregory Szorc fbf50683b3 bpo-35642: Remove asynciomodule.c from pythoncore.vcxproj (GH-11410)
This module is built by _asyncio.vcxproj and does not need to be included in pythoncore.
2019-01-07 17:27:18 -08:00
Victor Stinner ddd7c422fd
bpo-33717: pythoninfo logs information of all clocks (GH-11460)
test.pythoninfo now logs information of all clocks, not only time.time() and
time.perf_counter().
2019-01-08 01:27:27 +01:00
Victor Stinner df8e1fb4e3
bpo-32710: test_asyncio: test_sendfile reset policy (GH-11461)
test_asyncio/test_sendfile.py now resets the event loop policy using
tearDownModule() as done in other tests, to prevent a warning when
running tests on Windows.
2019-01-07 23:55:57 +01:00
Raymond Hettinger 2d53bed79c
bpo-35664: Optimize operator.itemgetter (GH-11435) 2019-01-07 09:38:41 -07:00
Xtreak 3f7983a25a bpo-35560: Remove assertion from format(float, "n") (GH-11288)
Fix an assertion error in format() in debug build for floating point
formatting with "n" format, zero padding and small width. Release build is
not impacted. Patch by Karthikeyan Singaravelan.
2019-01-07 16:09:14 +01:00
cclauss a0bb51e44c test_threading_local: add missing "import sys" (GH-8049) 2019-01-06 23:10:55 +01:00
Cheryl Sabella 11303dd603 bpo-35660: Fix imports in idlelib.window (#11434)
* bpo-35660: IDLE: Remove * import from window.py

* sys was being imported through the *, so also added an import sys.

* Update 2019-01-04-19-14-29.bpo-35660.hMxI7N.rst

Anyone who wants details can check the issue, where I added the point about the sys import bug.
2019-01-06 15:55:52 -05:00
Anthony Shaw 83da926b89 bpo-35488: Add tests for ** glob matching in pathlib (GH-11171) 2019-01-06 12:31:29 -08:00
Tal Einat a5b76167de
remove doc-string declaration no longer used after AC conversion (GH-11444) 2019-01-06 10:10:34 +02:00
Vladimir Matveev 67ba547cf0 bpo-23057: Use 'raise' to emulate ctrl-c in proactor tests (#11274) 2019-01-05 22:44:59 +02:00
Ville Skyttä 31ec52a9af bpo-35631: Improve typing docs wrt abstract/concrete collection types (GH-11396)
https://bugs.python.org/issue35631
2019-01-04 14:14:32 +00:00
Harmandeep Singh 47a2fced84 bpo-31450: Remove documentation mentioning that subprocess's child_traceback is available with the parent process (GH-11422) 2019-01-03 11:53:56 -08:00
Emmanuel Arias ab54b9a130 bpo-35641: IDLE - format calltip properly when no docstring (GH-11415) 2019-01-03 02:47:58 -05:00
Terry Jan Reedy aff0adabf3
bpo-33987: IDLE - use ttk Frame for ttk widgets (GH-11395) 2019-01-02 22:04:06 -05:00
Harmandeep Singh e9a044ec16 bpo-35525: Correct the argument name for NNTP.starttls() (GH-11310) 2019-01-02 23:05:19 +02:00
Mickaël Schoentgen d466c43e55 closes bpo-35643: Fix a SyntaxWarning: invalid escape sequence in Modules/_sha3/cleanup.py (GH-11411) 2019-01-02 11:26:57 -08:00
Benjamin Peterson 9a69ae8a78
Bump copyright years to 2019. (GH-11404) 2019-01-02 07:46:53 -08:00
Serhiy Storchaka 830ddc74c4
Revert "bpo-35603: Escape table header of make_table output that can cause potential XSS. (GH-11341)" (GH-11356)
This reverts commit 78de01198b.
2019-01-02 14:49:25 +02:00
Stefan Behnel 3a374e0c5a bpo-35588: Speed up mod, divmod and floordiv operations for Fraction type (#11322)
* bpo-35588: Implement mod and divmod operations for Fraction type by spelling out the numerator/denominator calculation, instead of instantiating and normalising Fractions along the way. This speeds up '%' and divmod() by 2-3x.

* bpo-35588: Also reimplement Fraction.__floordiv__() using integer operations to make it ~4x faster.

* Improve code formatting.

Co-Authored-By: scoder <stefan_ml@behnel.de>

* bpo-35588: Fix return type of divmod(): the result of the integer division should be an integer.

* bpo-35588: Further specialise __mod__() and inline the original helper function _flat_divmod() since it's no longer reused.

* bpo-35588: Add some tests with large numerators and/or denominators.

* bpo-35588: Use builtin "divmod()" function for implementing __divmod__() in order to simplify the implementation, even though performance results are mixed.

* Rremove accidentally added empty line.

* bpo-35588: Try to provide more informative output on test failures.

* bpo-35588: Improve wording in News entry.

Co-Authored-By: scoder <stefan_ml@behnel.de>

* Remove stray space.
2019-01-02 14:22:06 +02:00
animalize a1d1425306 bpo-35636: Remove redundant check in unicode_hash(). (GH-11402)
_Py_HashBytes() does the check for empty string.
2019-01-02 14:16:06 +02:00
sth f8b534477a closes bpo-35623: Fix integer overflow when sorting large lists (GH-11380)
There is already a `Py_ssize_t i` defined at function scope that is used
for similar loops. By removing the local `int i` declaration that `i` is
used, which has the appropriate type.
2019-01-01 18:01:54 -08:00
Suriyaa ✌️️ 7e3fb40b92 closes bpo-35630: Use code tag for 'python3' in 'README.rst' (GH-11394) 2019-01-01 17:57:42 -08:00
Cheryl Sabella b4ea8bb080 bpo-35598: IDLE - Globalize some config_key objects (GH-11392)
Move translate_key() and constant tuples to module level.
Inline the remnant one-line function.
2018-12-31 15:06:35 -05:00
Tal Einat ede0b6fae2
bpo-20182: AC convert Python/sysmodule.c (GH-11328) 2018-12-31 17:12:08 +02:00
Serhiy Storchaka 052b2dfdc9
bpo-32492: Tweak _collections._tuplegetter. (GH-11367)
* Replace the docstrings cache with sys.intern().
* Improve tests.
* Unify names of tp_descr_get and tp_descr_set functions.
2018-12-31 14:15:16 +02:00
Serhiy Storchaka 5c117dd227
bpo-35609: Remove examples for deprecated decorators in the abc module. (GH-11355) 2018-12-31 09:56:21 +02:00
sth 7108aab49c Fix typo in test module usage message (GH-11374)
A minor typo in the output of `python -m test -h`.
A space was missing in between two words.
howmuch -> how much
2018-12-30 21:41:39 -08:00
Sanyam Khurana b539cef31c bpo-35614: Fix pydoc help() on metaclasses (#11357) 2018-12-31 15:14:47 +10:00
Gregory P. Smith 1d300ce1d8
bpo-35214: Annotate posix calls for clang MSan. (#11389)
It doesn't know the details of a few less common libc functions.
2018-12-30 21:13:02 -08:00
Gregory P. Smith e5796c42c6
bpo-35214: Skip test_io tests that'd cause a huge malloc under msan (#11385)
* skip test_constructor under msan.

* fix the others as well.

* reuse existing related news entry.

* typo fix
2018-12-30 20:17:57 -08:00
Gregory P. Smith d6f45b23a5
Fix typos in test_faulthandler skipIfs for ubsan. (GH-11386) 2018-12-30 20:15:41 -08:00
Jakub Kulík 6f9bc72c79 bpo-35550: Fix incorrect Solaris define guards (GH-11275)
Python source code uses on several places ifdef sun or defined(sun) without the underscores, which is not standard compliant and shouldn't be used.

Defines should check for __sun instead. Reference: http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system#Solaris

https://bugs.python.org/issue35550
2018-12-30 18:16:40 -08:00
Gregory P. Smith 30e023256a
Cleanup test_faulthandler sanitizer skip logic. (GH-11381)
Also skip the same tests when using the undefined behavior sanitizer
as they much with the output.

Updates a regex in another test to use multi-line mode so that the ubsan
buildbot should pass again rather than also adding a skip to that one.
2018-12-30 18:09:26 -08:00
Gregory P. Smith c7e219132a
Dead code removal from _hashopenssl. (GH-11379)
HASH_OBJ_CONSTRUCTOR has always been defined as 0 since I created
hashlib in Python 2.5.  Delete all code associated with it.
2018-12-30 17:54:53 -08:00
Gregory P. Smith b474e6774d
bpo-35214: MSan workarounds for socket, time, and test_faulthandler. (GH-11375)
Add Clang Memory Sanitizer build instrumentation to work around
false positives from the socket and time modules as well as skipping
a couple test_faulthandler tests.
2018-12-30 17:05:36 -08:00
Gregory P. Smith 387512c7ec
bpo-28503: Use crypt_r() when available instead of crypt() (GH-11373)
Use crypt_r() when available instead of crypt() in the crypt module.

As a nice side effect: This also avoids a memory sanitizer flake as clang msan doesn't know about crypt's internal libc allocated buffer.
2018-12-30 15:42:32 -08:00
sth 1b29c03c95 Fix typo in documentation of AbstractEventLoopPolicy.set_child_watcher() (GH-11369)
`set_child_watcher()` *sets* the watcher.
2018-12-30 14:01:28 -08:00
Cheryl Sabella 4bd79c38ef bpo-35598: IDLE: Switch config_key dialog to ttk widgets (GH-11365) 2018-12-30 14:48:51 -05:00
Pablo Galindo 3f5fc70c62 bpo-32492: 1.6x speed up in namedtuple attribute access using C fast-path (#10495)
* bpo-32492: 2.5x speed up in namedtuple attribute access using C fast path

* Add News entry

* fixup! bpo-32492: 2.5x speed up in namedtuple attribute access using C fast path

* Check for tuple in the __get__ of the new descriptor and don't cache the descriptor itself

* Don't inherit from property. Implement GC methods to handle __doc__

* Add a test for the docstring substitution in descriptors

* Update NEWS entry to reflect time against 3.7 branch

* Simplify implementation with argument clinic, better error messages, only __new__

* Use positional-only parameters for the __new__

* Use PyTuple_GET_SIZE and PyTuple_GET_ITEM to tighter the implementation of tuplegetterdescr_get

* Implement __set__ to make tuplegetter a data descriptor

* Use Py_INCREF now that we inline PyTuple_GetItem

* Apply the valid_index() function, saving one test

* Move Py_None test out of the critical path.
2018-12-30 01:24:03 -08:00
Cheryl Sabella b0a6196ffd bpo-35598: IDLE: Increase test coverage for config_key.py (#11360) 2018-12-29 23:25:09 -05:00
Sergey Fedoseev 0e5f771f38 bpo-33234: Simplify list_preallocate_exact() (GH-11220) 2018-12-29 22:31:36 +00:00