Commit Graph

15491 Commits

Author SHA1 Message Date
Benjamin Peterson 559ae0fb1c merge 3.3 2013-10-18 12:58:17 -04:00
Benjamin Peterson 910a66566a fix description of super() behavior on descriptors 2013-10-18 12:57:55 -04:00
Brett Cannon 27e27f7ee1 Issue #18416: Have importlib.machinery.PathFinder treat '' as the cwd
and stop importlib.machinery.FileFinder treating '' as '.'.

Previous PathFinder transformed '' into '.' which led to __file__ for
modules imported from the cwd to always be relative paths. This meant
the values of the attribute were wrong as soon as the cwd changed.
This change now means that as long as the site module is run (which
makes all entries in sys.path absolute) then all values for __file__
will also be absolute unless it's for __main__ when specified by file
path in a relative way (modules imported by runpy will have an
absolute path).

Now that PathFinder is no longer treating '' as '.' it only makes
sense for FileFinder to stop doing so as well. Now no transformation
is performed for the directory given to the __init__ method.

Thanks to Madison May for the initial patch.
2013-10-18 11:39:04 -04:00
Nick Coghlan 1805a62f1f Issue #16129: Py_SetStandardStreamEncoding cleanups
- don't call PyErr_NoMemory with interpreter is not initialised
- note that it's OK to call _PyMem_RawStrDup here
- don't include this in the limited API
- capitalise "IO"
- be explicit that a non-zero return indicates an error
- include versionadded marker in docs
2013-10-18 23:11:47 +10:00
Serhiy Storchaka ef23f1875d Fix markup. 2013-10-18 11:55:30 +03:00
Serhiy Storchaka 335331311f Fix markup. 2013-10-18 11:55:02 +03:00
Ethan Furman 2498d9e968 Issue #19272: slight clarification of pickle docs with regard to lambda. 2013-10-18 00:45:40 -07:00
Ethan Furman 63c141cacd Close #19030: inspect.getmembers and inspect.classify_class_attrs
Order of search is now:
  1. Try getattr
  2. If that throws an exception, check __dict__ directly
  3. If still not found, walk the mro looking for the eldest class that has
     the attribute (e.g. things returned by __getattr__)
  4. If none of that works (e.g. due to a buggy __dir__, __getattr__, etc.
     method or missing __slot__ attribute), ignore the attribute entirely.
2013-10-18 00:27:39 -07:00
Georg Brandl 2bb0ac0ace merge with 3.3 2013-10-17 19:52:33 +02:00
Georg Brandl 9ff06dcfad Fix inaccurate versionchanged tag for compressobj(): most parameter were there, just got kwarg support. 2013-10-17 19:51:34 +02:00
Nick Coghlan 240f86d7dd Close #19266: contextlib.ignore -> contextlib.suppress
Patch by Zero Piraeus.
2013-10-17 23:40:57 +10:00
Nick Coghlan 7d270ee05d Issue #16129: Add `Py_SetStandardStreamEncoding`
This new pre-initialization API allows embedding
applications like Blender to force a particular
encoding and error handler for the standard IO streams.

Also refactors Modules/_testembed.c to let us start
testing multiple embedding scenarios.

(Initial patch by Bastien Montagne)
2013-10-17 22:35:35 +10:00
R David Murray 3da240fd01 #18891: Complete new provisional email API.
This adds EmailMessage and, MIMEPart subclasses of Message
with new API methods, and a ContentManager class used by
the new methods.  Also a new policy setting, content_manager.

Patch was reviewed by Stephen J. Turnbull and Serhiy Storchaka,
and reflects their feedback.

I will ideally add some examples of using the new API to the
documentation before the final release.
2013-10-16 22:48:40 -04:00
Richard Oudkerk b1694cf588 Issue #18999: Make multiprocessing use context objects.
This allows different parts of a program to use different methods for
starting processes without interfering with each other.
2013-10-16 16:41:56 +01:00
Serhiy Storchaka acc9f3fb16 Issue #18725: The textwrap module now supports truncating multiline text. 2013-10-15 21:22:54 +03:00
Serhiy Storchaka 0186721397 Issue #19189: Improved cross-references in the pickle module documentation. 2013-10-14 10:44:25 +03:00
Serhiy Storchaka 5bbbc94073 Issue #19189: Improved cross-references in the pickle module documentation. 2013-10-14 10:43:46 +03:00
Ezio Melotti 33fc6d6040 #4965: merge with 3.3. 2013-10-14 02:59:54 +03:00
Ezio Melotti 47fd9d8e09 #4965: Implement intelligent scrolling of the sidebar in the docs. 2013-10-14 02:58:59 +03:00
Serhiy Storchaka ca1d6db6d3 Merge heads 2013-10-13 23:27:44 +03:00
Serhiy Storchaka 72aabb6177 Merge heads 2013-10-13 23:27:23 +03:00
Georg Brandl a7c17e552d Fix spacing of toplevel items. 2013-10-13 22:25:10 +02:00
Georg Brandl 3e30d471e9 merge with 3.3 2013-10-13 22:23:34 +02:00
Georg Brandl 810f1d56ea Wing IDE is switching to PyQt... 2013-10-13 22:23:27 +02:00
Georg Brandl 03d010be14 merge with 3.3 2013-10-13 22:20:08 +02:00
Georg Brandl c3a2916919 Closes #19248: actually check for Python 3.x in tools/sphinx-build.py. 2013-10-13 22:19:49 +02:00
Serhiy Storchaka 98b28fddd8 Issue #18758: Fixed and improved cross-references. 2013-10-13 23:12:09 +03:00
Serhiy Storchaka bfdcd436f0 Issue #18758: Fixed and improved cross-references. 2013-10-13 23:09:14 +03:00
Georg Brandl fbc3c3c2be Closes #17730: in code.interact(), when banner="", do not print anything.
Also adds tests for banner printing.
2013-10-13 21:49:06 +02:00
Serhiy Storchaka 7ff4520584 Issue #19197: Improved cross-references in the shlex module documentation. 2013-10-13 21:20:30 +03:00
Serhiy Storchaka 4e985673bf Issue #19197: Improved cross-references in the shlex module documentation. 2013-10-13 21:19:00 +03:00
Serhiy Storchaka 690a6a95bd Issue #19207: Improved cross-references in the os, os.path, and posix modules
documentation.
2013-10-13 20:13:37 +03:00
Serhiy Storchaka dab8354920 Issue #19207: Improved cross-references in the os, os.path, and posix modules
documentation.
2013-10-13 20:12:43 +03:00
Serhiy Storchaka 10e73babad Improve #19204: Improved cross-references in the urllib package documentation. 2013-10-13 20:07:51 +03:00
Serhiy Storchaka 5e1c053f0c Improve #19204: Improved cross-references in the urllib package documentation. 2013-10-13 20:06:50 +03:00
Georg Brandl ef1605afa8 merge with 3.3 2013-10-13 18:38:53 +02:00
Georg Brandl b7117af07d Refer to strftime(3) manpage for platform specific format codes.
Suggested by Skip Montanaro on docs@.
2013-10-13 18:28:25 +02:00
Serhiy Storchaka 287da2e0b9 Issue #19203: Improved cross-references in the curses howto. 2013-10-13 19:24:30 +03:00
Serhiy Storchaka 04d11a73fa Issue #19203: Improved cross-references in the curses howto. 2013-10-13 18:51:59 +03:00
Serhiy Storchaka 221d943c5b Issue #19198: Improved cross-references in the cgi module documentation. 2013-10-13 18:29:08 +03:00
Serhiy Storchaka fd1c3d3059 Issue #19198: Improved cross-references in the cgi module documentation. 2013-10-13 18:28:26 +03:00
Nick Coghlan e206b6e10e Issue #17827: document codecs.encode and codecs.decode
- Merge from 3.3
- Added to What's New since these are more important in 3.x,
  as the bytes<->bytes and str<->str codecs don't fit the
  text model convenience methods in 3.x the way they did the
  basestring<->basestring methods in the 2.x text model
- Included under Library in Misc/NEWS for the same reason
2013-10-14 00:55:46 +10:00
Nick Coghlan 6cb2b5b1e1 Issue #17827: Document codecs.encode and codecs.decode 2013-10-14 00:22:13 +10:00
Nick Coghlan b4534ae704 Docs tweaks for contextlib additions 2013-10-13 23:23:08 +10:00
Georg Brandl 31f6f4dd03 merge with 3.3 2013-10-13 10:49:47 +02:00
Georg Brandl aeaecfd257 Closes #13740: SND_NOWAIT seems to be ignored on modern Windows. 2013-10-13 10:49:41 +02:00
Georg Brandl bcdb4fd83c merge with 3.3 2013-10-13 09:56:24 +02:00
Georg Brandl 5d5b375c84 Fix a small CSS glitch with deprecated blocks and Sphinx 1.2. 2013-10-13 09:56:20 +02:00
Georg Brandl daa1fa991c Back out accidentally pushed changeset b51218966201. 2013-10-13 09:32:59 +02:00
Georg Brandl a7bb9b3a13 merge with 3.3 2013-10-13 09:32:00 +02:00