Commit Graph

101818 Commits

Author SHA1 Message Date
Robert Krzyzanowski 6f19fc6d56 fix two typos in Objects/odictobject.c comments (GH-8040) 2018-07-06 13:54:26 +03:00
Tal Einat c929df3b96
bpo-20180: complete AC conversion of Objects/stringlib/transmogrify.h (GH-8039)
* converted bytes methods: expandtabs, ljust, rjust, center, zfill
* updated char_convertor to properly set the C default value
2018-07-06 13:17:38 +03:00
Julien Palard 7943c5e8b5
Doc: Remove superfluous markup. (GH-8112)
The line is speaking of a list of commands, not the list command.
2018-07-06 11:15:13 +02:00
Zackery Spytz d8c3e820b4 Fix GCC warning in Python/hamt.c (GH-7618) 2018-07-06 17:50:38 +09:00
Ammar Askar c4ef4896ea bpo-33899: Make tokenize module mirror end-of-file is end-of-line behavior (GH-7891)
Most of the change involves fixing up the test suite, which previously made
the assumption that there wouldn't be a new line if the input didn't end in
one.

Contributed by Ammar Askar.
2018-07-06 10:19:08 +03:00
Benjamin Peterson 3c8aae9ffe
Make TaskStepMethWrapper_Type and TaskWakeupMethWrapper_Type static. (GH-8127) 2018-07-05 22:39:34 -07:00
INADA Naoki 8d130913cb
bpo-34043: Optimize tarfile uncompress performance (GH-8089)
tarfile._Stream has two buffer for compressed and uncompressed data.
Those buffers are not aligned so unnecessary bytes slicing happens
for every reading chunks.

This commit bypass compressed buffering.

In this benchmark [1], user time become 250ms from 300ms.

[1]: https://bugs.python.org/msg320763
2018-07-06 14:06:00 +09:00
Sergey Fedoseev f12028809b versionadded -> versionchanged for all 'X parameter was added' for uniformity. (GH8114)
Per the recommendation in our Developer's Guide:
  https://devguide.python.org/documenting/#paragraph-level-markup
2018-07-05 17:01:16 -07:00
Raymond Hettinger 0c4d20bcaa
Add more detail to the Counter.fromkeys() comment block (GH-8124) 2018-07-05 16:36:24 -07:00
Windson yang 3ae2e33a61 classify abs() argument type (GH-8103) 2018-07-05 16:09:53 -07:00
Artjom e55ca3fdcb Fix typo in dataclasses documentation (GH-8102) 2018-07-05 19:09:13 -04:00
Victor Stinner 483422f57e
bpo-34044: subprocess.Popen copies startupinfo (GH-8090)
subprocess.Popen now copies the startupinfo argument to leave it
unchanged: it will modify the copy, so that the same STARTUPINFO
object can be used multiple times.

Add subprocess.STARTUPINFO.copy() method.
2018-07-05 22:54:17 +02:00
Serhiy Storchaka 09bb918a61
Fix fuzz testing for marshal.loads(). (GH-8106) 2018-07-05 12:19:19 +03:00
Serhiy Storchaka fc05e68d8f
bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336) 2018-07-05 11:17:20 +03:00
Sergey Fedoseev 3a9bb5f269 Removed unused import from tzinfo_examples.py. (GH-7994) 2018-07-04 21:47:37 -07:00
Julien Palard a6e1e41e05 Update Stackless Python wiki URL (GH-8072)
It was moved from bitbucket to GitHub.
2018-07-04 21:31:38 -07:00
Raymond Hettinger e69cd169af
Minor code refactoring. Compute len() one fewer times on one code path. (GH-8094) 2018-07-04 15:28:20 -07:00
Gerrit Holl bd81cbd584 DOC: In `reduce`, refer to `accumulate` (GH-7930) 2018-07-04 15:26:32 -07:00
Farhaan Bukhsh 5b6e49a139 bpo-30516: Fix documentation issue with -timedelta in datetime (GH-7348)
This commit fixes the -timedelta overfllow issue not documented properly.

Signed-off-by: Farhaan Bukhsh <farhaan.bukhsh@gmail.com>
2018-07-04 19:42:05 +01:00
Lorenz Mende a390cb6b6f bpo-32942: Fix environment dependent test_script_helper (GH-8034)
Result of function interpreter_requires_environment() depends on os.environ.
This was not covered by the tests, leading to fail when PYTHONHOME was set.
2018-07-04 12:10:15 +02:00
Victor Stinner 07888e1cce
bpo-34040, multiprocessing: Fix test_forkserver_sigkill() (GH-8081)
Fix test_forkserver_sigkill() of test_multiprocessing_forkserver:
give more time to the first child process to complete, double the
sleep in the parent process.

Reduce also the child process sleep from 1000 ms to 500 ms, to not change
the total duration of the test.
2018-07-04 11:49:41 +02:00
hajoscher 12a08c4760 bpo-34010: Fix tarfile read performance regression (GH-8020)
During buffered read, use a list followed by join instead of extending a bytes object.
This is how it was done before but changed in commit b506dc32c1.
2018-07-04 17:13:18 +09:00
Benjamin Peterson 97ae32c92e
Make GenericAlias_Type and Generic_Type static. (GH-8076) 2018-07-03 22:39:09 -07:00
Benjamin Peterson b4588c2fff
Don't export pending_threadfunc from _testcapi. (GH-8075) 2018-07-03 22:30:56 -07:00
INADA Naoki 3c452404ae
bpo-33418: Add tp_clear for function object (GH-8058)
Without tp_clear, GC can't break cyclic reference.
It will cause memory leak when cyclic reference is
created intentionally.
2018-07-04 11:15:50 +09:00
Zackery Spytz d8cba5d16f bpo-24596: Decref module in PyRun_SimpleFileExFlags() on SystemExit (GH-7918)
PyErr_Print() will not return when the exception is a SystemExit, so
decref the __main__ module object in that case.
2018-07-03 21:47:22 +02:00
Sergey Fedoseev 831c29721d bpo-34018: Doc'd that type names of SQLite converters are case-insensitive. (GH-8042) 2018-07-03 14:59:32 +03:00
Bumsik Kim 3cf1f154ed bpo-34019: Fix wrong arguments for Opera Browser (#8047)
The Opera Browser was using a outdated command line invocation that resulted in an incorrect URL being opened in the browser when requested using the webbrowser module.

* Correct the arguments passed to the Opera Browser when opening a new URL.
2018-07-03 12:30:06 +01:00
Victor Stinner 23401fb960
bpo-33735: Fix test_multiprocessing random failure (GH-8059)
When hunting memory leaks using -R 3:3, test_imap_unordered() of
test_multiprocessing leaks randomly a few memory blocks. It is a
false alarm: when testing using -R 3:20 for example, no leak is
detected.

Modify test_imap_unordered() to be closer to test_imap():

* Only test 10 numbers instead of 1000: it's a pool of 4 processes, so
  10 is enough to test at least one number per process
* Use chunksize=100 instead of chunksize=53 to mimick test_imap()
2018-07-03 13:20:35 +02:00
Zachary Ware d824ca7f4d bpo-34006: Revert line length limit for Windows help docs (GH-8051)
The line-length limit is not needed because the pages appear in a separate app rather
 than on a browser tab.  It can also interact badly with the DPI setting.
2018-07-02 16:31:42 -04:00
Xtreak 087570af6d bpo-33978: Close existing handlers before logging (re-)configuration. (GH-8008) 2018-07-02 09:57:46 +01:00
INADA Naoki c6cd164cff
bpo-30660: Doc: Optimize PNG files by optipng (GH-8032)
Using OptiPNG 0.7.7.
Used command is: `find . -name '*.png' | xargs optipng -o7`
2018-07-01 16:02:52 +09:00
Tal Einat 6dc57e2a20
bpo-31938: Convert selectmodule.c to Argument Clinic (GH-4265) 2018-06-30 23:02:48 +03:00
INADA Naoki fe524df37c
Doc: Remove unused image file (GH-8027) 2018-07-01 03:04:34 +09:00
Serhiy Storchaka fdb5a50ef3
bpo-25862: Fix several bugs in the _io module. (GH-8026)
They can be exposed when some C API calls fail due to lack of
memory.

* Failed Py_BuildValue() could cause an assertion error in the
  following TextIOWrapper.tell().
* input_chunk could be decrefed twice in TextIOWrapper.seek()
  after failed Py_BuildValue().
* initvalue could leak in StringIO.__getstate__() after failed
  PyDict_Copy().
2018-06-30 20:57:50 +03:00
Tal Einat 0cdf5f4289
bpo-32568: make select.epoll() and its docs consistent (#7840)
* `flags` is indeed deprecated, but there is a validation on its value for
  backwards compatibility reasons.  This adds mention of this in the docs.
* The docs say that `sizehint` is deprecated and ignored, but it is still
  used when `epoll_create1()` is unavailable. This adds mention of this in
  the docs.
* `sizehint=-1` is acceptable again, and is replaced with `FD_SETSIZE-1`.
  This is needed to have a default value available at the Python level,
  since `FD_SETSIZE` is not exposed to Python. (see: bpo-31938)
* Reject `sizehint=0` since it is invalid to pass on to `epoll_create()`.

The relevant tests have also been updated.
2018-06-30 15:43:23 +03:00
Serhiy Storchaka 5bb5bbfca8
bpo-33974: Fix passing special characters to ttk widgets. (GH-7986)
Fix passing lists and tuples of strings containing special characters
'"', '\\', '{', '}' and '\n' as options to tkinter.ttk widgets.
2018-06-30 09:20:28 +03:00
Jeremy Cline f874bd1f06 Fix redundant declaration of _PyImport_AddModuleObject (GH-7992) 2018-06-29 16:47:18 -06:00
Mariatta b57eea16d1
Add zulipchat badge to readme (GH-7929) 2018-06-29 13:43:45 -07:00
Zackery Spytz 23db935bcf bpo-25862: Fix assertion failures in io.TextIOWrapper.tell(). (GH-3918) 2018-06-29 13:14:58 +03:00
Andrés Delfino bda9c3eae3 Fix the indentation in the documentation of bin() and hash() (GH-7998) 2018-06-29 12:57:10 +03:00
Terry Jan Reedy 891a1f86d4
bpo-14117: Make minor tweaks to turtledemo (GH-8002)
The 'wikipedia' example is now 'rosette', describing what it draws.
The 'penrose' print output is reduced.  The 'tree' '1024'
output is eliminated.
2018-06-29 01:10:05 -04:00
Yury Selivanov d904c238ca
bpo-27500: Fix static version of getaddrinfo to resolve IPv6 (GH-7993) 2018-06-28 21:59:32 -04:00
Yury Selivanov 41cb0baea9
bpo-33985: Implement ContextVar.name attribute. (GH-7980) 2018-06-28 13:20:29 -04:00
Thomas A Caswell 9b9d58f0d8 bpo-31546: Fix input hook integration (GH-7978) 2018-06-28 09:29:44 -07:00
Elvis Pranskevichus 4d26c8a177 bpo-32996: Enhancements to What's New based on feedback (GH-7988) 2018-06-28 11:57:37 -04:00
Ned Deily e76ac9d4ef Forward port rest of NEWS changes as of 3.7.0 2018-06-28 04:18:35 -04:00
INADA Naoki 461a1c4b49
bpo-33842: Remove tarfile.filemode (GH-7661) 2018-06-28 17:10:36 +09:00
Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) 62b6cea6b8 bpo-33958: Doc: Remove unused variable in example (GH-7927) 2018-06-28 15:25:20 +09:00
Ned Deily aee5df5e16 Forward port 3.7.0 final changes 2018-06-27 18:45:50 -04:00