Yury Selivanov
e0b23095ee
Issues #26289 and #26315 : Optimize floor/modulo div for single-digit longs
...
Microbenchmarks show 2-2.5x improvement. Built-in 'divmod' function
is now also ~10% faster.
-m timeit -s "x=22331" "x//2;x//-3;x//4;x//5;x//-6;x//7;x//8;x//-99;x//100;"
with patch: 0.321 without patch: 0.633
-m timeit -s "x=22331" "x%2;x%3;x%-4;x%5;x%6;x%-7;x%8;x%99;x%-100;"
with patch: 0.224 without patch: 0.66
Big thanks to Serhiy Storchaka, Mark Dickinson and Victor Stinner for
thorow code reviews and algorithms improvements.
2016-02-11 10:26:27 -05:00
Serhiy Storchaka
2da89d70fc
Null merge
2016-02-11 13:31:56 +02:00
Serhiy Storchaka
7c90a82a01
Issue #25995 : os.walk() no longer uses FDs proportional to the tree depth.
...
Different solution from 3.5.
2016-02-11 13:31:00 +02:00
Serhiy Storchaka
06c45e6e9c
Issue #25995 : os.walk() no longer uses FDs proportional to the tree depth.
2016-02-11 13:29:28 +02:00
Serhiy Storchaka
ffe96ae10b
Issue #25994 : Added the close() method and the support of the context manager
...
protocol for the os.scandir() iterator.
2016-02-11 13:21:30 +02:00
Serhiy Storchaka
2feb642585
Issue #26325 : Added test.support.check_no_resource_warning() to check that
...
no ResourceWarning is emitted.
2016-02-11 13:12:19 +02:00
Serhiy Storchaka
94a619d48b
Issue #26325 : Added test.support.check_no_resource_warning() to check that
...
no ResourceWarning is emitted.
2016-02-11 13:11:44 +02:00
Serhiy Storchaka
885bdc4946
Issue #25985 : sys.version_info is now used instead of sys.version
...
to format short Python version.
2016-02-11 13:10:36 +02:00
Serhiy Storchaka
a9725f86a9
Issue #26312 : SystemError is now raised in all programming bugs with using
...
PyArg_ParseTupleAndKeywords(). RuntimeError did raised before in some
programming bugs.
2016-02-11 12:41:40 +02:00
Charles-François Natali
78f55ffc63
Issue #23992 : multiprocessing: make MapResult not fail-fast upon exception.
2016-02-10 22:58:18 +00:00
Guido van Rossum
eaf8ebc139
Null merge of typing.rst change
2016-02-10 09:49:36 -08:00
Guido van Rossum
e93b06a0a3
Hopefully clarify the difference between Optional[t] and an optional argument.
2016-02-10 09:48:58 -08:00
Guido van Rossum
3fb5612e08
Hopefully clarify the difference between Optional[t] and an optional argument.
2016-02-10 09:46:56 -08:00
Serhiy Storchaka
5b613dd810
Issue #25698 : Prevent possible replacing imported module with the empty one
...
if the stack is too deep.
2016-02-10 10:31:43 +02:00
Serhiy Storchaka
48a583b1d8
Issue #25698 : Prevent possible replacing imported module with the empty one
...
if the stack is too deep.
2016-02-10 10:31:20 +02:00
Martin Panter
288ed038aa
Issue #26304 : Additional “allows to” fix specific to 3.6
2016-02-10 05:45:55 +00:00
Martin Panter
3008b1c4bb
Issue #26304 : Merge doc wording from 3.5
2016-02-10 05:44:56 +00:00
Martin Panter
c04fb56e36
Issue #26304 : Change "allows to <verb>" to "allows <verb>ing" or similar
...
The original form is incorrect grammar and feels awkward, even though the
meaning is clear.
2016-02-10 05:44:01 +00:00
Martin Panter
7e3a91a5fc
Issue #26136 : Upgrade the generator_stop warning to DeprecationWarning
...
Patch by Anish Shah.
2016-02-10 04:40:48 +00:00
Martin Panter
b0cb42dfdb
Issue 26243: Forgot to update zlib doc strings in Argument Clinic
2016-02-10 10:45:54 +00:00
Martin Panter
1fe0d13d12
Issue #26243 : zlib.compress() keyword argument support by Aviv Palivoda
2016-02-10 10:06:36 +00:00
Martin Panter
96a4f07107
Issues #26310 , #26311 : Fix typos in the documentation and code comments
2016-02-10 01:17:51 +00:00
Raymond Hettinger
38418662e0
Issue #26200 : The SETREF macro adds unnecessary work in some cases.
2016-02-08 20:34:49 -08:00
Martin Panter
263c448a2e
Issues #26310 , 26311: Merge typo fixes from 3.5
2016-02-10 01:18:36 +00:00
Victor Stinner
15a3095d64
compiler: don't emit SyntaxWarning on const stmt
...
Issue #26204 : the compiler doesn't emit SyntaxWarning warnings anymore when
constant statements are ignored.
2016-02-08 22:45:06 +01:00
Serhiy Storchaka
896632ea6b
Issue #25983 : Added tests for multi-argument type().
2016-02-08 20:28:22 +02:00
Serhiy Storchaka
763f9f0d89
Issue #25983 : Added tests for multi-argument type().
2016-02-08 20:28:03 +02:00
Gregory P. Smith
b8e5eb31ea
Clarify "cardinality of" as "number of elements in" as many readers do
...
not have a math vocabulary.
2016-02-08 09:59:00 -08:00
Gregory P. Smith
e27403b75f
Clarify "cardinality of" as "number of elements in" as many readers do
...
not have a math vocabulary.
2016-02-08 09:58:40 -08:00
Steve Dower
a74826b086
Updates build to use SHA256 hash when signing files
2016-02-08 09:27:44 -08:00
Steve Dower
84d9fe3953
Updates build to use SHA256 hash when signing files.
2016-02-08 09:24:46 -08:00
Victor Stinner
a2724095cd
compiler now ignores constant statements
...
The compile ignores constant statements and emit a SyntaxWarning warning.
Don't emit the warning for string statement because triple quoted string is a
common syntax for multiline comments.
Don't emit the warning on ellipis neither: 'def f(): ...' is a legit syntax for
abstract functions.
Changes:
* test_ast: ignore SyntaxWarning when compiling test statements. Modify
test_load_const() to use assignment expressions rather than constant
expression.
* test_code: add more kinds of constant statements, ignore SyntaxWarning when
testing that the compiler removes constant statements.
* test_grammar: ignore SyntaxWarning on the statement "1"
2016-02-08 18:17:58 +01:00
Victor Stinner
51d8c526d5
Replace noop constant statement with expression
...
* Constant statements will be ignored and the compiler will emit a
SyntaxWarning.
* Replace constant statement (ex: "1") with an expression statement
(ex: "x=1").
* test_traceback: use context manager on the file.
Issue #26204 .
2016-02-08 17:57:02 +01:00
Victor Stinner
f089196beb
Simplify main() of test_ast
...
* Use ast.parse() to get the AST for a statement
* Use str%args syntax for format a line
Issue #26204 .
2016-02-08 17:15:21 +01:00
Serhiy Storchaka
fd625c39d0
Issue #26117 : The os.scandir() iterator now closes file descriptor not only
...
when the iteration is finished, but when it was failed with error.
2016-02-08 17:57:22 +02:00
Serhiy Storchaka
988b9bcd88
Issue #26117 : The os.scandir() iterator now closes file descriptor not only
...
when the iteration is finished, but when it was failed with error.
2016-02-08 17:56:36 +02:00
Serhiy Storchaka
d2962f145a
Issue #25949 : __dict__ for an OrderedDict instance is now created only when
...
needed.
2016-02-08 16:39:05 +02:00
Serhiy Storchaka
79ad897052
Issue #25911 : Restored support of bytes paths in os.walk() on Windows.
2016-02-08 16:24:15 +02:00
Martin Panter
192697e33b
Issue #26045 : Merge http.client error addition from 3.5
2016-02-09 11:57:11 +00:00
Martin Panter
44391481d7
Issue #26045 : Add UTF-8 suggestion to error in http.client
...
Based on patch by Guido van Rossum.
2016-02-09 10:20:52 +00:00
Serhiy Storchaka
5f6a0b4eb2
Issue #25911 : Restored support of bytes paths in os.walk() on Windows.
2016-02-08 16:23:28 +02:00
Serhiy Storchaka
d0c1f7743d
Issue #26198 : Make datetime error tests more lenient.
2016-02-08 09:26:57 +02:00
Serhiy Storchaka
0c0d537b24
Issue #26198 : Make datetime error tests more lenient.
2016-02-08 09:25:53 +02:00
Serhiy Storchaka
4cd63ef67a
Issue #26198 : ValueError is now raised instead of TypeError on buffer
...
overflow in parsing "es#" and "et#" format units. SystemError is now raised
instead of TypeError on programmical error in parsing format string.
2016-02-08 01:22:47 +02:00
Serhiy Storchaka
3e17c788a8
Issue #26198 : Fixed error messages for some argument parsing errors.
2016-02-08 01:20:21 +02:00
Serhiy Storchaka
c4b813d05d
Issue #26198 : Fixed error messages for some argument parsing errors.
...
Fixed the documented about buffer overflow error for "es#" and "et#" format
units.
2016-02-08 01:06:11 +02:00
Martin Panter
d5db14794b
Issue #25179 : Preparatory cleanup of existing docs on string formatting
...
* Various sections were pointing to the section on the string.Formatter
class, when the section on the common format string syntax is probably more
appropriate
* Fix references to various format() functions and methods
* Nested replacement fields may contain conversions and format specifiers,
and this is tested; see Issue #19729 for instance
2016-02-08 01:34:09 +00:00
Serhiy Storchaka
503f908090
Issue #26039 : Added zipfile.ZipInfo.from_file() and zipinfo.ZipInfo.is_dir().
...
Patch by Thomas Kluyver.
2016-02-08 00:02:25 +02:00
Martin Panter
46988d3659
Merge string formatting doc fixes from 3.5
2016-02-08 01:49:35 +00:00
Yury Selivanov
a0fcaca4e1
Issue #26288 : Fix comment
2016-02-06 12:21:33 -05:00