]> granicus.if.org Git - python/log
python
14 years agocode style
Benjamin Peterson [Fri, 3 Dec 2010 01:44:10 +0000 (01:44 +0000)]
code style

14 years agoInitial implementation of Lib/test/__main__.py so we can run tests with 'python ...
Michael Foord [Fri, 3 Dec 2010 01:34:01 +0000 (01:34 +0000)]
Initial implementation of Lib/test/__main__.py so we can run tests with 'python -m test'

14 years agoIssue 7911: unittest.TestCase.longMessage defaults to True for improved failure messa...
Michael Foord [Fri, 3 Dec 2010 00:53:09 +0000 (00:53 +0000)]
Issue 7911: unittest.TestCase.longMessage defaults to True for improved failure messages by default

14 years agoRe-add accidentally removed line.
Georg Brandl [Thu, 2 Dec 2010 22:35:25 +0000 (22:35 +0000)]
Re-add accidentally removed line.

14 years agoFix wrong test code in test_csv (#10602)
Éric Araujo [Thu, 2 Dec 2010 22:16:19 +0000 (22:16 +0000)]
Fix wrong test code in test_csv (#10602)

14 years agoIssue9915: speeding up sorting with a key
Daniel Stutzbach [Thu, 2 Dec 2010 21:55:33 +0000 (21:55 +0000)]
Issue9915: speeding up sorting with a key

14 years ago#8989: add 'domain' keyword to make_msgid.
R. David Murray [Thu, 2 Dec 2010 21:47:19 +0000 (21:47 +0000)]
#8989: add 'domain' keyword to make_msgid.

Patch by Adrian von Bidder.

14 years agoFix #9333. Expose os.symlink on Windows only when usable.
Brian Curtin [Thu, 2 Dec 2010 18:29:18 +0000 (18:29 +0000)]
Fix #9333. Expose os.symlink on Windows only when usable.

In order to create symlinks on Windows, SeCreateSymbolicLinkPrivilege
is an account privilege that is required to be held by the user. Not only
must the privilege be enabled for the account, the activated privileges for
the currently running application must be adjusted to enable the requested
privilege.

Rather than exposing an additional function to be called prior to the user's
first os.symlink call, we handle the AdjustTokenPrivileges Windows API call
internally and only expose os.symlink when the privilege escalation was
successful.

Due to the change of only exposing os.symlink when it's available, we can
go back to the original test skipping methods of checking via `hasattr`.

14 years ago#7475: add (un)transform method to bytes/bytearray and str, add back codecs that...
Georg Brandl [Thu, 2 Dec 2010 18:06:51 +0000 (18:06 +0000)]
#7475: add (un)transform method to bytes/bytearray and str, add back codecs that can be used with them from Python 2.

14 years ago#10597: fix Py_SetPythonHome docs by pointing to where the meaning of PYTHONHOME...
Georg Brandl [Thu, 2 Dec 2010 18:02:01 +0000 (18:02 +0000)]
#10597: fix Py_SetPythonHome docs by pointing to where the meaning of PYTHONHOME is already documented.

14 years agoFix spelling of Jamie Zawinski's surname in urllib.parse docstring (issue 10606)
David Malcolm [Thu, 2 Dec 2010 16:41:00 +0000 (16:41 +0000)]
Fix spelling of Jamie Zawinski's surname in urllib.parse docstring (issue 10606)

14 years agoFix-up documentation of makedirs().
Georg Brandl [Thu, 2 Dec 2010 09:06:12 +0000 (09:06 +0000)]
Fix-up documentation of makedirs().

14 years agoIssue 9299 Add exist_ok parameter to os.makedirs to suppress 'File exists' exception...
Terry Reedy [Thu, 2 Dec 2010 07:05:56 +0000 (07:05 +0000)]
Issue 9299 Add exist_ok parameter to os.makedirs to suppress 'File exists' exception. Patch by Ray Allen.

14 years agoNeaten-up random module docs.
Raymond Hettinger [Thu, 2 Dec 2010 05:35:35 +0000 (05:35 +0000)]
Neaten-up random module docs.

14 years agoIssue #9573: os.fork now works when triggered as a side effect of import (the wisdom...
Nick Coghlan [Thu, 2 Dec 2010 04:11:46 +0000 (04:11 +0000)]
Issue #9573: os.fork now works when triggered as a side effect of import (the wisdom of actually relying on this remains questionable!)

14 years ago#10464: fix netrc handling of lines with embedded '#" characters.
R. David Murray [Thu, 2 Dec 2010 02:58:07 +0000 (02:58 +0000)]
#10464: fix netrc handling of lines with embedded '#" characters.

Patch by Xuanji Li.

14 years agoAdd an example to the random docs.
Raymond Hettinger [Thu, 2 Dec 2010 02:41:33 +0000 (02:41 +0000)]
Add an example to the random docs.

14 years agoFix markup
Raymond Hettinger [Thu, 2 Dec 2010 01:38:25 +0000 (01:38 +0000)]
Fix markup

14 years agoIssue4335: Added a test for inspect.getsourcelines with a module without EOL at EOF.
Alexander Belopolsky [Thu, 2 Dec 2010 00:10:11 +0000 (00:10 +0000)]
Issue4335: Added a test for inspect.getsourcelines with a module without EOL at EOF.

14 years agoWith Raymond's approval added a paragraph describing Unicode 6.0.0 changes. Not...
Alexander Belopolsky [Thu, 2 Dec 2010 00:05:57 +0000 (00:05 +0000)]
With Raymond's approval added a paragraph describing Unicode 6.0.0 changes.  Not reST formatted.

14 years agoClean-up last update (missing comma, unnecessary spacing change, spurious backtick).
Raymond Hettinger [Wed, 1 Dec 2010 23:45:20 +0000 (23:45 +0000)]
Clean-up last update (missing comma, unnecessary spacing change, spurious backtick).

14 years agoAdd itertools.accumulate().
Raymond Hettinger [Wed, 1 Dec 2010 22:50:36 +0000 (22:50 +0000)]
Add itertools.accumulate().

14 years agoAdd itertools.accumulate().
Raymond Hettinger [Wed, 1 Dec 2010 22:48:00 +0000 (22:48 +0000)]
Add itertools.accumulate().

14 years agoReverted unintended change from r86916
Alexander Belopolsky [Wed, 1 Dec 2010 21:55:40 +0000 (21:55 +0000)]
Reverted unintended change from r86916

14 years agoIssue #4113: Added custom __repr__ method to functools.partial.
Alexander Belopolsky [Wed, 1 Dec 2010 20:05:49 +0000 (20:05 +0000)]
Issue #4113: Added custom __repr__ method to functools.partial.

14 years agoFix some markup and style in the unittest docs.
Georg Brandl [Wed, 1 Dec 2010 15:44:25 +0000 (15:44 +0000)]
Fix some markup and style in the unittest docs.

14 years ago#10594: fix parameter names in PyList API docs.
Georg Brandl [Wed, 1 Dec 2010 15:36:33 +0000 (15:36 +0000)]
#10594: fix parameter names in PyList API docs.

14 years agoAdd missing word, and add a better reference to the actual function.
Georg Brandl [Wed, 1 Dec 2010 15:32:43 +0000 (15:32 +0000)]
Add missing word, and add a better reference to the actual function.

14 years agoAdd recipe to itertools doc.
Raymond Hettinger [Wed, 1 Dec 2010 10:49:19 +0000 (10:49 +0000)]
Add recipe to itertools doc.

14 years agoIssue 10593: Adopt Nick's suggestion for an lru_cache with maxsize=None.
Raymond Hettinger [Wed, 1 Dec 2010 03:45:41 +0000 (03:45 +0000)]
Issue 10593:  Adopt Nick's suggestion for an lru_cache with maxsize=None.

14 years ago#10273: Rename assertRegexpMatches and assertRaisesRegexp to assertRegex and assertRa...
Ezio Melotti [Wed, 1 Dec 2010 02:32:32 +0000 (02:32 +0000)]
#10273: Rename assertRegexpMatches and assertRaisesRegexp to assertRegex and assertRaisesRegex.

14 years agoFix test failure in debug builds and add NEWS entry for r86908
Ezio Melotti [Wed, 1 Dec 2010 01:45:53 +0000 (01:45 +0000)]
Fix test failure in debug builds and add NEWS entry for r86908

14 years ago#10535: Enable silenced warnings in unittest by default
Ezio Melotti [Wed, 1 Dec 2010 00:56:10 +0000 (00:56 +0000)]
#10535: Enable silenced warnings in unittest by default

14 years agoDoc and docstring nits.
Raymond Hettinger [Wed, 1 Dec 2010 00:47:56 +0000 (00:47 +0000)]
Doc and docstring nits.

14 years agoFix #10591. Fix test_os for refleak runs.
Brian Curtin [Tue, 30 Nov 2010 23:46:54 +0000 (23:46 +0000)]
Fix #10591. Fix test_os for refleak runs.
Split a common setUp/tearDown into the appropriate parts.

14 years agoIssue #8685: Speed up set difference `a - b` when source set `a` is
Antoine Pitrou [Tue, 30 Nov 2010 22:23:20 +0000 (22:23 +0000)]
Issue #8685: Speed up set difference `a - b` when source set `a` is
much larger than operand `b`.  Patch by Andrew Bennetts.

14 years agoAdd link to specification.
Raymond Hettinger [Tue, 30 Nov 2010 20:32:59 +0000 (20:32 +0000)]
Add link to specification.

14 years agoDocumentation nits.
Raymond Hettinger [Tue, 30 Nov 2010 20:02:57 +0000 (20:02 +0000)]
Documentation nits.

14 years agoAdd example, tighten text, and minor clean-ups.
Raymond Hettinger [Tue, 30 Nov 2010 19:15:45 +0000 (19:15 +0000)]
Add example, tighten text, and minor clean-ups.

14 years agoFix typo: "ofbytes" should be "of bytes"
Daniel Stutzbach [Tue, 30 Nov 2010 17:49:53 +0000 (17:49 +0000)]
Fix typo: "ofbytes" should be "of bytes"

14 years agoAdd some internal links.
Raymond Hettinger [Tue, 30 Nov 2010 17:45:41 +0000 (17:45 +0000)]
Add some internal links.

14 years agoIssue #9598: untabify.py will now respect encoding cookie in the files it processes
Alexander Belopolsky [Tue, 30 Nov 2010 17:30:43 +0000 (17:30 +0000)]
Issue #9598: untabify.py will now respect encoding cookie in the files it processes

14 years agoLet’s keep “throw” for the generator method and use “raise” elsewhere.
Éric Araujo [Tue, 30 Nov 2010 17:20:31 +0000 (17:20 +0000)]
Let’s keep “throw” for the generator method and use “raise” elsewhere.

14 years agoIssue #10552: Partially fixed a sort error in Tools/unicode/gencodec.py
Alexander Belopolsky [Tue, 30 Nov 2010 16:56:15 +0000 (16:56 +0000)]
Issue #10552: Partially fixed a sort error in Tools/unicode/gencodec.py

14 years agoActually fix what I attempted to fix in r86888...
Brian Curtin [Tue, 30 Nov 2010 15:54:04 +0000 (15:54 +0000)]
Actually fix what I attempted to fix in r86888...

14 years agoIssue 9873: the URL parsing functions now accept ASCII encoded byte sequences in...
Nick Coghlan [Tue, 30 Nov 2010 15:48:08 +0000 (15:48 +0000)]
Issue 9873: the URL parsing functions now accept ASCII encoded byte sequences in addition to character strings

14 years agoTry to fix failures on platforms that can't encode the test characters.
Brian Curtin [Tue, 30 Nov 2010 15:40:04 +0000 (15:40 +0000)]
Try to fix failures on platforms that can't encode the test characters.
Skip the test if encoding fails.

14 years agoFix typo.
Georg Brandl [Tue, 30 Nov 2010 14:57:54 +0000 (14:57 +0000)]
Fix typo.

14 years agoRemove redundant includes of headers that are already included by Python.h.
Georg Brandl [Tue, 30 Nov 2010 09:41:01 +0000 (09:41 +0000)]
Remove redundant includes of headers that are already included by Python.h.

14 years agoInclude structseq.h in Python.h, and remove now-redundant includes in individual...
Georg Brandl [Tue, 30 Nov 2010 09:30:54 +0000 (09:30 +0000)]
Include structseq.h in Python.h, and remove now-redundant includes in individual sources.

14 years agoFix input type for zlib.
Georg Brandl [Tue, 30 Nov 2010 08:20:16 +0000 (08:20 +0000)]
Fix input type for zlib.

14 years ago#10584: fix bad links.
Georg Brandl [Tue, 30 Nov 2010 07:43:28 +0000 (07:43 +0000)]
#10584: fix bad links.

14 years agoNeaten-up a bit.
Raymond Hettinger [Tue, 30 Nov 2010 07:13:04 +0000 (07:13 +0000)]
Neaten-up a bit.

14 years agoIssue 10220: switch to using string constants rather than integers for inspect.getgen...
Nick Coghlan [Tue, 30 Nov 2010 06:36:04 +0000 (06:36 +0000)]
Issue 10220: switch to using string constants rather than integers for inspect.getgeneratorstate() return values and make debugging friendly str() and repr() for generator states a requirement in the test suite

14 years agoIssue 10586: change the new functools.lru_cache implementation to expose the maximum...
Nick Coghlan [Tue, 30 Nov 2010 06:19:46 +0000 (06:19 +0000)]
Issue 10586: change the new functools.lru_cache implementation to expose the maximum and current cache sizes through the public statistics API. This API is now a single function that returns a named tuple.

14 years agoIssue #10572: Moved json tests to Lib/test/json_tests.
Alexander Belopolsky [Tue, 30 Nov 2010 03:03:30 +0000 (03:03 +0000)]
Issue #10572: Moved json tests to Lib/test/json_tests.
Approved by Raymond Hettinger.

14 years agoIssue #10323: Predictable final state for slice().
Raymond Hettinger [Tue, 30 Nov 2010 02:49:29 +0000 (02:49 +0000)]
Issue #10323: Predictable final state for slice().

14 years agoUse booleans where applicable.
Georg Brandl [Mon, 29 Nov 2010 20:19:15 +0000 (20:19 +0000)]
Use booleans where applicable.

14 years agoCode style cleanup in bdb.
Georg Brandl [Mon, 29 Nov 2010 20:12:24 +0000 (20:12 +0000)]
Code style cleanup in bdb.

14 years agoFix heading style inconsistencies.
Georg Brandl [Mon, 29 Nov 2010 14:53:15 +0000 (14:53 +0000)]
Fix heading style inconsistencies.

14 years agoFix indentation bug.
Georg Brandl [Mon, 29 Nov 2010 14:50:54 +0000 (14:50 +0000)]
Fix indentation bug.

14 years agoRemove the comment used while testing.
Senthil Kumaran [Mon, 29 Nov 2010 12:42:29 +0000 (12:42 +0000)]
Remove the comment used while testing.

14 years agoFix #10561 - Fix pdb behavior. Delete the breakpoints by breakpoint number.
Senthil Kumaran [Mon, 29 Nov 2010 11:54:17 +0000 (11:54 +0000)]
Fix #10561 - Fix pdb behavior. Delete the breakpoints by breakpoint number.
Handle multiple breakpoints at same line. Update docs/test.
Patch by Xavier de Gaye.

14 years agoIssue #10565: Iterator ABC should require both __next__ and __iter__.
Raymond Hettinger [Mon, 29 Nov 2010 03:56:12 +0000 (03:56 +0000)]
Issue #10565:  Iterator ABC should require both __next__ and __iter__.

14 years agoUse assertCountEqual instead of assertItemsEqual
Ezio Melotti [Mon, 29 Nov 2010 02:02:10 +0000 (02:02 +0000)]
Use assertCountEqual instead of assertItemsEqual

14 years agoDo not add an obsolete unittest name to Py3.2.
Raymond Hettinger [Mon, 29 Nov 2010 01:38:25 +0000 (01:38 +0000)]
Do not add an obsolete unittest name to Py3.2.

14 years agoFix for #8879.
Brian Curtin [Sun, 28 Nov 2010 23:59:46 +0000 (23:59 +0000)]
Fix for #8879.
Amaury noticed that this was originally written in a way that would fail on
names that can't be encoded with the mbcs codec. Restructured the function
to work with wide names first then narrow names second, to fall in line
with the way other functions are written in posixmodule.c.

14 years agoAdd callable() to the built-in functions table.
Ezio Melotti [Sun, 28 Nov 2010 04:18:54 +0000 (04:18 +0000)]
Add callable() to the built-in functions table.

14 years agothere's now a setup.py switch for this
Benjamin Peterson [Sun, 28 Nov 2010 02:51:28 +0000 (02:51 +0000)]
there's now a setup.py switch for this

14 years agoWindows: fix leak in posix_listdir.
Stefan Krah [Sat, 27 Nov 2010 22:06:49 +0000 (22:06 +0000)]
Windows: fix leak in posix_listdir.

14 years agoIssue #10518: Bring back the callable() builtin.
Antoine Pitrou [Sat, 27 Nov 2010 22:00:11 +0000 (22:00 +0000)]
Issue #10518: Bring back the callable() builtin.
Approved by Guido (BDFL) and Georg (RM).

14 years agoAdd version-added note twice for new difflib SequenceMatcher autojunk parameter.
Terry Reedy [Sat, 27 Nov 2010 20:52:14 +0000 (20:52 +0000)]
Add version-added note twice for new difflib SequenceMatcher autojunk parameter.

14 years agoMake doc for PyErr_Format() up to date.
Antoine Pitrou [Sat, 27 Nov 2010 20:40:43 +0000 (20:40 +0000)]
Make doc for PyErr_Format() up to date.

14 years agoRoumen Petrov's fix for when all paths are absolute. (Issue 10520)
Barry Warsaw [Sat, 27 Nov 2010 20:03:03 +0000 (20:03 +0000)]
Roumen Petrov's fix for when all paths are absolute.  (Issue 10520)

14 years agoFix additional leaks.
Stefan Krah [Sat, 27 Nov 2010 11:44:18 +0000 (11:44 +0000)]
Fix additional leaks.

14 years agoIssue 10242: unittest.assertItemsEqual makes too many assumptions.
Raymond Hettinger [Sat, 27 Nov 2010 09:31:37 +0000 (09:31 +0000)]
Issue 10242: unittest.assertItemsEqual makes too many assumptions.

14 years agoReplace _nbits() with int.bit_length().
Raymond Hettinger [Sat, 27 Nov 2010 08:09:40 +0000 (08:09 +0000)]
Replace _nbits() with int.bit_length().

14 years agoRewrap long lines + minor edits
Éric Araujo [Fri, 26 Nov 2010 23:46:18 +0000 (23:46 +0000)]
Rewrap long lines + minor edits

14 years agoUse link-generating markup (see #9312)
Éric Araujo [Fri, 26 Nov 2010 23:31:07 +0000 (23:31 +0000)]
Use link-generating markup (see #9312)

14 years agoFixed deprecation warnings.
Alexander Belopolsky [Fri, 26 Nov 2010 18:51:39 +0000 (18:51 +0000)]
Fixed deprecation warnings.

14 years agoFurther indentation cleanup.
Stefan Krah [Fri, 26 Nov 2010 16:16:47 +0000 (16:16 +0000)]
Further indentation cleanup.

14 years agoIssue #10383: Fix two leaks.
Stefan Krah [Fri, 26 Nov 2010 12:58:05 +0000 (12:58 +0000)]
Issue #10383: Fix two leaks.

14 years agoBetter example for os.system(): do not change the system time.
Georg Brandl [Fri, 26 Nov 2010 12:12:14 +0000 (12:12 +0000)]
Better example for os.system(): do not change the system time.

14 years agoTypo fix.
Georg Brandl [Fri, 26 Nov 2010 12:10:06 +0000 (12:10 +0000)]
Typo fix.

14 years agoRemove parenthetical remark that is confusing now that the module is not named "__bui...
Georg Brandl [Fri, 26 Nov 2010 12:08:19 +0000 (12:08 +0000)]
Remove parenthetical remark that is confusing now that the module is not named "__builtin__" anymore.

14 years ago#10420: fix docs of bdb.effective().
Georg Brandl [Fri, 26 Nov 2010 12:05:48 +0000 (12:05 +0000)]
#10420: fix docs of bdb.effective().

14 years agoModernize code in effective().
Georg Brandl [Fri, 26 Nov 2010 12:05:27 +0000 (12:05 +0000)]
Modernize code in effective().

14 years agoUse PyLong_FromLong where appropriate.
Georg Brandl [Fri, 26 Nov 2010 11:55:48 +0000 (11:55 +0000)]
Use PyLong_FromLong where appropriate.

14 years ago#10526: fix typo.
Georg Brandl [Fri, 26 Nov 2010 11:50:13 +0000 (11:50 +0000)]
#10526: fix typo.

14 years agoIndentation cleanup.
Stefan Krah [Fri, 26 Nov 2010 10:54:09 +0000 (10:54 +0000)]
Indentation cleanup.

14 years ago s/colour/color/g
Senthil Kumaran [Fri, 26 Nov 2010 02:20:04 +0000 (02:20 +0000)]
 s/colour/color/g

14 years ago#10453 follow-up: Fix test_quiet on Windows, thanks to Stephan Krah.
Éric Araujo [Fri, 26 Nov 2010 00:39:59 +0000 (00:39 +0000)]
#10453 follow-up: Fix test_quiet on Windows, thanks to Stephan Krah.

14 years agoIssue #7094: Add alternate ('#') flag to __format__ methods for float, complex and...
Eric Smith [Thu, 25 Nov 2010 16:08:06 +0000 (16:08 +0000)]
Issue #7094: Add alternate ('#') flag to __format__ methods for float, complex and Decimal. Allows greater control over when decimal points appear. Added to make transitioning from %-formatting easier. '#g' still has a problem with Decimal which I'll fix soon.

14 years agoMouse support and colour to Demo/curses/life.py by Dafydd Crosby
Senthil Kumaran [Thu, 25 Nov 2010 14:56:44 +0000 (14:56 +0000)]
Mouse support and colour to Demo/curses/life.py by Dafydd Crosby

14 years agoFix compilation warnings seen on Windows.
Amaury Forgeot d'Arc [Thu, 25 Nov 2010 08:13:35 +0000 (08:13 +0000)]
Fix compilation warnings seen on Windows.
'typecode' is always an ascii letter, there was no data lost.

14 years agoClean-up docstring, comments, and whitespace.
Raymond Hettinger [Thu, 25 Nov 2010 08:11:57 +0000 (08:11 +0000)]
Clean-up docstring, comments, and whitespace.

14 years agoIssue 2986: Add autojunk paramater to SequenceMatcher to turn off heuristic. Patch...
Terry Reedy [Thu, 25 Nov 2010 06:12:34 +0000 (06:12 +0000)]
Issue 2986: Add autojunk paramater to SequenceMatcher to turn off heuristic. Patch by Terry Reedy, Eli Bendersky, and Simon Cross

14 years agosys.abiflags is not defined on all platforms.
Barry Warsaw [Thu, 25 Nov 2010 03:46:44 +0000 (03:46 +0000)]
sys.abiflags is not defined on all platforms.

14 years agosys.abiflags may not be defined on all platforms.
Barry Warsaw [Thu, 25 Nov 2010 01:34:47 +0000 (01:34 +0000)]
sys.abiflags may not be defined on all platforms.

14 years agoAdd NEWS entry for r86732 and fix double function in the table.
Ezio Melotti [Wed, 24 Nov 2010 22:02:18 +0000 (22:02 +0000)]
Add NEWS entry for r86732 and fix double function in the table.