Merge lp://staging/~barry/python/pep3147 into lp://staging/python/py3k

Proposed by Barry Warsaw
Status: Merged
Merge reported by: Barry Warsaw
Merged at revision: not available
Proposed branch: lp://staging/~barry/python/pep3147
Merge into: lp://staging/python/py3k
Diff against target: 2808 lines (+1209/-293)
39 files modified
.bzrignore (+1/-0)
.hgignore (+1/-0)
Doc/c-api/import.rst (+17/-0)
Doc/library/compileall.rst (+12/-6)
Doc/library/imp.rst (+35/-2)
Doc/library/py_compile.rst (+7/-3)
Doc/library/runpy.rst (+4/-1)
Include/import.h (+3/-0)
Lib/compileall.py (+48/-26)
Lib/importlib/_bootstrap.py (+20/-1)
Lib/importlib/test/__main__.py (+6/-1)
Lib/importlib/test/source/test_file_loader.py (+5/-4)
Lib/importlib/test/source/test_finder.py (+12/-1)
Lib/importlib/test/source/test_source_encoding.py (+1/-1)
Lib/importlib/test/source/util.py (+11/-8)
Lib/importlib/util.py (+1/-0)
Lib/inspect.py (+1/-0)
Lib/py_compile.py (+27/-21)
Lib/pydoc.py (+2/-1)
Lib/runpy.py (+2/-0)
Lib/site.py (+8/-4)
Lib/test/script_helper.py (+12/-11)
Lib/test/support.py (+64/-26)
Lib/test/test_cmd_line_script.py (+18/-12)
Lib/test/test_compileall.py (+69/-10)
Lib/test/test_frozen.py (+5/-5)
Lib/test/test_imp.py (+125/-2)
Lib/test/test_import.py (+176/-30)
Lib/test/test_pkg.py (+10/-10)
Lib/test/test_pkgimport.py (+14/-12)
Lib/test/test_pydoc.py (+7/-9)
Lib/test/test_runpy.py (+17/-8)
Lib/test/test_site.py (+32/-13)
Lib/test/test_zipfile.py (+8/-1)
Lib/test/test_zipimport.py (+19/-20)
Lib/zipfile.py (+40/-13)
Makefile.pre.in (+1/-0)
Python/import.c (+366/-31)
Python/pythonrun.c (+2/-0)
To merge this branch: bzr merge lp://staging/~barry/python/pep3147
Reviewer Review Type Date Requested Status
Python Development Pending
Review via email: mp+22648@code.staging.launchpad.net

Description of the change

Work-in-progress implementation of PEP 3147

http://www.python.org/dev/peps/pep-3147/

To post a comment you must log in.
lp://staging/~barry/python/pep3147 updated
41150. By raymond.hettinger

Document sorting HowTo

41151. By raymond.hettinger

Add and update itertools recipes.

41152. By raymond.hettinger

Fix nits in itertools recipes.

41153. By georg.brandl

#8213: document behavior of -u on py3k better.

41154. By larry.hastings

Blocked revisions 79590 via svnmerge

........
  r79590 | larry.hastings | 2010-04-02 04:01:35 -0700 (Fri, 02 Apr 2010) | 10 lines

  Capsule-related changes:
  * PyCObject_AsVoidPtr() can now open capsules. This addresses
    most of the remaining backwards-compatibility concerns about
    the conversion of Python 2.7 from CObjects to capsules.
  * CObjects were marked Pending Deprecation.
  * Documentation about this pending deprecation was added to
    cobject.h.
  * The capsule source files were added to the legacy PC build
    processes.
........

41155. By larry.hastings

Blocked revisions 79592 via svnmerge

........
  r79592 | larry.hastings | 2010-04-02 04:18:17 -0700 (Fri, 02 Apr 2010) | 3 lines

  Issue #8235: _socket: Add the constant ``SO_SETFIB``. SO_SETFIB is
  a socket option available on FreeBSD 7.1 and newer.
........

41156. By larry.hastings

- Issue #8235: _socket: Add the constant ``SO_SETFIB``. SO_SETFIB is
  a socket option available on FreeBSD 7.1 and newer.

41157. By ezio.melotti

Merged revisions 79540-79541 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

Add -Wd to the flags used to run the tests (-3 is not necessary here).

........
  r79540 | ezio.melotti | 2010-04-01 01:18:09 +0300 (Thu, 01 Apr 2010) | 1 line

  Add -Wd and -3 to the flags used to run the tests.
........
  r79541 | ezio.melotti | 2010-04-01 01:43:31 +0300 (Thu, 01 Apr 2010) | 1 line

  Add -Wd and -3 to the flags used to run the tests on Windows.
........

41158. By raymond.hettinger

Issue 8257: Decimal constructor to accept float argument.

41159. By andrew.kuchling

Merged revisions 79603 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79603 | andrew.kuchling | 2010-04-02 12:59:16 -0400 (Fri, 02 Apr 2010) | 1 line

  #4440: modernize a use of filter(), making it compatible with 3.x
........

41160. By antoine.pitrou

Furniture is not very reliable these days (buildbot failures).

41161. By florent.xicluna

(partially)

Merged revisions 79534,79537,79539,79558,79606 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79534 | florent.xicluna | 2010-03-31 23:21:54 +0200 (mer, 31 mar 2010) | 2 lines

  Fix test for xml.etree when using a non-ascii path. And use check_warnings instead of catch_warnings.
........
  r79537 | florent.xicluna | 2010-03-31 23:40:32 +0200 (mer, 31 mar 2010) | 2 lines

  Fix typo
........
  r79539 | florent.xicluna | 2010-04-01 00:01:03 +0200 (jeu, 01 avr 2010) | 2 lines

  Replace catch_warnings with check_warnings when it makes sense. Use assertRaises context manager to simplify some tests.
........
  r79558 | florent.xicluna | 2010-04-01 20:17:09 +0200 (jeu, 01 avr 2010) | 2 lines

  #7092: Fix some -3 warnings, and fix Lib/platform.py when the path contains a double-quote.
........
  r79606 | florent.xicluna | 2010-04-02 19:26:42 +0200 (ven, 02 avr 2010) | 2 lines

  Backport some robotparser test and skip the test if the external resource is not available.
........

41162. By raymond.hettinger

Add nice docstrings to namedtuples.

41163. By florent.xicluna

An oversight in previous merge, r79610: test_doctest is sensible to the line numbering.

41164. By georg.brandl

#8288: fix next -> __next__.

41165. By tarek.ziade

Merged revisions 79618 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79618 | tarek.ziade | 2010-04-02 23:14:04 +0200 (Fri, 02 Apr 2010) | 1 line

  removed the local copy of xxmodule, and skip only test_build_ext when xxmodule is not found, not the whole unittest
........

41166. By ezio.melotti

Blocked revisions 79582 via svnmerge

........
  r79582 | georg.brandl | 2010-04-02 11:51:31 +0300 (Fri, 02 Apr 2010) | 1 line

  Fix typo in unicode character name.
........

41167. By brian.curtin

Change test_support to support. Fixes a failing test on Windows.

41168. By benjamin.peterson

Blocked revisions 79636,79639 via svnmerge

........
  r79636 | benjamin.peterson | 2010-04-02 18:59:41 -0500 (Fri, 02 Apr 2010) | 4 lines

  always check _PyString_Resize for error

  also normalize how this error is checked
........
  r79639 | benjamin.peterson | 2010-04-02 19:57:33 -0500 (Fri, 02 Apr 2010) | 1 line

  more _PyString_Resize error checking
........

41169. By benjamin.peterson

Merged revisions 79642,79644 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79642 | benjamin.peterson | 2010-04-02 20:08:34 -0500 (Fri, 02 Apr 2010) | 1 line

  split out large test function
........
  r79644 | benjamin.peterson | 2010-04-02 20:28:57 -0500 (Fri, 02 Apr 2010) | 1 line

  give TypeError when trying to set T_STRING_INPLACE
........

41170. By victor.stinner

Blocked revisions 79654 via svnmerge

........
  r79654 | victor.stinner | 2010-04-03 10:40:16 +0200 (sam., 03 avril 2010) | 5 lines

  Issue #8227: Fix C API documentation, argument parsing

   * 'z', 'z#', 'z*' does also accept Unicode
   * unify types name: replace "string or Unicode objet" by "string or Unicode"
........

41171. By tarek.ziade

Merged revisions 79652 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79652 | tarek.ziade | 2010-04-03 10:37:59 +0200 (Sat, 03 Apr 2010) | 1 line

  Issue #1222585: Added LDCXXSHARED for C++ support
........

41172. By raymond.hettinger

Add a subtract() method to collections.Counter()

41173. By mark.dickinson

Merged revisions 79661 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79661 | mark.dickinson | 2010-04-03 11:27:05 +0100 (Sat, 03 Apr 2010) | 14 lines

  Fix a couple of issues with the test_structmembersType class in _testcapimodule

   - rename to _test_structmembersType to avoid the class being automatically
     called by test_capi

   - allow space for trailing NUL in inplace_member field of all_structmembers

   - use T_STRING_INPLACE instead of T_INPLACE_STRING as keyword argument
     to _test_structmembersType initializer

   - don't attempt to initialize inplace_member field if T_STRING_INPLACE
     argument wasn't supplied.
........

41174. By mark.dickinson

Merged revisions 79583,79588-79589 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79583 | mark.dickinson | 2010-04-02 09:53:22 +0100 (Fri, 02 Apr 2010) | 7 lines

  Issue #2531: Make float-to-decimal comparisons return correct results.

  Float to decimal comparison operations now return a result based on
  the numeric values of the operands. Decimal.__hash__ has also been
  fixed so that Decimal and float values that compare equal have equal
  hash value.
........
  r79588 | mark.dickinson | 2010-04-02 11:17:07 +0100 (Fri, 02 Apr 2010) | 2 lines

  Issue #7279: Make comparisons involving a Decimal sNaN signal InvalidOperation.
........
  r79589 | mark.dickinson | 2010-04-02 11:35:12 +0100 (Fri, 02 Apr 2010) | 6 lines

  Issue #7279: Make Decimal('nan') hashable. Decimal('snan') remains unhashable.

  Also rewrite the Decimal __hash__ method so that it doesn't rely on
  float('inf') being valid: float('inf') could raise an exception on
  platforms not using IEEE 754 arithmetic.
........

41175. By mark.dickinson

Merged revisions 79629 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79629 | mark.dickinson | 2010-04-02 23:27:36 +0100 (Fri, 02 Apr 2010) | 2 lines

  Issue #8294: Allow float and Decimal arguments in Fraction constructor.
........

41176. By mark.dickinson

Remove unused define.

41177. By ezio.melotti

Merged revisions 79678 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79678 | ezio.melotti | 2010-04-03 17:51:00 +0300 (Sat, 03 Apr 2010) | 1 line

  Use more specific assert* methods in test_decimal.
........

41178. By mark.dickinson

Clean up integer tests in test_struct, and bring them more in line with the trunk tests.

41179. By mark.dickinson

Internal refactoring in struct.pack: make all integer conversions go through get_pylong.

41180. By ezio.melotti

Add -bb to rt.bat to do some extra checks during the tests (it is already used by the non-Windows buildbots).

41181. By ezio.melotti

Blocked revisions 79624 via svnmerge

........
  r79624 | ezio.melotti | 2010-04-03 00:43:10 +0300 (Sat, 03 Apr 2010) | 1 line

  Fix test_compiler.py that was using unittest.__file__ to find Lib/ (unittest is now a package).
........

41182. By benjamin.peterson

Blocked revisions 79693,79695 via svnmerge

........
  r79693 | benjamin.peterson | 2010-04-03 10:38:38 -0500 (Sat, 03 Apr 2010) | 1 line

  wrap
........
  r79695 | benjamin.peterson | 2010-04-03 10:40:29 -0500 (Sat, 03 Apr 2010) | 1 line

  remove unneeded argument
........

41183. By mark.dickinson

Merged revisions 79699 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79699 | mark.dickinson | 2010-04-03 16:47:46 +0100 (Sat, 03 Apr 2010) | 1 line

  Add Misc/NEWS entry for r79609.
........

41184. By mark.dickinson

Merged revisions 79674 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79674 | mark.dickinson | 2010-04-03 15:05:10 +0100 (Sat, 03 Apr 2010) | 3 lines

  Issue #8300: Let struct.pack use __index__ to convert and pack non-integers.
  Based on a patch by Meador Inge.
........

41185. By benjamin.peterson

Blocked revisions 79697-79698,79704 via svnmerge

........
  r79697 | benjamin.peterson | 2010-04-03 10:44:56 -0500 (Sat, 03 Apr 2010) | 1 line

  silence PyCObject warnings in bsddb
........
  r79698 | benjamin.peterson | 2010-04-03 10:45:59 -0500 (Sat, 03 Apr 2010) | 1 line

  spelling
........
  r79704 | benjamin.peterson | 2010-04-03 10:58:15 -0500 (Sat, 03 Apr 2010) | 1 line

  remove deprecation warnings silence attempting
........

41186. By mark.dickinson

Blocked revisions 79707 via svnmerge

........
  r79707 | mark.dickinson | 2010-04-03 17:41:20 +0100 (Sat, 03 Apr 2010) | 5 lines

  Ensure 'module removed' warning messages contain the word 'module' or 'package'.

  This should fix the test_py3kwarn failure on OS X. test_support.import_module
  also requires this.
........

41187. By mark.dickinson

Blocked revisions 79714 via svnmerge

........
  r79714 | mark.dickinson | 2010-04-03 19:17:54 +0100 (Sat, 03 Apr 2010) | 1 line

  Silence DeprecationWarnings from uses of has_key and <> in plat-mac.
........

41188. By benjamin.peterson

Blocked revisions 79712 via svnmerge

........
  r79712 | raymond.hettinger | 2010-04-03 12:10:05 -0500 (Sat, 03 Apr 2010) | 1 line

  Silence a compiler warning.
........

41189. By benjamin.peterson

Blocked revisions 79718-79719 via svnmerge

........
  r79718 | antoine.pitrou | 2010-04-03 16:42:18 -0500 (Sat, 03 Apr 2010) | 3 lines

  Remove useless (?) import from r79706
........
  r79719 | benjamin.peterson | 2010-04-03 16:50:40 -0500 (Sat, 03 Apr 2010) | 1 line

  import bsddb more robustly
........

41190. By benjamin.peterson

Merged revisions 79723 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79723 | benjamin.peterson | 2010-04-03 17:48:51 -0500 (Sat, 03 Apr 2010) | 1 line

  ensure that the locale does not affect the tokenization of identifiers
........

41191. By benjamin.peterson

Merged revisions 79725 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79725 | benjamin.peterson | 2010-04-03 18:03:35 -0500 (Sat, 03 Apr 2010) | 4 lines

  use our own locale independent ctype macros

  requires building pyctype.o into pgen
........

41192. By raymond.hettinger

Add count() method to collections.deque().

41193. By benjamin.peterson

add missing decrefs

41194. By ezio.melotti

Fix versionchanged from 2.7 to 3.2 in decimal.rst.

41195. By ezio.melotti

Merged revisions 79733,79735 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79733 | ezio.melotti | 2010-04-04 09:41:27 +0300 (Sun, 04 Apr 2010) | 1 line

  Add a versionadded to Counter.subtract() doc.
........
  r79735 | ezio.melotti | 2010-04-04 09:50:58 +0300 (Sun, 04 Apr 2010) | 1 line

  Revert 79733 - Counter is new in 2.7, the versionadded is not necessary - and fix a typo.
........

41196. By ezio.melotti

Recorded merge of revisions 79660 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79660 | raymond.hettinger | 2010-04-03 13:22:00 +0300 (Sat, 03 Apr 2010) | 1 line

  Add subtract() method to collections.Counter() objects.
........

41197. By ezio.melotti

Merged revisions 79740 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79740 | ezio.melotti | 2010-04-04 10:00:02 +0300 (Sun, 04 Apr 2010) | 1 line

  Use more specific assert* methods in test_struct.
........

41198. By mark.dickinson

Merged revisions 79745 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79745 | mark.dickinson | 2010-04-04 09:43:04 +0100 (Sun, 04 Apr 2010) | 3 lines

  Issue #8300 (__index__ handling in struct.pack): Remove redundant check
  and improve test coverage. Thanks Meador Inge for the patch.
........

41199. By mark.dickinson

Merged revisions 79751 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79751 | mark.dickinson | 2010-04-04 22:19:35 +0100 (Sun, 04 Apr 2010) | 1 line

  A handful of whitespace fixes in Modules/_struct.c.
........

41200. By mark.dickinson

Merged revisions 79756 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79756 | mark.dickinson | 2010-04-04 23:09:21 +0100 (Sun, 04 Apr 2010) | 6 lines

  Add versionchanged entry for Decimal(float) construction.

  Also add an example of constructing a Decimal directly from a float,
  update the quickstart tutorial, and tweak another couple of
  sentences.
........

41201. By benjamin.peterson

Merged revisions 79762 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79762 | benjamin.peterson | 2010-04-04 18:01:03 -0500 (Sun, 04 Apr 2010) | 1 line

  tabify
........

41202. By benjamin.peterson

Merged revisions 79763 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79763 | benjamin.peterson | 2010-04-04 18:03:22 -0500 (Sun, 04 Apr 2010) | 1 line

  fix tabs
........

41203. By benjamin.peterson

Blocked revisions 79769 via svnmerge

........
  r79769 | benjamin.peterson | 2010-04-04 18:23:22 -0500 (Sun, 04 Apr 2010) | 1 line

  fix dis on new style classes #8310
........

41204. By benjamin.peterson

factor out constant

41205. By ezio.melotti

Merged revisions 79768 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79768 | ezio.melotti | 2010-04-05 02:21:53 +0300 (Mon, 05 Apr 2010) | 1 line

  Fix markup in decimal.rst.
........

41206. By philip.jenvey

Merged revisions 79779 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79779 | philip.jenvey | 2010-04-04 19:51:51 -0700 (Sun, 04 Apr 2010) | 2 lines

  fix escape_encode to return the correct consumed size
........

41207. By ezio.melotti

Merged revisions 79781 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79781 | ezio.melotti | 2010-04-05 06:51:38 +0300 (Mon, 05 Apr 2010) | 1 line

  #8212: rephrase the webservers howto and fix some mistakes.
........

41208. By ezio.melotti

Merged revisions 79788 via svnmerge from
svn+ssh://<email address hidden>/python/trunk

........
  r79788 | ezio.melotti | 2010-04-05 11:16:41 +0300 (Mon, 05 Apr 2010) | 1 line

  Fix markup errors.
........

41209. By Barry Warsaw

branch merge

41210. By Barry Warsaw

Ensure that no .pyc file outside of __pycache__ is written by the test suite.

41211. By Barry Warsaw

merge trunk

41212. By Barry Warsaw

Many updates based on Rietveld review by Antoine Pitrou.

41213. By Barry Warsaw

trunk merge

41214. By Barry Warsaw

trunk merge

41215. By Barry Warsaw

trunk merge

41216. By Barry Warsaw

Second round of Rietveld comments.

* Added documentation for cache_from_source(), source_from_cache(), and
  magic_tags.
* Use addCleanup() where appropriate.
* Other style cleanup.

41217. By Barry Warsaw

Test repairs.

41218. By Barry Warsaw

trunk merge

41219. By Barry Warsaw

Fixes for Windows compatibility.

41220. By Barry Warsaw

Be more aggressive for Windows.

41221. By Barry Warsaw

trunk merge

41222. By Barry Warsaw

Benjamin makes a good point that debug_override should accept true-ish and
false-ish values (when not None) to more closely mirror a pure-Python
implementation.

41223. By Barry Warsaw

* Add __cached__ attribute to modules.
* PyImport_ExecCodeModuleEx() gets a new parameter.

41224. By Barry Warsaw

Remove some unnecessary code.

41225. By Barry Warsaw

Based on Guido's recommendation, add PyImport_ExecCodeModuleExEx()

41226. By Barry Warsaw

trunk merge

41227. By Barry Warsaw

* PyImport_ExecCodeModuleExEx() -> PyImport_ExecCodeModuleWithPathnames()
* Document the above.
* Added PyImport_GetMagicTag() and document.
* Removed imp.magic_tags and replaced with imp.get_tag().

41228. By Barry Warsaw

More responses to Rietveld and mailing list comments. The most important
change here is an additional guard against buffer overflows in
make_compiled_pathname().

41229. By Barry Warsaw

trunk merge

41230. By Barry Warsaw

Patches from Brian Curtin for Windows.

41231. By Barry Warsaw

Support -b flag for compile to create legacy .pyc files. This does not delete
the source files.

41232. By Barry Warsaw

Document extended compileall options.

41233. By Barry Warsaw

trunk merge

41234. By Barry Warsaw

Make sure __cache__ shows up in modules executed via command line and -m
(runpy). Update runpy documentation.

41235. By Barry Warsaw

Typo.

41236. By Barry Warsaw

trunk merge

41237. By Barry Warsaw

* abs__file__() -> abs_paths() since this now also modifies m.__cached__
* actually make test_abs_path() not suck.

41238. By Barry Warsaw

trunk merge

41239. By Barry Warsaw

trunk merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: