Commit Graph

93070 Commits

Author SHA1 Message Date
Brett Cannon
4cbab346df Issue #26397: Update an importlib example to use util.module_from_spec() instead of create_module() 2016-02-20 18:45:56 -08:00
Brett Cannon
fe1941ebf8 Merge w/ 3.5 2016-02-20 18:40:18 -08:00
Brett Cannon
27c712e149 List what classes from importlib.machinery don't work with importlib.util.LazyLoader 2016-02-20 18:40:02 -08:00
Brett Cannon
e5f4d3c246 Merge for issue #26186 2016-02-20 18:37:04 -08:00
Brett Cannon
558823a0cf Issue #26186: Remove an invalid type check in
importlib.util.LazyLoader.

The class was checking its argument as to whether its implementation
of create_module() came directly from importlib.abc.Loader. The
problem is that the classes coming from imoprtlib.machinery do not
directly inherit from the ABC as they come from _frozen_importlib.
Because the documentation has always said that create_module() was
ignored, the check has simply been removed.
2016-02-20 18:35:41 -08:00
Brett Cannon
0911c0d271 Merge for issue #26367 2016-02-20 12:59:36 -08:00
Brett Cannon
4f38cb41fe Issue #26367: Have importlib.__init__() raise RuntimeError when
'level' is specified but no __package__.

This brings the function inline with builtins.__import__(). Thanks to
Manuel Jacob for the patch.
2016-02-20 12:52:06 -08:00
Vinay Sajip
d9dc53021e Merged cookbook update from 3.5. 2016-02-20 19:03:29 +00:00
Vinay Sajip
e10d370a92 Added simple threading example to logging cookbook. 2016-02-20 19:02:46 +00:00
Martin Panter
2d2d08d2cc Issue #22468: Merge gettarinfo() doc from 3.5 2016-02-19 23:46:59 +00:00
Martin Panter
f817a48d17 Issues #22468, #21996, #22208: Clarify gettarinfo() and TarInfo usage
* The Windows-specific binary notice was probably a Python 2 thing
* Make it more obvious gettarinfo() is based on stat(), and that non-ordinary
  files may need special care
* The file name must be text; suggest dummy arcname as a workaround
* Indicate TarInfo may be used directly, not just via gettarinfo()
2016-02-19 23:34:56 +00:00
Georg Brandl
7db1d16209 merge with 3.5 2016-02-19 08:57:50 +01:00
Georg Brandl
92849d1721 Closes #20169: fix inner links random doc. 2016-02-19 08:57:38 +01:00
Martin Panter
be1aec752d Issue #15608: Merge socketserver doc from 3.5 2016-02-19 03:35:00 +00:00
Martin Panter
eac17b8955 Issue #15608: Improve socketserver module documentation
* Add headings for each concrete and mix-in class and list methods and
  attributes under them
* Fix class and method cross references
* Changed RequestHandler to BaseRequestHandler and added class heading
* Pull out Stream/DatagramRequestHandler definitions
* Reordered the request handler setup(), handle(), finish() methods
* Document constructor parameters for the server classes
* Remove version 2.6 not relevant for Python 3 documentation
2016-02-19 03:27:46 +00:00
Martin Panter
4ddbc0784a Issue #26309: Merge socketserver fix from 3.5 2016-02-19 02:38:34 +00:00
Martin Panter
4bf427495f Issue #26309: Rewrite test in main thread and avoid race condition 2016-02-19 02:16:42 +00:00
Berker Peksag
31a252b7f3 Issue #16915: Clarify that mode parameter of socket.makefile() does not accept
the same values as open().
2016-02-18 17:34:32 +02:00
Berker Peksag
3fe64d0c5c Issue #16915: Clarify that mode parameter of socket.makefile() does not accept
the same values as open().
2016-02-18 17:34:00 +02:00
Martin Panter
a2b64e630e Issue #26309: Merge socketserver fix from 3.5 2016-02-18 11:01:32 +00:00
Martin Panter
c12fef9aa3 Issue #26309: Shut down socketserver request if verify_request() is false
Patch by Aviv Palivoda.
2016-02-18 10:43:55 +00:00
Benjamin Peterson
bd8112901a merge 3.5 (#26378) 2016-02-17 23:43:08 -08:00
Benjamin Peterson
8f0432ffbb fix typo (closes #26378) 2016-02-17 23:42:46 -08:00
Benjamin Peterson
4a180a693f merge 3.5 (closes #25939) 2016-02-17 22:18:35 -08:00
Benjamin Peterson
1378f7ca68 merge 3.4 (closes #25939) 2016-02-17 22:18:20 -08:00
Benjamin Peterson
9491272751 open the cert store readonly
Patch from Chi Hsuan Yen.
2016-02-17 22:13:19 -08:00
Ned Deily
5ab2699c28 Issue #26368: fix typo in asynchio stream doc, reported by Ryan Stuart. 2016-02-16 13:27:45 +11:00
Ned Deily
f38c93fb7f Issue #26368: fix typo in asynchio stream doc, reported by Ryan Stuart. 2016-02-16 13:27:04 +11:00
Georg Brandl
40383c8f10 Minor clarification in tutorial. 2016-02-15 17:50:33 +01:00
Ned Deily
00538ffe3a Issue #25924: merge with 3.5 2016-02-15 16:57:04 +11:00
Ned Deily
47299fd39c Issue #25924: Avoid unnecessary serialization of getaddrinfo(3) calls on OS X
versions 10.5 or higher.  Original patch by A. Jesse Jiryu Davis.
2016-02-15 16:54:08 +11:00
Ned Deily
44f9bc959f Issue #26268: merge from 3.5 2016-02-15 16:47:03 +11:00
Ned Deily
203ce927f5 Issue #26268: Update OS X 10.5+ installer build to use OpenSSL 1.0.2f. 2016-02-15 16:44:38 +11:00
Raymond Hettinger
b6f17f5210 The return type of a rich comparison is an int 2016-02-14 01:41:35 -08:00
Martin Panter
8a5e69ca8c Issue #26316: Merge Arg Clinic fix from 3.5 2016-02-14 03:25:48 +00:00
Martin Panter
4177e7c38e Issue #26316: Fix variable name typo in Argument Clinic 2016-02-14 03:23:13 +00:00
Yury Selivanov
3e48b38dff Merge 3.5 (issue #25887) 2016-02-13 18:00:31 -05:00
Yury Selivanov
77c96813ab Issue #25887: Raise a RuntimeError when a coroutine is awaited more than once. 2016-02-13 17:59:05 -05:00
Vinay Sajip
6f79c2c826 Fixes #26348: Merged fix from 3.5. 2016-02-13 16:27:25 +00:00
Vinay Sajip
b2a2aa7664 Fixes #26348: Corrected typos in activate.fish script. 2016-02-13 16:26:35 +00:00
Martin Panter
bc1ee460dc Issue #25179: Documentation for formatted string literals aka f-strings
Some of the inspiration and wording is taken from the text of PEP 498 by Eric
V. Smith, and the existing str.format() documentation.
2016-02-13 00:41:37 +00:00
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