Brett Cannon
2348eda37b
Note in the intro to Extending... that ctypes can be a simpler, more portable solution than custom C code.
2009-09-17 03:24:45 +00:00
Benjamin Peterson
fd1fcffced
pep 8 defaults
2009-09-17 03:18:28 +00:00
Benjamin Peterson
4d714cbbf1
kill bare except
2009-09-17 02:46:54 +00:00
Mark Dickinson
aa2adc828a
Issue #6713 : Improve performance of str(n) and repr(n) for integers n
...
(up to 3.1 times faster in tests), by special-casing base 10 in
_PyLong_Format. (Backport of r74851 from py3k.)
2009-09-16 22:10:56 +00:00
Thomas Wouters
2920adb4df
Add news entry for r74841.
2009-09-16 20:36:34 +00:00
Georg Brandl
0674d3fb5f
#6844 : do not emit DeprecationWarnings on access if Exception.message has been set by the user.
...
This works by always setting it in __dict__, except when it's implicitly set in __init__.
2009-09-16 20:30:09 +00:00
Mark Dickinson
4676048b43
Remove outdated include; this include was breaking OS X builds using
...
non-Apple gcc4.3 and gcc4.4 (because CoreFoundation/CoreFoundation.h
won't compile under non-Apple gcc).
2009-09-16 20:26:31 +00:00
Thomas Wouters
c4dcb3801e
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.
2009-09-16 19:55:54 +00:00
Georg Brandl
69dfe8d80e
Make the pdb displayhook compatible with the standard displayhook: do not print Nones. Add a test for that.
2009-09-16 16:36:39 +00:00
Georg Brandl
6c39f06ab2
Remove some more boilerplate from the actual tests in test_pdb.
2009-09-16 16:22:12 +00:00
Georg Brandl
a50d20a5b1
Rewrap long lines.
2009-09-16 15:57:46 +00:00
Ezio Melotti
2e85f503b1
#6879 - fix misstatement about exceptions
2009-09-16 13:14:05 +00:00
Georg Brandl
718b221e06
#6892 : fix optparse example involving help option.
2009-09-16 13:11:06 +00:00
Georg Brandl
d7226ffe0b
Remove strange trailing commas.
2009-09-16 13:06:22 +00:00
Georg Brandl
f4e6b98b01
#5621 : refactor description of how class/instance attributes interact on a.x=a.x+1 or augassign.
2009-09-16 10:12:06 +00:00
Georg Brandl
83130c3942
#6891 : comment out dead link to Unicode article.
2009-09-16 09:30:48 +00:00
Georg Brandl
b29709adc8
#6876 : fix base class constructor invocation in example.
2009-09-16 09:24:57 +00:00
Georg Brandl
49bb9b7f0a
#6880 : add reference to classes section in exceptions section, which comes earlier.
2009-09-16 09:23:04 +00:00
Georg Brandl
076ca5a430
Make deprecation notices as visible as warnings are right now.
2009-09-16 09:05:11 +00:00
Ronald Oussoren
0180565054
Update distutils.util tests after my changes
...
to --with-universal-archs
2009-09-15 21:24:07 +00:00
Georg Brandl
480b455e46
Add Armin Ronacher.
2009-09-15 20:26:59 +00:00
Ronald Oussoren
5d90029041
Finish support for --with-universal-archs=intel
...
and --with-universal-archs=3-way (issue6245)
2009-09-15 19:13:15 +00:00
Ezio Melotti
038f38d3ac
#6917 - typo in method name
2009-09-15 18:41:43 +00:00
Ronald Oussoren
91a11a46c0
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.
2009-09-15 18:33:33 +00:00
Benjamin Peterson
ea7120c7c1
Py_SetPythonHome uses static storage #6913
2009-09-15 03:36:26 +00:00
Georg Brandl
58d23fbb6c
#6908 : fix association of hashlib hash attributes.
2009-09-14 14:50:47 +00:00
Georg Brandl
7eb43b7c70
#6574 : list the future features in a table.
2009-09-14 14:08:54 +00:00
Ezio Melotti
2c7b4934ad
#6904 - fix broken link
2009-09-14 00:48:31 +00:00
Michael Foord
dc0460a309
Remove an extraneous space in unittest documentation.
2009-09-13 19:08:18 +00:00
Michael Foord
e91ea56b30
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.
2009-09-13 19:07:03 +00:00
Georg Brandl
6848d82a7c
Typo fix.
2009-09-13 18:15:07 +00:00
Michael Foord
5a9719d627
unittest.TestLoader.loadTestsFromName honors the loader suiteClass attribute. Issue 6866.
2009-09-13 17:28:35 +00:00
Michael Foord
ee2df03009
Tutorial tweaks. Issue 6849.
2009-09-13 17:07:46 +00:00
Michael Foord
668be589ef
Note that sys._getframe is not guaranteed to exist in all implementations of Python, and a corresponding note in inspect.currentframe. Issue 6712.
2009-09-13 16:46:19 +00:00
Michael Foord
c3f79373e8
Objects that compare equal automatically pass or fail assertAlmostEqual and assertNotAlmostEqual tests on unittest.TestCase. Issue 6567.
2009-09-13 16:40:02 +00:00
Michael Foord
60931a5a58
Change to tutorial wording for reading text / binary files on Windows. Issue #6301 .
2009-09-13 16:13:36 +00:00
Matthias Klose
924eab64a3
Issue #6635 : Fix profiler printing usage message.
2009-09-13 15:09:24 +00:00
Mark Dickinson
1f4fc097f6
Fix potential signed-overflow bug in _PyLong_Format; also fix
...
a couple of whitespace issues.
2009-09-13 11:56:13 +00:00
Benjamin Peterson
3d85454bca
update urls
2009-09-13 01:59:31 +00:00
Ezio Melotti
1036a7f7e1
#6026 - fix tests that failed without zlib
2009-09-12 14:43:43 +00:00
Lars Gustäbel
21121e64b4
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.
2009-09-12 10:28:15 +00:00
Georg Brandl
d4c7eb1647
Move function back to its section.
2009-09-11 07:55:20 +00:00
Georg Brandl
ffdde9e959
Properly document copy and deepcopy as functions.
2009-09-09 16:49:13 +00:00
Benjamin Peterson
93ed82048f
revert unintended changes
2009-09-09 11:42:57 +00:00
Benjamin Peterson
8246968b12
tabbify
2009-09-09 11:40:54 +00:00
Tarek Ziadé
bed26a3ce3
Issue #6163 : Fixed HP-UX runtime library dir options in distutils.unixcompiler
2009-09-09 08:14:20 +00:00
Benjamin Peterson
7f6d0834f9
#6865 fix ref counting in initialization of pwd module
2009-09-08 23:04:22 +00:00
Mark Dickinson
5cfa8044ff
Issue #6857 : Fix Decimal formatting to be consistent with existing float
...
formatting: both are now right-aligned by default.
2009-09-08 20:20:19 +00:00
Thomas Heller
81809a42c1
Make ctypes compile again with older Python versions.
2009-09-08 19:24:36 +00:00
Ronald Oussoren
84ddd72312
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.
2009-09-08 07:17:10 +00:00