]> granicus.if.org Git - python/log
python
12 years agoMerged cookbook update from 3.2.
Vinay Sajip [Mon, 16 Apr 2012 14:29:28 +0000 (15:29 +0100)]
Merged cookbook update from 3.2.

12 years agoAdded cookbook example for BOM insertion.
Vinay Sajip [Mon, 16 Apr 2012 14:28:50 +0000 (15:28 +0100)]
Added cookbook example for BOM insertion.

12 years agoCloses #14452: remove BOM insertion code.
Vinay Sajip [Mon, 16 Apr 2012 13:44:31 +0000 (14:44 +0100)]
Closes #14452: remove BOM insertion code.

12 years agoCloses #14452: remove BOM insertion code.
Vinay Sajip [Mon, 16 Apr 2012 13:39:53 +0000 (14:39 +0100)]
Closes #14452: remove BOM insertion code.

12 years agoFix #10854. Make use of the new path and name attributes on ImportError
Brian Curtin [Mon, 16 Apr 2012 05:10:17 +0000 (00:10 -0500)]
Fix #10854. Make use of the new path and name attributes on ImportError
for extension modules on Windows.

12 years agomerge
Brett Cannon [Mon, 16 Apr 2012 02:28:45 +0000 (22:28 -0400)]
merge

12 years agoIssue #13959: Re-implement imp.load_package() in imp.py.
Brett Cannon [Mon, 16 Apr 2012 02:28:28 +0000 (22:28 -0400)]
Issue #13959: Re-implement imp.load_package() in imp.py.

Thanks to Eric Snow for helping with imp.load_module() (previous
commit) which led to the removal of a bunch of C code.

12 years agoIssue #14589: Update certificate chain for sha256.tbs-internet.com, fixing a test...
Antoine Pitrou [Mon, 16 Apr 2012 01:37:35 +0000 (03:37 +0200)]
Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing a test failure in test_ssl.

12 years agoIssue #14589: Update certificate chain for sha256.tbs-internet.com, fixing a test...
Antoine Pitrou [Mon, 16 Apr 2012 01:34:44 +0000 (03:34 +0200)]
Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing a test failure in test_ssl.

12 years agoIssue #13959: Re-implement imp.load_module() in imp.py.
Brett Cannon [Mon, 16 Apr 2012 00:25:23 +0000 (20:25 -0400)]
Issue #13959: Re-implement imp.load_module() in imp.py.

12 years agomerge
Brett Cannon [Sun, 15 Apr 2012 23:06:40 +0000 (19:06 -0400)]
merge

12 years agoConsider load_dynamic() something to keep in _imp.
Brett Cannon [Sun, 15 Apr 2012 23:06:23 +0000 (19:06 -0400)]
Consider load_dynamic() something to keep in _imp.

12 years agoTry to get hg to treat importlib.h as binary.
Brett Cannon [Sun, 15 Apr 2012 23:05:31 +0000 (19:05 -0400)]
Try to get hg to treat importlib.h as binary.

12 years agoIssue #14386: Expose the dict_proxy internal type as types.MappingProxyType
Victor Stinner [Sun, 15 Apr 2012 22:16:30 +0000 (00:16 +0200)]
Issue #14386: Expose the dict_proxy internal type as types.MappingProxyType

12 years agoIssue #13959: Simplify imp.reload() by relying on a module's
Brett Cannon [Sun, 15 Apr 2012 21:56:09 +0000 (17:56 -0400)]
Issue #13959: Simplify imp.reload() by relying on a module's
__loader__.

Since import now sets __loader__ on all modules it creates and
imp.reload() already relied on the attribute for modules that import
didn't create, the only potential compatibility issue is if people
were deleting the attribute on modules and expecting imp.reload() to
continue to work.

12 years agoUpdate importlib.h
Brett Cannon [Sun, 15 Apr 2012 21:47:19 +0000 (17:47 -0400)]
Update importlib.h

12 years agoIssue #13959: Rename imp to _imp and add Lib/imp.py and begin
Brett Cannon [Sun, 15 Apr 2012 20:08:47 +0000 (16:08 -0400)]
Issue #13959: Rename imp to _imp and add Lib/imp.py and begin
rewriting functionality in pure Python.

To start, imp.new_module() has been rewritten in pure Python, put into
importlib (privately) and then publicly exposed in imp.

12 years agomerge
Brett Cannon [Sun, 15 Apr 2012 19:25:10 +0000 (15:25 -0400)]
merge

12 years agoIssue #14582: Import returns the module returned by a loader instead
Brett Cannon [Sun, 15 Apr 2012 19:24:04 +0000 (15:24 -0400)]
Issue #14582: Import returns the module returned by a loader instead
of sys.modules when possible.

This is being done for two reasons. One is to gain a little bit of
performance by skipping an unnecessary dict lookup in sys.modules. But
the other (and main) reason is to be a little bit more clear in how
things should work from the perspective of import's interactions with
loaders. Otherwise loaders can easily forget to return the module even
though PEP 302 explicitly states they are expected to return the module
they loaded.

12 years agoutilize startswith(tuple)
Philip Jenvey [Sun, 15 Apr 2012 19:21:32 +0000 (12:21 -0700)]
utilize startswith(tuple)

12 years agoSet ImportError.name when raising the exception in the case of None
Brett Cannon [Sun, 15 Apr 2012 18:15:31 +0000 (14:15 -0400)]
Set ImportError.name when raising the exception in the case of None
found in sys.modules.

12 years agoIssue #13496: Merge from 3.2
Mark Dickinson [Sun, 15 Apr 2012 15:32:04 +0000 (16:32 +0100)]
Issue #13496: Merge from 3.2

12 years agoIssue 13496: Fix bisect.bisect overflow bug for large collections.
Mark Dickinson [Sun, 15 Apr 2012 15:30:35 +0000 (16:30 +0100)]
Issue 13496: Fix bisect.bisect overflow bug for large collections.

12 years agoIssue #13889: Merge fix from 3.2.
Mark Dickinson [Sun, 15 Apr 2012 14:12:37 +0000 (15:12 +0100)]
Issue #13889: Merge fix from 3.2.

12 years agoIssue #13889: On MSVC builds, set FPU control word at runtime for all string <->...
Mark Dickinson [Sun, 15 Apr 2012 14:10:56 +0000 (15:10 +0100)]
Issue #13889: On MSVC builds, set FPU control word at runtime for all string <-> float conversions.  Patch by Samuel Iseli and Stefan Krah.

12 years agoIssue #10576: Add a progress callback to gcmodule
Kristján Valur Jónsson [Sun, 15 Apr 2012 11:41:32 +0000 (11:41 +0000)]
Issue #10576: Add a progress callback to gcmodule

12 years agoMerge with 3.2: use ws2_32.lib rather than wsock32.lib on windows.
Kristján Valur Jónsson [Sun, 15 Apr 2012 11:14:46 +0000 (11:14 +0000)]
Merge with 3.2: use ws2_32.lib rather than wsock32.lib on windows.

12 years agoMake all socket related modules link with ws2_32.lib on windows, like
Kristján Valur Jónsson [Sun, 15 Apr 2012 11:12:57 +0000 (11:12 +0000)]
Make all socket related modules link with ws2_32.lib on windows, like
_socket does.  Some were using the older wsock32.lib.

12 years agoMerge with remote.
Ross Lagerwall [Sun, 15 Apr 2012 06:23:09 +0000 (08:23 +0200)]
Merge with remote.

12 years agoBe less verbose when building dbm.
Ross Lagerwall [Sun, 15 Apr 2012 06:19:35 +0000 (08:19 +0200)]
Be less verbose when building dbm.

12 years agoPlug a refleak.
Brett Cannon [Sun, 15 Apr 2012 05:35:05 +0000 (01:35 -0400)]
Plug a refleak.

12 years agoClarify that one should not use __import__() directly. Also mention
Brett Cannon [Sun, 15 Apr 2012 01:58:33 +0000 (21:58 -0400)]
Clarify that one should not use __import__() directly. Also mention
PEP 328 in explaining how 'index' works.

12 years agoHandle importing pkg.mod by executing
Brett Cannon [Sun, 15 Apr 2012 01:50:00 +0000 (21:50 -0400)]
Handle importing pkg.mod by executing
__import__('mod', {'__packaging__': 'pkg', level=1) w/o properly (and
thus not segfaulting).

12 years agoRebuild importlib.h to incorporate added comments.
Brett Cannon [Sun, 15 Apr 2012 01:18:48 +0000 (21:18 -0400)]
Rebuild importlib.h to incorporate added comments.

12 years agoIDLE was relying on implicit relative imports which have gone away in
Brett Cannon [Sun, 15 Apr 2012 00:44:23 +0000 (20:44 -0400)]
IDLE was relying on implicit relative imports which have gone away in
Python 3.3 thanks to importlib finishing the work in PEP 328 that
accidently got carried forward.

12 years agoAdd some comments.
Brett Cannon [Sat, 14 Apr 2012 22:37:07 +0000 (18:37 -0400)]
Add some comments.

12 years agomerge with the tip
Brian Curtin [Sat, 14 Apr 2012 19:20:29 +0000 (14:20 -0500)]
merge with the tip

12 years agoFix Windows build
Brian Curtin [Sat, 14 Apr 2012 19:19:33 +0000 (14:19 -0500)]
Fix Windows build

12 years agoFix an import race condition.
Brett Cannon [Sat, 14 Apr 2012 19:06:17 +0000 (15:06 -0400)]
Fix an import race condition.

12 years agoTry to fix a sporadic test failure from what is probably a caching race condition.
Brett Cannon [Sat, 14 Apr 2012 18:38:19 +0000 (14:38 -0400)]
Try to fix a sporadic test failure from what is probably a caching race condition.

12 years agoUndo a C99 idiom.
Brett Cannon [Sat, 14 Apr 2012 18:23:49 +0000 (14:23 -0400)]
Undo a C99 idiom.

12 years agoIssue #2377: Make importlib the implementation of __import__().
Brett Cannon [Sat, 14 Apr 2012 18:10:13 +0000 (14:10 -0400)]
Issue #2377: Make importlib the implementation of __import__().

importlib._bootstrap is now frozen into Python/importlib.h and stored
as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen
code along with sys and imp and then uses _frozen_importlib._install()
to set builtins.__import__() w/ _frozen_importlib.__import__().

12 years agomerge with 3.2
Sandro Tosi [Sat, 14 Apr 2012 14:01:49 +0000 (16:01 +0200)]
merge with 3.2

12 years agofix typo; thanks to Jérôme Mainka from docs@
Sandro Tosi [Sat, 14 Apr 2012 14:01:17 +0000 (16:01 +0200)]
fix typo; thanks to Jérôme Mainka from docs@

12 years agoMerge highlight and spacing fixes in json example with 3.2.
Ezio Melotti [Sat, 14 Apr 2012 03:05:36 +0000 (21:05 -0600)]
Merge highlight and spacing fixes in json example with 3.2.

12 years agoFix highlight and spacing in json example.
Ezio Melotti [Sat, 14 Apr 2012 03:02:18 +0000 (21:02 -0600)]
Fix highlight and spacing in json example.

12 years ago#14535: merge with 3.2.
Ezio Melotti [Sat, 14 Apr 2012 02:52:29 +0000 (20:52 -0600)]
#14535: merge with 3.2.

12 years ago#14535: fix code highlight in multiprocessing examples. Patch by Tshepang Lekhonkhobe.
Ezio Melotti [Sat, 14 Apr 2012 02:50:48 +0000 (20:50 -0600)]
#14535: fix code highlight in multiprocessing examples.  Patch by Tshepang Lekhonkhobe.

12 years agoMerge #14399: corrected news item
R David Murray [Sat, 14 Apr 2012 01:27:19 +0000 (21:27 -0400)]
Merge #14399: corrected news item

12 years ago#14399: corrected news item
R David Murray [Sat, 14 Apr 2012 01:24:27 +0000 (21:24 -0400)]
#14399: corrected news item

12 years agomerge 3.2
Benjamin Peterson [Fri, 13 Apr 2012 22:06:42 +0000 (18:06 -0400)]
merge 3.2

12 years agomove outside WITH_THREAD conditional
Benjamin Peterson [Fri, 13 Apr 2012 22:06:36 +0000 (18:06 -0400)]
move outside WITH_THREAD conditional

12 years agoFix clock_gettime/getres/settime: PyArg_ParseTuple() expects an int
Victor Stinner [Fri, 13 Apr 2012 21:44:05 +0000 (23:44 +0200)]
Fix clock_gettime/getres/settime: PyArg_ParseTuple() expects an int

Only use a single #ifdef for the 3 functions.

12 years agoMinor docstring / docs corrections for unittest.mock
Michael Foord [Fri, 13 Apr 2012 19:51:20 +0000 (20:51 +0100)]
Minor docstring / docs corrections for unittest.mock

12 years agoMake unittest.mock.create_autospec resilient against AttributeError on original object
Michael Foord [Fri, 13 Apr 2012 16:39:16 +0000 (17:39 +0100)]
Make unittest.mock.create_autospec resilient against AttributeError on original object

12 years agomerge 3.2
Benjamin Peterson [Fri, 13 Apr 2012 15:59:52 +0000 (11:59 -0400)]
merge 3.2

12 years agotake linkage def outside of WITH_THREAD conditional (closes #14569)
Benjamin Peterson [Fri, 13 Apr 2012 15:58:27 +0000 (11:58 -0400)]
take linkage def outside of WITH_THREAD conditional (closes #14569)

12 years agounittest.mock.PropertyMock return value and attributes are now standard MagicMocks
Michael Foord [Fri, 13 Apr 2012 15:57:22 +0000 (16:57 +0100)]
unittest.mock.PropertyMock return value and attributes are now standard MagicMocks

12 years agoput PyImportErrorObject with its brothers
Benjamin Peterson [Fri, 13 Apr 2012 01:50:35 +0000 (21:50 -0400)]
put PyImportErrorObject with its brothers

12 years agoMerge
Brett Cannon [Fri, 13 Apr 2012 01:13:08 +0000 (21:13 -0400)]
Merge

12 years agoNEWS entry about importlib and ImportError's new attributes.
Brett Cannon [Fri, 13 Apr 2012 01:12:37 +0000 (21:12 -0400)]
NEWS entry about importlib and ImportError's new attributes.

12 years agoHave importlib take advantage of ImportError's new 'name' and 'path'
Brett Cannon [Fri, 13 Apr 2012 01:09:01 +0000 (21:09 -0400)]
Have importlib take advantage of ImportError's new 'name' and 'path'
attributes.

12 years agomerge heads
Amaury Forgeot d'Arc [Fri, 13 Apr 2012 00:29:54 +0000 (02:29 +0200)]
merge heads

12 years agomerge heads
Amaury Forgeot d'Arc [Fri, 13 Apr 2012 00:27:37 +0000 (02:27 +0200)]
merge heads

12 years agoMerge heads
Amaury Forgeot d'Arc [Fri, 13 Apr 2012 00:24:56 +0000 (02:24 +0200)]
Merge heads

12 years agoIssue #1559549: Add 'name' and 'path' attributes to ImportError.
Brett Cannon [Fri, 13 Apr 2012 00:24:54 +0000 (20:24 -0400)]
Issue #1559549: Add 'name' and 'path' attributes to ImportError.
Currently import does not use these attributes as they are planned
for use by importlib (which will be another commit).

Thanks to Filip Gruszczyński for the initial patch and Brian Curtin
for refining it.

12 years agohg merge 3.2
Amaury Forgeot d'Arc [Fri, 13 Apr 2012 00:23:59 +0000 (02:23 +0200)]
hg merge 3.2

12 years agoIssue14559: Fix build files old Microft compilers.
Amaury Forgeot d'Arc [Fri, 13 Apr 2012 00:14:28 +0000 (02:14 +0200)]
Issue14559: Fix build files old Microft compilers.
With VS8.0 at least Python compiles and works correctly.

12 years agoMerge #14399: zipfile now correctly handles comments added to empty zipfiles.
R David Murray [Thu, 12 Apr 2012 22:44:58 +0000 (18:44 -0400)]
Merge #14399: zipfile now correctly handles comments added to empty zipfiles.

Patch by Serhiy Storchaka.

This also moves the TypeError that results from trying to use a unicode
comment from the 'close' step to the point at which the comment is added to
the zipfile.

12 years ago#14399: zipfile now correctly handles comments added to empty zipfiles.
R David Murray [Thu, 12 Apr 2012 22:44:42 +0000 (18:44 -0400)]
#14399: zipfile now correctly handles comments added to empty zipfiles.

Patch by Serhiy Storchaka.

This also moves the TypeError that results from trying to use a unicode
comment from the 'close' step to the point at which the comment is added to
the zipfile.

12 years agoDoc: sort time.CLOCK_xxx constants
Victor Stinner [Thu, 12 Apr 2012 19:40:14 +0000 (21:40 +0200)]
Doc: sort time.CLOCK_xxx constants

12 years agoNull-merge 3.2 branch.
Georg Brandl [Thu, 12 Apr 2012 17:41:50 +0000 (19:41 +0200)]
Null-merge 3.2 branch.

12 years ago3.2 sidebar: link to 3.3, not 3.1
Georg Brandl [Thu, 12 Apr 2012 17:41:10 +0000 (19:41 +0200)]
3.2 sidebar: link to 3.3, not 3.1

12 years agoIssue #14557: Fix extensions build on HP-UX. Patch by Adi Roiban.
Charles-François Natali [Thu, 12 Apr 2012 17:09:00 +0000 (19:09 +0200)]
Issue #14557: Fix extensions build on HP-UX. Patch by Adi Roiban.

12 years agoIssue #14557: Fix extensions build on HP-UX. Patch by Adi Roiban.
Charles-François Natali [Thu, 12 Apr 2012 17:07:25 +0000 (19:07 +0200)]
Issue #14557: Fix extensions build on HP-UX. Patch by Adi Roiban.

12 years agocode improvement. 'as cm' not required when not used. Review comment by Georg Brandl
Senthil Kumaran [Thu, 12 Apr 2012 11:28:07 +0000 (19:28 +0800)]
code improvement. 'as cm' not required when not used. Review comment by Georg Brandl

12 years agoMerge doc fixes #14553 and #14552.
R David Murray [Thu, 12 Apr 2012 00:15:10 +0000 (20:15 -0400)]
Merge doc fixes #14553 and #14552.

12 years ago#14553: fix word order.
R David Murray [Thu, 12 Apr 2012 00:13:25 +0000 (20:13 -0400)]
#14553: fix word order.

Patch by Tshepang Lekhonkhobe.

12 years ago#14552: remove redundant wording in 'test' docs.
R David Murray [Thu, 12 Apr 2012 00:11:53 +0000 (20:11 -0400)]
#14552: remove redundant wording in 'test' docs.

Original patch by Tshepang Lekhonkhobe.

12 years agomerge 3.2 (null)
Benjamin Peterson [Wed, 11 Apr 2012 20:49:40 +0000 (16:49 -0400)]
merge 3.2 (null)

12 years agomerge 3.1 (null)
Benjamin Peterson [Wed, 11 Apr 2012 20:48:30 +0000 (16:48 -0400)]
merge 3.1 (null)

12 years agoafter 3.1.5
Benjamin Peterson [Wed, 11 Apr 2012 20:46:54 +0000 (16:46 -0400)]
after 3.1.5

12 years ago#14508: make gprof2html script runnable under python3
R David Murray [Wed, 11 Apr 2012 19:17:37 +0000 (15:17 -0400)]
#14508: make gprof2html script runnable under python3

Not that I haven't tested it to make sure it works, just that it
can run against an empty source file.

Initial patch by Popa.Claudiu.

Here we also add a test (which uses mock, which is why I didn't
check it in on 3.2).

12 years ago#14508: make gprof2html script runnable under python3
R David Murray [Wed, 11 Apr 2012 19:16:38 +0000 (15:16 -0400)]
#14508: make gprof2html script runnable under python3

Not that I haven't tested it to make sure it works, just that it
can run against an empty source file.

Initial patch by Popa.Claudiu.

12 years agomerge to default - Issue 10484 - Incorporate improvements to CGI module - Suggested...
Senthil Kumaran [Wed, 11 Apr 2012 18:37:11 +0000 (02:37 +0800)]
merge to default - Issue 10484 - Incorporate improvements to CGI module - Suggested by Glenn Linderman. Refactor code and tests

12 years ago3.2 - Issue 10484 - Incorporate improvements to CGI module - Suggested by Glenn Linde...
Senthil Kumaran [Wed, 11 Apr 2012 18:34:32 +0000 (02:34 +0800)]
3.2 - Issue 10484 - Incorporate improvements to CGI module - Suggested by Glenn Linderman. Refactor code and tests

12 years agoImprove the threading.Condition docs.
Antoine Pitrou [Wed, 11 Apr 2012 17:38:27 +0000 (19:38 +0200)]
Improve the threading.Condition docs.

12 years agoImprove the threading.Condition docs.
Antoine Pitrou [Wed, 11 Apr 2012 17:37:56 +0000 (19:37 +0200)]
Improve the threading.Condition docs.

12 years ago#14545: merge 3.2
Georg Brandl [Wed, 11 Apr 2012 16:36:58 +0000 (18:36 +0200)]
#14545: merge 3.2

12 years agoMerge 3.2
Georg Brandl [Wed, 11 Apr 2012 16:36:46 +0000 (18:36 +0200)]
Merge 3.2

12 years agoCloses #14545: make clearer what was added.
Georg Brandl [Wed, 11 Apr 2012 16:33:17 +0000 (18:33 +0200)]
Closes #14545: make clearer what was added.

12 years agouse assertWarns instead of check_warnings - Issue14341
Senthil Kumaran [Wed, 11 Apr 2012 15:05:49 +0000 (23:05 +0800)]
use assertWarns instead of check_warnings - Issue14341

12 years agoMerge 3.2.3 release clone.
Georg Brandl [Wed, 11 Apr 2012 10:46:24 +0000 (12:46 +0200)]
Merge 3.2.3 release clone.

12 years agoPost-release update.
Georg Brandl [Wed, 11 Apr 2012 10:45:12 +0000 (12:45 +0200)]
Post-release update.

12 years agoMake the trace module ignore modules whose names start with "<" and
Brett Cannon [Wed, 11 Apr 2012 01:05:53 +0000 (21:05 -0400)]
Make the trace module ignore modules whose names start with "<" and
end with ">", i.e. follow convention.

12 years ago1) Remove claim of an input invariant that is only true for static mpd_t.
Stefan Krah [Tue, 10 Apr 2012 21:11:54 +0000 (23:11 +0200)]
1) Remove claim of an input invariant that is only true for static mpd_t.
   Resizing is used _inside_ libmpdec functions, and it is permitted to
   change x->alloc several times while setting x->len at the end of the
   function. Therefore, for dynamic mpd_t x->alloc can _temporarily_ drop
   below x->len. Of course the final result always has x->len <= x->alloc.

   For static mpd_t this cannot happen, since resizing to a smaller
   coefficient is a no-op.

2) Remove micro optimization in mpd_switch_to_dyn(): Previously only the
   valid initialized part of the existing coefficient up to x->len was
   copied to the new dynamic memory area. Now copying does the same as
   realloc() and the entire old memory area is copied.

   The rationale for this change is that it is no longer needed to memorize
   the explanation given in 1).

12 years agoFix stale comment.
Stefan Krah [Tue, 10 Apr 2012 21:08:29 +0000 (23:08 +0200)]
Fix stale comment.

12 years agoMerge
Antoine Pitrou [Tue, 10 Apr 2012 20:51:26 +0000 (22:51 +0200)]
Merge

12 years agoSmall improvements to the threading docs: better publicize support for the with state...
Antoine Pitrou [Tue, 10 Apr 2012 20:47:55 +0000 (22:47 +0200)]
Small improvements to the threading docs: better publicize support for the with statement.

12 years agoFix some markup in the threading docs.
Antoine Pitrou [Tue, 10 Apr 2012 20:35:53 +0000 (22:35 +0200)]
Fix some markup in the threading docs.