]> granicus.if.org Git - python/log
python
15 years agoFix issue #1590864, multiple threads and fork() can cause deadlocks, by
Thomas Wouters [Wed, 16 Sep 2009 19:55:54 +0000 (19:55 +0000)]
Fix issue #1590864, multiple threads and fork() can cause deadlocks, by
acquiring the import lock around fork() calls. This prevents other threads
from having that lock while the fork happens, and is the recommended way of
dealing with such issues. There are two other locks we care about, the GIL
and the Thread Local Storage lock. The GIL is obviously held when calling
Python functions like os.fork(), and the TLS lock is explicitly reallocated
instead, while also deleting now-orphaned TLS data.

This only fixes calls to os.fork(), not extension modules or embedding
programs calling C's fork() directly. Solving that requires a new set of API
functions, and possibly a rewrite of the Python/thread_*.c mess. Add a
warning explaining the problem to the documentation in the mean time.

This also changes behaviour a little on AIX. Before, AIX (but only AIX) was
getting the import lock reallocated, seemingly to avoid this very same
problem. This is not the right approach, because the import lock is a
re-entrant one, and reallocating would do the wrong thing when forking while
holding the import lock.

Will backport to 2.6, minus the tiny AIX behaviour change.

15 years agoMake the pdb displayhook compatible with the standard displayhook: do not print Nones...
Georg Brandl [Wed, 16 Sep 2009 16:36:39 +0000 (16:36 +0000)]
Make the pdb displayhook compatible with the standard displayhook: do not print Nones. Add a test for that.

15 years agoRemove some more boilerplate from the actual tests in test_pdb.
Georg Brandl [Wed, 16 Sep 2009 16:22:12 +0000 (16:22 +0000)]
Remove some more boilerplate from the actual tests in test_pdb.

15 years agoRewrap long lines.
Georg Brandl [Wed, 16 Sep 2009 15:57:46 +0000 (15:57 +0000)]
Rewrap long lines.

15 years ago#6879 - fix misstatement about exceptions
Ezio Melotti [Wed, 16 Sep 2009 13:14:05 +0000 (13:14 +0000)]
#6879 - fix misstatement about exceptions

15 years ago#6892: fix optparse example involving help option.
Georg Brandl [Wed, 16 Sep 2009 13:11:06 +0000 (13:11 +0000)]
#6892: fix optparse example involving help option.

15 years agoRemove strange trailing commas.
Georg Brandl [Wed, 16 Sep 2009 13:06:22 +0000 (13:06 +0000)]
Remove strange trailing commas.

15 years ago#5621: refactor description of how class/instance attributes interact on a.x=a.x...
Georg Brandl [Wed, 16 Sep 2009 10:12:06 +0000 (10:12 +0000)]
#5621: refactor description of how class/instance attributes interact on a.x=a.x+1 or augassign.

15 years ago#6891: comment out dead link to Unicode article.
Georg Brandl [Wed, 16 Sep 2009 09:30:48 +0000 (09:30 +0000)]
#6891: comment out dead link to Unicode article.

15 years ago#6876: fix base class constructor invocation in example.
Georg Brandl [Wed, 16 Sep 2009 09:24:57 +0000 (09:24 +0000)]
#6876: fix base class constructor invocation in example.

15 years ago#6880: add reference to classes section in exceptions section, which comes earlier.
Georg Brandl [Wed, 16 Sep 2009 09:23:04 +0000 (09:23 +0000)]
#6880: add reference to classes section in exceptions section, which comes earlier.

15 years agoMake deprecation notices as visible as warnings are right now.
Georg Brandl [Wed, 16 Sep 2009 09:05:11 +0000 (09:05 +0000)]
Make deprecation notices as visible as warnings are right now.

15 years agoUpdate distutils.util tests after my changes
Ronald Oussoren [Tue, 15 Sep 2009 21:24:07 +0000 (21:24 +0000)]
Update distutils.util tests after my changes
to --with-universal-archs

15 years agoAdd Armin Ronacher.
Georg Brandl [Tue, 15 Sep 2009 20:26:59 +0000 (20:26 +0000)]
Add Armin Ronacher.

15 years agoFinish support for --with-universal-archs=intel
Ronald Oussoren [Tue, 15 Sep 2009 19:13:15 +0000 (19:13 +0000)]
Finish support for --with-universal-archs=intel
and --with-universal-archs=3-way (issue6245)

15 years ago#6917 - typo in method name
Ezio Melotti [Tue, 15 Sep 2009 18:41:43 +0000 (18:41 +0000)]
#6917 - typo in method name

15 years agoMacOSX: detect the architectures supported by
Ronald Oussoren [Tue, 15 Sep 2009 18:33:33 +0000 (18:33 +0000)]
MacOSX: detect the architectures supported by
Tk.framework and build _tkinter only for those
architectures.

This replaces the hardcoded solution that is no
longer valid now that 64-bit capable versions of
Tk are available on OSX.

15 years agoPy_SetPythonHome uses static storage #6913
Benjamin Peterson [Tue, 15 Sep 2009 03:36:26 +0000 (03:36 +0000)]
Py_SetPythonHome uses static storage #6913

15 years ago#6908: fix association of hashlib hash attributes.
Georg Brandl [Mon, 14 Sep 2009 14:50:47 +0000 (14:50 +0000)]
#6908: fix association of hashlib hash attributes.

15 years ago#6574: list the future features in a table.
Georg Brandl [Mon, 14 Sep 2009 14:08:54 +0000 (14:08 +0000)]
#6574: list the future features in a table.

15 years ago#6904 - fix broken link
Ezio Melotti [Mon, 14 Sep 2009 00:48:31 +0000 (00:48 +0000)]
#6904 - fix broken link

15 years agoRemove an extraneous space in unittest documentation.
Michael Foord [Sun, 13 Sep 2009 19:08:18 +0000 (19:08 +0000)]
Remove an extraneous space in unittest documentation.

15 years agoTest discovery in unittest will only attempt to import modules that are importable...
Michael Foord [Sun, 13 Sep 2009 19:07:03 +0000 (19:07 +0000)]
Test discovery in unittest will only attempt to import modules that are importable; i.e. their names are valid Python identifiers. If an import fails during discovery this will be recorded as an error and test discovery will continue. Issue 6568.

15 years agoTypo fix.
Georg Brandl [Sun, 13 Sep 2009 18:15:07 +0000 (18:15 +0000)]
Typo fix.

15 years agounittest.TestLoader.loadTestsFromName honors the loader suiteClass attribute. Issue...
Michael Foord [Sun, 13 Sep 2009 17:28:35 +0000 (17:28 +0000)]
unittest.TestLoader.loadTestsFromName honors the loader suiteClass attribute. Issue 6866.

15 years agoTutorial tweaks. Issue 6849.
Michael Foord [Sun, 13 Sep 2009 17:07:46 +0000 (17:07 +0000)]
Tutorial tweaks. Issue 6849.

15 years agoNote that sys._getframe is not guaranteed to exist in all implementations of Python...
Michael Foord [Sun, 13 Sep 2009 16:46:19 +0000 (16:46 +0000)]
Note that sys._getframe is not guaranteed to exist in all implementations of Python, and a corresponding note in inspect.currentframe. Issue 6712.

15 years agoObjects that compare equal automatically pass or fail assertAlmostEqual and assertNot...
Michael Foord [Sun, 13 Sep 2009 16:40:02 +0000 (16:40 +0000)]
Objects that compare equal automatically pass or fail assertAlmostEqual and assertNotAlmostEqual tests on unittest.TestCase. Issue 6567.

15 years agoChange to tutorial wording for reading text / binary files on Windows. Issue #6301.
Michael Foord [Sun, 13 Sep 2009 16:13:36 +0000 (16:13 +0000)]
Change to tutorial wording for reading text / binary files on Windows. Issue #6301.

15 years agoIssue #6635: Fix profiler printing usage message.
Matthias Klose [Sun, 13 Sep 2009 15:09:24 +0000 (15:09 +0000)]
Issue #6635: Fix profiler printing usage message.

15 years agoFix potential signed-overflow bug in _PyLong_Format; also fix
Mark Dickinson [Sun, 13 Sep 2009 11:56:13 +0000 (11:56 +0000)]
Fix potential signed-overflow bug in _PyLong_Format;  also fix
a couple of whitespace issues.

15 years agoupdate urls
Benjamin Peterson [Sun, 13 Sep 2009 01:59:31 +0000 (01:59 +0000)]
update urls

15 years ago#6026 - fix tests that failed without zlib
Ezio Melotti [Sat, 12 Sep 2009 14:43:43 +0000 (14:43 +0000)]
#6026 - fix tests that failed without zlib

15 years agoIssue #6856: Add a filter keyword argument to TarFile.add().
Lars Gustäbel [Sat, 12 Sep 2009 10:28:15 +0000 (10:28 +0000)]
Issue #6856: Add a filter keyword argument to TarFile.add().

The filter argument must be a function that takes a TarInfo
object argument, changes it and returns it again. If the
function returns None the TarInfo object will be excluded
from the archive.
The exclude argument is deprecated from now on, because it
does something similar but is not as flexible.

15 years agoMove function back to its section.
Georg Brandl [Fri, 11 Sep 2009 07:55:20 +0000 (07:55 +0000)]
Move function back to its section.

15 years agoProperly document copy and deepcopy as functions.
Georg Brandl [Wed, 9 Sep 2009 16:49:13 +0000 (16:49 +0000)]
Properly document copy and deepcopy as functions.

15 years agorevert unintended changes
Benjamin Peterson [Wed, 9 Sep 2009 11:42:57 +0000 (11:42 +0000)]
revert unintended changes

15 years agotabbify
Benjamin Peterson [Wed, 9 Sep 2009 11:40:54 +0000 (11:40 +0000)]
tabbify

15 years agoIssue #6163: Fixed HP-UX runtime library dir options in distutils.unixcompiler
Tarek Ziadé [Wed, 9 Sep 2009 08:14:20 +0000 (08:14 +0000)]
Issue #6163: Fixed HP-UX runtime library dir options in distutils.unixcompiler

15 years ago#6865 fix ref counting in initialization of pwd module
Benjamin Peterson [Tue, 8 Sep 2009 23:04:22 +0000 (23:04 +0000)]
#6865 fix ref counting in initialization of pwd module

15 years agoIssue #6857: Fix Decimal formatting to be consistent with existing float
Mark Dickinson [Tue, 8 Sep 2009 20:20:19 +0000 (20:20 +0000)]
Issue #6857: Fix Decimal formatting to be consistent with existing float
formatting:  both are now right-aligned by default.

15 years agoMake ctypes compile again with older Python versions.
Thomas Heller [Tue, 8 Sep 2009 19:24:36 +0000 (19:24 +0000)]
Make ctypes compile again with older Python versions.

15 years agoThis is an update to r74701. How hard can it be to get a configure test right.
Ronald Oussoren [Tue, 8 Sep 2009 07:17:10 +0000 (07:17 +0000)]
This is an update to r74701. How hard can it be to get a configure test right.

This patch has already been backported as part of the backport of r74701,
which is how I found this problem.

15 years ago#Issue 6795: Fix infinite recursion in long(Decimal('nan')); change int(Decimal...
Mark Dickinson [Mon, 7 Sep 2009 18:04:58 +0000 (18:04 +0000)]
#Issue 6795:  Fix infinite recursion in long(Decimal('nan'));  change int(Decimal('nan')) to raise ValueError instead of either returning NaN or raising InvalidContext.

15 years agoIssue #6850: Fix bug in Decimal._parse_format_specifier for formats
Mark Dickinson [Mon, 7 Sep 2009 16:17:41 +0000 (16:17 +0000)]
Issue #6850: Fix bug in Decimal._parse_format_specifier for formats
with no type specifier.

15 years agorevert r74699 since it loses useful error information
Benjamin Peterson [Mon, 7 Sep 2009 13:02:15 +0000 (13:02 +0000)]
revert r74699 since it loses useful error information

15 years agoFix typo in configure.in
Ronald Oussoren [Mon, 7 Sep 2009 06:12:00 +0000 (06:12 +0000)]
Fix typo in configure.in

15 years agoPyObject_GetIter can set an error for its self just fine
Benjamin Peterson [Sun, 6 Sep 2009 22:43:39 +0000 (22:43 +0000)]
PyObject_GetIter can set an error for its self just fine

15 years agoIssue #6848: Fix curses module build failure on OS X 10.6.
Mark Dickinson [Sun, 6 Sep 2009 21:21:05 +0000 (21:21 +0000)]
Issue #6848:  Fix curses module build failure on OS X 10.6.

15 years agoRemove redundant assignment
Mark Dickinson [Sun, 6 Sep 2009 20:51:37 +0000 (20:51 +0000)]
Remove redundant assignment

15 years agoFix for issue 4937
Ronald Oussoren [Sun, 6 Sep 2009 12:23:18 +0000 (12:23 +0000)]
Fix for issue 4937

15 years agoIssue #6847: s/bytes/bytearray/ in some bytearray error messages. Thanks Hagen Fürst...
Mark Dickinson [Sun, 6 Sep 2009 10:32:21 +0000 (10:32 +0000)]
Issue #6847: s/bytes/bytearray/ in some bytearray error messages.  Thanks Hagen Fürstenau.

15 years agoIssue #6846: bytearray.pop was returning ints in the range [-128, 128)
Mark Dickinson [Sun, 6 Sep 2009 10:03:31 +0000 (10:03 +0000)]
Issue #6846: bytearray.pop was returning ints in the range [-128, 128)
instead of [0, 256).  Thanks Hagen Fürstenau for the report and fix.

15 years agoFix build issues on OSX 10.6 (issue 6802)
Ronald Oussoren [Sun, 6 Sep 2009 10:00:26 +0000 (10:00 +0000)]
Fix build issues on OSX 10.6 (issue 6802)

15 years ago#6843: add link from filterwarnings to where the meaning of the arguments is covered.
Georg Brandl [Sat, 5 Sep 2009 16:47:17 +0000 (16:47 +0000)]
#6843: add link from filterwarnings to where the meaning of the arguments is covered.

15 years agoAdd configure-time checks for gamma and error functions.
Mark Dickinson [Sat, 5 Sep 2009 10:27:00 +0000 (10:27 +0000)]
Add configure-time checks for gamma and error functions.

15 years ago#6841: remove duplicated word.
Georg Brandl [Sat, 5 Sep 2009 09:04:09 +0000 (09:04 +0000)]
#6841: remove duplicated word.

15 years agonews entry matching r74655
Chris Withers [Fri, 4 Sep 2009 16:32:22 +0000 (16:32 +0000)]
news entry matching r74655

15 years agoFixes issue #6838: use a list to accumulate the value instead of repeatedly concatena...
Chris Withers [Fri, 4 Sep 2009 16:12:32 +0000 (16:12 +0000)]
Fixes issue #6838: use a list to accumulate the value instead of repeatedly concatenating strings.

15 years ago#6777: dont discourage usage of Exception.args or promote usage of Exception.message.
Georg Brandl [Fri, 4 Sep 2009 11:32:18 +0000 (11:32 +0000)]
#6777: dont discourage usage of Exception.args or promote usage of Exception.message.

15 years ago#6756: add some info about the "acct" parameter.
Georg Brandl [Fri, 4 Sep 2009 11:25:37 +0000 (11:25 +0000)]
#6756: add some info about the "acct" parameter.

15 years ago#5101: add back tests to test_funcattrs that were lost during unittest conversion...
Georg Brandl [Fri, 4 Sep 2009 11:19:34 +0000 (11:19 +0000)]
#5101: add back tests to test_funcattrs that were lost during unittest conversion, and make some PEP8 cleanups.

15 years agoIssue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as docum...
Georg Brandl [Fri, 4 Sep 2009 08:17:04 +0000 (08:17 +0000)]
Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as documented.

15 years ago#5047: remove Monterey support from configure.
Georg Brandl [Fri, 4 Sep 2009 07:55:14 +0000 (07:55 +0000)]
#5047: remove Monterey support from configure.

15 years agoIssue #2666: Handle BROWSER environment variable properly for unknown browser names...
Georg Brandl [Fri, 4 Sep 2009 06:59:20 +0000 (06:59 +0000)]
Issue #2666: Handle BROWSER environment variable properly for unknown browser names in the webbrowser module.

15 years agotest_platform fails on OS X Snow Leopard because the UNIX command to get the
Brett Cannon [Thu, 3 Sep 2009 21:25:21 +0000 (21:25 +0000)]
test_platform fails on OS X Snow Leopard because the UNIX command to get the
canonical version, sw_vers, leaves off trailing zeros in the version number
(e.g. 10.6 instead of 10.6.0). Test now compensates by tacking on extra zeros
for the test comparison.

Fixes issue #6806.

15 years agoSorry, sorry! Ignore my previous two commits. I mixed up the version
Armin Rigo [Thu, 3 Sep 2009 19:45:27 +0000 (19:45 +0000)]
Sorry, sorry!  Ignore my previous two commits.  I mixed up the version
of python with which I tried running the crashers.  They don't crash
the current HEAD.

15 years agoDoes not terminate: consume all memory without responding to Ctrl-C.
Armin Rigo [Thu, 3 Sep 2009 19:42:03 +0000 (19:42 +0000)]
Does not terminate: consume all memory without responding to Ctrl-C.
I am not too sure why, but you can surely find out by gdb'ing a bit...

15 years agoFound the next crasher by thinking about this logic in PyPy.
Armin Rigo [Thu, 3 Sep 2009 19:40:07 +0000 (19:40 +0000)]
Found the next crasher by thinking about this logic in PyPy.

15 years ago#6757: complete the list of types that marshal can serialize.
Georg Brandl [Thu, 3 Sep 2009 12:31:39 +0000 (12:31 +0000)]
#6757: complete the list of types that marshal can serialize.

15 years ago#6828: fix wrongly highlighted blocks.
Georg Brandl [Thu, 3 Sep 2009 07:27:26 +0000 (07:27 +0000)]
#6828: fix wrongly highlighted blocks.

15 years ago#6821: fix signature of PyBuffer_Release().
Georg Brandl [Wed, 2 Sep 2009 20:37:16 +0000 (20:37 +0000)]
#6821: fix signature of PyBuffer_Release().

15 years agoremove the check that classmethod's argument is a callable
Benjamin Peterson [Tue, 1 Sep 2009 22:27:57 +0000 (22:27 +0000)]
remove the check that classmethod's argument is a callable

15 years ago#6638: fix wrong parameter name and markup a class.
Georg Brandl [Tue, 1 Sep 2009 08:06:03 +0000 (08:06 +0000)]
#6638: fix wrong parameter name and markup a class.

15 years ago#6810: add a link to the section about frame objects instead of just a description...
Georg Brandl [Tue, 1 Sep 2009 08:00:47 +0000 (08:00 +0000)]
#6810: add a link to the section about frame objects instead of just a description where to find it.

15 years ago#6765: hint that log(x, base) is not very sophisticated.
Georg Brandl [Tue, 1 Sep 2009 07:53:37 +0000 (07:53 +0000)]
#6765: hint that log(x, base) is not very sophisticated.

15 years ago#6808: clarification.
Georg Brandl [Tue, 1 Sep 2009 07:46:26 +0000 (07:46 +0000)]
#6808: clarification.

15 years ago#6813: better documentation for numberless string formats.
Georg Brandl [Tue, 1 Sep 2009 07:40:54 +0000 (07:40 +0000)]
#6813: better documentation for numberless string formats.

15 years agoDoc fix for the issue2637.
Senthil Kumaran [Mon, 31 Aug 2009 16:40:27 +0000 (16:40 +0000)]
Doc fix for the issue2637.

15 years agoIssue #6297: Add autogenerated Misc/python.pc file to make distclean target. Thanks...
Mark Dickinson [Mon, 31 Aug 2009 14:46:07 +0000 (14:46 +0000)]
Issue #6297: Add autogenerated Misc/python.pc file to make distclean target.  Thanks Jerry Chen.

15 years agoother -> others where multiple arguments are accepted.
Georg Brandl [Mon, 31 Aug 2009 06:38:29 +0000 (06:38 +0000)]
other -> others where multiple arguments are accepted.

15 years ago#6801: fix copy-paste oversight.
Georg Brandl [Sun, 30 Aug 2009 11:51:53 +0000 (11:51 +0000)]
#6801: fix copy-paste oversight.

15 years ago#6803: fix old name.
Georg Brandl [Sun, 30 Aug 2009 08:35:01 +0000 (08:35 +0000)]
#6803: fix old name.

15 years ago#6750: TextIOWrapped could duplicate output when several threads write to it.
Amaury Forgeot d'Arc [Sat, 29 Aug 2009 18:14:40 +0000 (18:14 +0000)]
#6750: TextIOWrapped could duplicate output when several threads write to it.
this affect text files opened with io.open(), and the print() function of py3k

15 years agofixed #6801: symmetric_difference_update also accepts pipe
Tarek Ziadé [Sat, 29 Aug 2009 13:33:21 +0000 (13:33 +0000)]
fixed #6801: symmetric_difference_update also accepts pipe

15 years agoSilence gcc 'comparison always false' warning
Mark Dickinson [Fri, 28 Aug 2009 20:46:24 +0000 (20:46 +0000)]
Silence gcc 'comparison always false' warning

15 years agoIssue #6054: Do not normalize stored pathnames.
Lars Gustäbel [Fri, 28 Aug 2009 19:23:44 +0000 (19:23 +0000)]
Issue #6054: Do not normalize stored pathnames.

No longer use tarfile.normpath() on pathnames. Store pathnames
unchanged, i.e. do not remove "./", "../" and "//" occurrences.
However, still convert absolute to relative paths.

15 years agoremove more code for restricted execution
Benjamin Peterson [Fri, 28 Aug 2009 16:49:56 +0000 (16:49 +0000)]
remove more code for restricted execution

15 years agorestricted environments are no more
Benjamin Peterson [Fri, 28 Aug 2009 16:48:03 +0000 (16:48 +0000)]
restricted environments are no more

15 years agoIssue #6794: Fix handling of NaNs in Decimal.compare_total and
Mark Dickinson [Fri, 28 Aug 2009 13:25:02 +0000 (13:25 +0000)]
Issue #6794:  Fix handling of NaNs in Decimal.compare_total and
Decimal.compare_total_mag.

15 years agoIssue 6654
Kristján Valur Jónsson [Thu, 27 Aug 2009 23:13:18 +0000 (23:13 +0000)]
Issue 6654
Allow the XML-RPC server to use the HTTP request path when dispatching.  Added a MultiPathXMLRPCServer class that uses the feature, plus unit tests.

15 years agoissue 6275
Kristján Valur Jónsson [Thu, 27 Aug 2009 22:20:21 +0000 (22:20 +0000)]
issue 6275
Add an "exc_value" attribute to the _AssertRaisesContext context manager in the unittest package.  This allows further tests on the exception that was raised after the context manager exits.

15 years ago#6787: reference fix.
Georg Brandl [Thu, 27 Aug 2009 19:02:43 +0000 (19:02 +0000)]
#6787: reference fix.

15 years agoTypo fix.
Georg Brandl [Thu, 27 Aug 2009 18:59:02 +0000 (18:59 +0000)]
Typo fix.

15 years agoRemove leftover text from end of sentence.
R. David Murray [Thu, 27 Aug 2009 01:04:59 +0000 (01:04 +0000)]
Remove leftover text from end of sentence.

15 years ago#6677: note that rmdir only removes empty directories.
Georg Brandl [Mon, 24 Aug 2009 17:48:40 +0000 (17:48 +0000)]
#6677: note that rmdir only removes empty directories.

15 years agofix pdf building by teaching latex the right encoding package
Benjamin Peterson [Mon, 24 Aug 2009 17:42:36 +0000 (17:42 +0000)]
fix pdf building by teaching latex the right encoding package

15 years ago#6677: mention "deleting" as an alias for removing files.
Georg Brandl [Mon, 24 Aug 2009 17:24:27 +0000 (17:24 +0000)]
#6677: mention "deleting" as an alias for removing files.

15 years ago#6718: fix example.
Georg Brandl [Mon, 24 Aug 2009 17:22:05 +0000 (17:22 +0000)]
#6718: fix example.

15 years ago#6725: spell "namespace" consistently.
Georg Brandl [Mon, 24 Aug 2009 17:20:40 +0000 (17:20 +0000)]
#6725: spell "namespace" consistently.