Commit graph

93117 commits

Author SHA1 Message Date
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
Anish Shah
102d813b55 Issue #26302: Correctly identify comma as an invalid character for a cookie (correcting regression in Python 3.5). 2016-02-07 05:36:00 +05:00
Yury Selivanov
a0fcaca4e1 Issue #26288: Fix comment 2016-02-06 12:21:33 -05:00
Senthil Kumaran
029f7f7af2 merge from 3.5 2016-02-05 19:37:47 -08:00
Senthil Kumaran
b6213c5664 Fix userinfo example presented in urllib2 howto. 2016-02-05 19:37:23 -08:00
Yury Selivanov
186c30b7ae Issue #26288: Optimize PyLong_AsDouble. 2016-02-05 19:40:01 -05:00
Eric V. Smith
eb588a1d10 Switch to more idiomatic C code. 2016-02-05 18:26:20 -05:00
Eric V. Smith
135d5f49f6 Fix issue 26287: While handling FORMAT_VALUE opcode, the top of stack was being corrupted if an error occurred in PyObject_Format(). 2016-02-05 18:23:08 -05:00
Martin Panter
a3643c280f Issue #12923: Merge FancyURLopener fix from 3.5 2016-02-06 01:08:40 +00:00
Yury Selivanov
ab8d4fba6d Merge 3.5 2016-02-04 14:08:23 -05:00
Yury Selivanov
46f7785e28 Issue #25660: Fix a unittest and rlcompleter when readline isn't available 2016-02-04 14:00:26 -05:00
Raymond Hettinger
f50215412c Add early-out for the common case where kwds is NULL (gives 1.1% speedup). 2016-02-04 02:46:16 -08:00
Yury Selivanov
aecef0d2d5 Merge 3.5 (issue #25660) 2016-02-04 01:24:56 -05:00
Yury Selivanov
a7eae4016e Issue #25660: Fix TAB key behaviour in REPL. 2016-02-04 01:23:05 -05:00
Martin Panter
a03702252f Issue #12923: Reset FancyURLopener's redirect counter even on exception
Based on patches by Brian Brazil and Daniel Rocco.
2016-02-04 06:01:35 +00:00
Zachary Ware
e922289620 Merge with 3.5 2016-02-03 22:07:08 -06:00