Commit Graph

4773 Commits

Author SHA1 Message Date
Mark Dickinson 9b02e85e8d Add Marcos Donolo for work on issue 7534 patch. 2009-12-30 12:22:49 +00:00
Mark Dickinson 99d652ef66 Issue #7534: Fix handling of nans, infinities, and negative zero in **
operator, on IEEE 754 platforms.  Thanks Marcos Donolo for original patch.
2009-12-30 12:12:23 +00:00
Ezio Melotti 569e61f351 #5511: Added the ability to use ZipFile as a context manager. Patch by Brian Curtin. 2009-12-30 06:14:51 +00:00
Benjamin Peterson 500ce23384 only build the nis module when the headers are found #7589 2009-12-30 02:58:50 +00:00
Amaury Forgeot d'Arc c8a2ce7670 #7579: Add docstrings to the msvcrt module 2009-12-29 23:06:17 +00:00
Amaury Forgeot d'Arc 8645a5c81f #7413: Passing '\0' as the separator to datetime.datetime.isoformat()
used to drop the time part of the result.
2009-12-29 22:03:38 +00:00
Georg Brandl 740cdc3a9f #7033: add new API function PyErr_NewExceptionWithDoc, for easily giving new exceptions a docstring. 2009-12-28 08:34:58 +00:00
Mark Dickinson 4657283647 Issue #1811: Improve accuracy and consistency of true division for integers. 2009-12-27 14:55:57 +00:00
Ezio Melotti f84caf4eda #6108: unicode(exception) and str(exception) should return the same message 2009-12-24 22:25:17 +00:00
Ronald Oussoren ca8e7ec216 Unittests and news items for the patch in r77026. 2009-12-24 14:50:35 +00:00
Ronald Oussoren b5afe548d4 Fix for issue #7541: python-config --ldflags doesn't pick up libpython2.5.a 2009-12-24 14:17:19 +00:00
Ronald Oussoren 92919a66d2 Issue #6834: replace the implementation for the 'python' and 'pythonw' executables on OSX.
The previous implementation used execv(2) to run the real interpreter, which means that
you cannot use the arch(1) tool to select the architecture you want to use for a
universal build because that only affects the python/pythonw wrapper and not the actual
interpreter.

The new version uses posix_spawnv with a number of OSX-specific options that ensure that
the real interpreter is started using the same CPU architecture as the wrapper, and that
means that 'arch -ppc python' now actually works.

I've also changed the way that the wrapper looks for the framework: it is now linked to
the framework rather than hardcoding the framework path. This should make it easier to
provide pythonw support in tools like virtualenv.
2009-12-24 13:30:58 +00:00
Tarek Ziadé 0479eb5a30 added a note about #7556 in Misc/NEWS 2009-12-21 23:37:44 +00:00
Martin v. Löwis b4261d5965 Add NEWS for OpenSSL changes. 2009-12-21 19:29:59 +00:00
Mark Dickinson e31d300664 Issue #7528: Backport PyLong_AsLongAndOverflow from py3k to trunk.
Thanks Case Van Horsen for the patch.
2009-12-21 11:21:25 +00:00
Tarek Ziadé 2421d56e02 Fixed #7552: fixed distutils.command.upload failure on very long passwords 2009-12-20 23:23:34 +00:00
R. David Murray 77e48ba993 Issue #7376: When called with no arguments doctest was running a
self-test.  Because of a change to the way tracebacks are printed,
this self-test was failing.  The test is run (and passes) during normal
regression testing.  So instead of running the failing self-test this
patch makes doctest emit a usage message.  This is better behavior anyway
since passing in arguments is the real reason to run doctest as a command.

Bug discovery and initial patch by Florent Xicluna.
2009-12-20 16:46:06 +00:00
Senthil Kumaran 7713acf201 Fix for issue 7291 - urllib2 cannot handle https with proxy requiring auth
Refactored HTTPHandler tests and added testcase for proxy authorization.
2009-12-20 06:05:13 +00:00
Mark Dickinson 5ff37ae14b Issue #3366: Add error function and complementary error function to
math module.
2009-12-19 11:07:23 +00:00
Mark Dickinson 9cae178f21 Issue #3366: Add expm1 function to math module. Thanks Eric Smith for
testing on Windows.
2009-12-16 20:13:40 +00:00
R. David Murray 98e3df38fd Issue #7396: fix -s, which was broken by the -j enhancement. 2009-12-16 11:49:46 +00:00
R. David Murray c7298ff0fa Issue #7498: make test_multiprocessing use test_support.find_unused_port
instead of a hard coded port number in test_rapid_restart.
2009-12-14 21:57:39 +00:00
R. David Murray 0a0a1a842c Issue #1680159: unicode coercion during an 'in' operation was masking
any errors that might occur during coercion of the left operand and
turning them into a TypeError with a message text that was confusing in
the given context.  This patch lets any errors through, as was already
done during coercion of the right hand side.
2009-12-14 16:28:26 +00:00
Benjamin Peterson ddd392cbb9 accept None as the same as having passed no argument in file types #7349
This is for consistency with imitation file objects like StringIO and BytesIO.

This commit also adds a few tests, where they were lacking for concerned
methods.
2009-12-13 19:19:07 +00:00
Benjamin Peterson c4771d2fe1 add NEWS note 2009-12-13 17:31:31 +00:00
Benjamin Peterson 4895af4ef1 fix the ignoring of __cmp__ method on metaclasses #7491 2009-12-13 16:36:53 +00:00
Antoine Pitrou 2a08b42e95 Add NEWS entry as per RDM's suggestion (the bug was actually present
in 2.7 alpha 1)
2009-12-13 16:18:14 +00:00
Lars Gustäbel 92ca7561bb Issue #7357: No longer suppress fatal extraction errors by
default.

TarFile's errorlevel argument controls how errors are
handled that occur during extraction. There are three
possible levels 0, 1 and 2. If errorlevel is set to 1 or 2
fatal errors (e.g. a full filesystem) are raised as
exceptions. If it is set to 0, which is the default value,
extraction errors are suppressed, and error messages are
written to the debug log instead. But, if the debug log is
not activated, which is the default as well, all these
errors go unnoticed.

The original intention was to imitate GNU tar which tries
to extract as many members as possible instead of stopping
on the first error. It turns out that this is no good
default behaviour for a tar library. This patch simply
changes the default value for the errorlevel argument from
0 to 1, so that fatal extraction errors are raised as
EnvironmentError exceptions.
2009-12-13 11:32:27 +00:00
Mark Dickinson 9be87bc992 Issue #3366: Add lgamma function to math module. 2009-12-11 17:29:33 +00:00
Vinay Sajip 5cc4e2a040 Issue #7470: logging: fix bug in Unicode encoding fallback. 2009-12-11 09:16:01 +00:00
Raymond Hettinger a5fd24e97d Add a reverse() method to collections.deque(). 2009-12-10 06:42:54 +00:00
Raymond Hettinger 0b3263b073 Fix variants of deque.extend: d.extend(d) d+=d d.extendleft(d) 2009-12-10 06:00:33 +00:00
R. David Murray 93321f333c Issue 5949: fixed IMAP4_SSL hang when the IMAP server response is
missing proper end-of-line termination.  Patch and tests by
Scott Dial.  The new tests include a test harness which will
make it easier to add additional tests.
2009-12-09 15:15:31 +00:00
Antoine Pitrou 8c54e7819a Fix the transient refleaks in test_zipimport_support.
Diagnosis and original patch by Florent Xicluna (flox).
2009-12-08 19:25:51 +00:00
Antoine Pitrou 187177fc55 Issue #6986: Fix crash in the JSON C accelerator when called with the
wrong parameter types.  Patch by Victor Stinner.
2009-12-08 15:40:51 +00:00
Tarek Ziadé a939ecd95b Issue #7457: added a read_pkg_file method to distutils.dist.DistributionMetadata so we can read back PKG-INFO files 2009-12-08 08:56:49 +00:00
Vinay Sajip 4830566751 logging: Added optional 'secure' parameter to SMTPHandler. 2009-12-06 17:57:11 +00:00
Tarek Ziadé 4f38317d5a Fixed #1923: make sure we don't strip meaningful whitespace in PKG-INFO Description field 2009-12-06 09:22:40 +00:00
Benjamin Peterson 3513c87a21 fix date 2009-12-05 18:48:13 +00:00
Benjamin Peterson 4f51baf466 post release version bump 2009-12-05 18:40:02 +00:00
Benjamin Peterson d78cec5f39 bump version to 2.7a1 2009-12-05 17:47:56 +00:00
Benjamin Peterson 3b94c0bb10 move RPM spec for 2.7 2009-12-05 17:46:33 +00:00
Mark Dickinson 2628590970 Add missing issue number in Misc/NEWS entry. 2009-12-04 11:30:16 +00:00
R. David Murray 820b0ea36c Issue 7431: use TESTFN in test_linecache instead of trying to create a
file in the Lib/test directory, which might be read-only for the
user running the tests.
2009-12-03 23:57:59 +00:00
Martin v. Löwis 642017224a Add Christoph Gohlke, for the issue 4120 work. 2009-12-03 21:01:16 +00:00
Martin v. Löwis c218a2fac8 Issue #4120: Drop reference to CRT from manifest when building
extensions with msvc9compiler.
2009-12-03 20:53:51 +00:00
Benjamin Peterson 91c12ebc3d disable pymalloc tricks with the --with-valgrind option #2422
Patch from James Henstridge.
2009-12-03 02:52:39 +00:00
Antoine Pitrou 30b3b35cba Issue #7333: The `posix` module gains an `initgroups()` function providing
access to the initgroups(3) C library call on Unix systems which implement
it.  Patch by Jean-Paul Calderone.
2009-12-02 20:37:54 +00:00
Amaury Forgeot d'Arc d728871ee1 #7419: Fix a crash on Windows in locale.setlocale() when the category
is outside the allowed range.
2009-12-01 21:51:04 +00:00
Tarek Ziadé a5076a2543 Fixed #7408: dropped group ownership checking because it relies on os-specific rules 2009-11-29 22:20:30 +00:00
Eric Smith c4ab8339e9 Issue #3382: Make '%F' and float.__format__('F') convert results to upper case. Much of the patch came from Mark Dickinson. 2009-11-29 17:40:57 +00:00
Antoine Pitrou d16f57bf4d Issue #1515: Enable use of deepcopy() with instance methods. Patch by Robert Collins. 2009-11-28 15:55:58 +00:00
Vinay Sajip 01801d1f08 Issue #7403: Fixed possible race condition in lock creation. 2009-11-27 14:03:36 +00:00
Martin v. Löwis 50ea4565bd Issue #6508: Add posix.{getresuid,getresgid,setresuid,setresgid}. 2009-11-27 13:56:01 +00:00
Antoine Pitrou bf4a5fc8d8 Add ACKS entry for Pablo Mouzo 2009-11-27 13:24:29 +00:00
Antoine Pitrou acbe3bdbab Issue #6845: Add restart support for binary upload in ftplib. The
`storbinary()` method of FTP and FTP_TLS objects gains an optional `rest`
argument.  Patch by Pablo Mouzo.

(note: the patch also adds a test for the rest argument in retrbinary())
2009-11-27 13:18:34 +00:00
Antoine Pitrou bcfaf8007d Issue #5788: `datetime.timedelta` objects get a new `total_seconds()` method returning
the total number of seconds in the duration.  Patch by Brian Quinlan.
2009-11-25 22:59:36 +00:00
Vinay Sajip c470d68d39 Issue #6615: logging: Used weak references in internal handler list. Thanks to flox (Florent Xicluna) for the patch. 2009-11-25 09:03:30 +00:00
Mark Dickinson 9dd5e16c5d Issue #7117, continued: Remove substitution of %g-style formatting for
%f-style formatting, which used to occur at high precision.  Float formatting
should now be consistent between 2.7 and 3.1.
2009-11-23 20:54:09 +00:00
Mark Dickinson 18cfada1ea Remove restriction on precision when formatting floats. This is the
first step towards removing the %f -> %g switch (see issues 7117,
5859).
2009-11-23 18:46:41 +00:00
Senthil Kumaran 5c456e6f45 Fix for issue1488943 - difflib.Differ() doesn't always add hints for tab
characters.
2009-11-23 18:41:31 +00:00
Lars Gustäbel dd866d57af Issue #6123: Fix opening empty archives and files.
(Note that an empty archive is not the same as an empty file. An
empty archive contains no members and is correctly terminated with an
EOF block full of zeros. An empty file contains no data at all.)

The problem was that although tarfile was able to create empty
archives, it failed to open them raising a ReadError. On the other
hand, tarfile opened empty files without error in most read modes and
presented them as empty archives. (However, some modes still raised
errors: "r|gz" raised ReadError, but "r:gz" worked, "r:bz2" even
raised EOFError.)

In order to get a more fine-grained control over the various internal
error conditions I now split up the HeaderError exception into a
number of meaningful sub-exceptions. This makes it easier in the
TarFile.next() method to react to the different conditions in the
correct way.

The visible change in its behaviour now is that tarfile will open
empty archives correctly and raise ReadError consistently for empty
files.
2009-11-22 18:30:53 +00:00
Benjamin Peterson 48f0a8df19 spelling 2009-11-19 23:19:29 +00:00
Benjamin Peterson 89b1a5ce18 add news notes for r76416 2009-11-19 22:58:01 +00:00
Mark Dickinson b678de8ba6 Misc/NEWS entries for issue 7117. 2009-11-19 18:41:49 +00:00
Ronald Oussoren 315cd0c739 Fix for issue #7085
On MacOSX 10.6 the CoreFoundation framework must be initialized on the main
thread, the constructor function in that framework will cause an SIGABRT when
it is called on any other thread.

Because a number of extension link (indirectly) to CoreFoundation and the
Python core itself didn't the interpreter crashed when importing some
extensions, such as _locale, on a secondary thread.

This fix ensures that Python is linked to CoreFoundation on OSX, which results
in the CoreFoundation constructor being called when Python is loaded. This
does not require code changes.
2009-11-19 16:25:21 +00:00
Tarek Ziadé 39de1fc5c8 dragfullwindows can have value 2 2009-11-19 05:33:16 +00:00
Benjamin Peterson dc3c239b1e #5037 proxy __unicode__ correctly 2009-11-19 03:00:02 +00:00
Lars Gustäbel 355538e5f5 Issue #7341: Close the internal file object in the TarFile
constructor in case of an error.
2009-11-18 20:24:54 +00:00
Mark Dickinson bd15a06fd3 Issue #7117, continued: Change round implementation to use the correctly-rounded
string <-> float conversions;  this makes sure that the result of the round
operation is correctly rounded, and hence displays nicely using the new float
repr.
2009-11-18 19:33:35 +00:00
Tarek Ziadé acccafcf70 #7293: distutils.test_msvc9compiler now uses a key that exists on any fresh windows install 2009-11-18 08:46:56 +00:00
Philip Jenvey fab8be2f99 #1757126: fix typo with the cyrillic_asian alias 2009-11-17 02:42:26 +00:00
Nick Coghlan 11db64e5fd Issue #7328: don't corrupt sys.path when running pydoc with the -m switch 2009-11-15 22:36:47 +00:00
Antoine Pitrou ccd5e02d2b Issue #2054: ftplib now provides an FTP_TLS class to do secure FTP using
TLS or SSL.  Patch by Giampaolo Rodola'.
2009-11-15 17:22:09 +00:00
Mark Dickinson 82864d1ab1 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
PyFormat_FromStringV and PyErr_Format.
2009-11-15 16:18:58 +00:00
Antoine Pitrou d5b34d4597 Issue #4969: The mimetypes module now reads the MIME database from
the registry under Windows.  Patch by Gabriel Genellina.
2009-11-15 14:10:48 +00:00
Nick Coghlan 49868cb686 Issue #6816: expose the zipfile and directory execution mechanism to Python code via the runpy module. Also consolidated some script execution functionality in the test harness into a helper module and removed some implementation details from the runpy module documentation. 2009-11-15 07:30:34 +00:00
R. David Murray da82689daa Issue 7324: add a sanity check to regrtest argument parsing to
catch the case of an option with no handler.
2009-11-15 00:04:32 +00:00
R. David Murray 7f7eea651f Issue #7312 (new feature): Add a -F flag to run the selected tests in
a loop until a test fails.  Can be combined with -j.  Patch by Antoine
Pitrou.
2009-11-14 15:18:22 +00:00
Antoine Pitrou c562ca4625 Issue #7318: multiprocessing now uses a timeout when it fails to establish
a connection with another process, rather than looping endlessly. The
default timeout is 20 seconds, which should be amply sufficient for
local connections.
2009-11-13 22:31:18 +00:00
Benjamin Peterson e36199b49d fix several compile() issues by translating newlines in the tokenizer 2009-11-12 23:39:44 +00:00
Antoine Pitrou 310c9fec1a Issue #7295: Do not use a hardcoded file name in test_tarfile. 2009-11-11 20:55:07 +00:00
Antoine Pitrou 0734c632d5 Issue #7197: Allow unittest.TextTestRunner objects to be pickled and
unpickled. This fixes crashes under Windows when trying to run
test_multiprocessing in verbose mode.

Additionally, Test_TextTestRunner hadn't been enabled in test_unittest.
2009-11-10 20:49:30 +00:00
Antoine Pitrou d7158d4c62 Issue #7282: Fix a memory leak when an RLock was used in a thread other
than those started through `threading.Thread` (for example, using
`thread.start_new_thread()`.
2009-11-09 16:00:11 +00:00
Brett Cannon 813c43ab25 Properly detect whether a C file is using tabs or spaces for Vim.
Closes issue #5611. Thanks Kirk McDonald and Johannes Hoff.
2009-11-08 21:35:28 +00:00
Antoine Pitrou c98efe0500 Issue #7270: Add some dedicated unit tests for multi-thread synchronization
primitives such as Lock, RLock, Condition, Event and Semaphore.
2009-11-06 22:34:35 +00:00
Antoine Pitrou 99c160b559 Issue #7264: Fix a possible deadlock when deallocating thread-local objects
which are part of a reference cycle.
2009-11-05 13:42:29 +00:00
Antoine Pitrou 323b9da16d Issue #7211: Allow 64-bit values for the `ident` and `data` fields of kevent
objects on 64-bit systems.  Patch by Michael Broghton.

I will revert this checkin if it causes problems on our BSD buildbots.
2009-11-04 19:25:14 +00:00
Antoine Pitrou aec4124fed Since r76034 was successful, add a NEWS entry for it. 2009-11-02 11:34:27 +00:00
Raymond Hettinger fa7dadd339 Fix exception handling in itertools.izip_longest(). 2009-11-01 20:45:16 +00:00
Gregory P. Smith 38f5d8fcc2 news entry for r76000 2009-11-01 18:33:55 +00:00
Mark Dickinson 504a151c82 Issue #6603: Fix --with-tsc build failures on x86-64 that resulted
from a gcc inline assembler peculiarity. (gcc's "A" constraint
apparently means 'rax or rdx' in 64-bit mode, not edx:eax
or rdx:rax as one might expect.)
2009-10-31 10:11:28 +00:00
Mark Dickinson 09823a2e21 Deprecate PyOS_ascii_strtod and PyOS_ascii_atof, and document the replacement function PyOS_string_to_double. 2009-10-31 09:42:39 +00:00
Mark Dickinson ba26b39115 Move a Misc/NEWS entry to right section. 2009-10-31 09:28:12 +00:00
Antoine Pitrou 59c44f36e0 Issue #7222: Make thread "reaping" more reliable so that reference
leak-chasing test runs give sensible results. The previous method of
reaping threads could return successfully while some Thread objects were
still referenced. This also introduces a new private function:
:func:hread._count().
2009-10-30 17:07:08 +00:00
Georg Brandl 97269c4546 Remove mention of the old -X command line switch. 2009-10-29 20:39:50 +00:00
Mark Dickinson 6f3900163a Issue #7233: Fix Decimal.shift and Decimal.rotate methods for
arguments with more digits than the current context precision.
Bug reported by Stefan Krah.
2009-10-29 12:11:18 +00:00
Mark Dickinson 0c67312c5c Issue #7233: A number of two-argument Decimal methods were failing to
accept ints and longs for the second argument.
2009-10-29 12:04:00 +00:00
Lars Gustäbel 8c06ccc058 Issue #4750: Store the basename of the original filename in
the gzip FNAME header as required by RFC 1952.
2009-10-29 09:15:00 +00:00
Tarek Ziadé 40b998b05d Fixed #1180: Option to ignore ~/.pydistutils.cfg in Distutils 2009-10-27 23:06:10 +00:00
Tarek Ziadé d24cab8c74 Issue #7218: Fix test_site for win32 2009-10-27 21:20:27 +00:00
Antoine Pitrou dd62966a5f Issue #7205: Fix a possible deadlock when using a BZ2File object from several threads at once. 2009-10-27 17:41:58 +00:00
Mark Dickinson c04c7c5b72 Issue #7117: Use PyOS_string_to_double instead of PyOS_ascii_strtod in
complexobject.c.  Also remove length restriction on unicode inputs to
the complex constructor.
2009-10-26 22:28:14 +00:00
Eric Smith c1bdf89145 Finished removing _PyOS_double_to_string, as mentioned in issue 7117. 2009-10-26 17:46:17 +00:00
Mark Dickinson 8d87dc0c29 Issue #1087418: Small performance boost for bitwise operations on longs.
Initial patch by Gregory Smith;  some tweaks added.
2009-10-25 20:39:06 +00:00
Tarek Ziadé b9c1cfc428 Issue #7071: byte-compilation in Distutils now looks at sys.dont_write_bytecode 2009-10-24 15:10:37 +00:00
Tarek Ziadé 672422a328 #7066 - Fixed distutils.archive_util.make_archive behavior so it restores the cwd 2009-10-24 13:29:44 +00:00
Antoine Pitrou fa94e80f3b Manual py3k backport: [svn r74158] Issue #6218: Make io.BytesIO and io.StringIO picklable. 2009-10-24 12:23:18 +00:00
Mark Dickinson 5f029ce664 Acknowledge Ned Deily (extensive bug hunting and testing on OS X) 2009-10-24 11:47:17 +00:00
Vinay Sajip 5ac6528b91 Issue #7077: logging: SysLogHandler now treats Unicode as per RFC 5424. 2009-10-21 20:22:14 +00:00
Antoine Pitrou efb60c0ceb Issue #1722344: threading._shutdown() is now called in Py_Finalize(), which
fixes the problem of some exceptions being thrown at shutdown when the
interpreter is killed. Patch by Adam Olsen.
2009-10-20 21:29:37 +00:00
Mark Dickinson a7a52ab7ee Issue #7099: Decimal.is_normal should return True for all nonzero
finite non-subnormal values, even those with exponent > Emax.
2009-10-20 13:33:03 +00:00
Antoine Pitrou e089980cf3 NEWS entry for r75531. 2009-10-19 18:20:21 +00:00
Antoine Pitrou 5ba84910ae Issue #7133: SSL objects now support the new buffer API.
This fixes the test_ssl failure.
2009-10-19 17:59:07 +00:00
Eric Smith c12781abcb Issue #7169: Document PyFloat_AsString and PyFloat_AsReprString, and note that they are unsafe and deprecated. 2009-10-19 14:38:14 +00:00
R. David Murray 282396f27a Issue #7151: regrtest would generate a JSON failure if there was output
to stderr during the test run and it happened to get emitted after the
worker thread emitted the result JSON.  Now we capture stdout and stderr
separately, which avoids that problem.  It also means that _all_ stderr
output is after all stdout output when we print the test results, but
that seems acceptable, since output ordering is not guaranteed anyway.
The patch also moves the emit of the test name into the output block
generated after the test completes.  Otherwise test names and test
output/errors were mixed in the terminal display, making it difficult
to determine which test generated the output.
2009-10-18 21:12:37 +00:00
Ronald Oussoren 31802d093f Fix for issue 7149: a regression in 2.6.3 that causes an exception when
trying to detect proxy settings on OSX.
2009-10-18 07:07:00 +00:00
Vinay Sajip 03d5c346c0 Issue #7120: logging: Removed import of multiprocessing which is causing crash in GAE. 2009-10-16 14:06:44 +00:00
Benjamin Peterson 196b0925ca only clear a module's __dict__ if the module is the only one with a reference to it #7140 2009-10-15 15:44:46 +00:00
Benjamin Peterson c63457b18e make inspect.isabstract() always return a boolean; add a test for it, too #7069 2009-10-15 03:06:55 +00:00
Neil Schemenauer e6039f0978 Add support to the ihooks module for relative imports. 2009-10-14 19:23:53 +00:00
Neil Schemenauer 7fdd1cb583 Issue #1754094: Improve the stack depth calculation in the compiler.
There should be no other effect than a small decrease in memory use.
Patch by Christopher Tur Lesniewski-Laas.
2009-10-14 17:17:14 +00:00
R. David Murray 14dcd43d0b Enhanced Issue 7058 patch, which will not be backported. Refactors the
code, adds checks for stdin/out/err, cwd, and sys.path, and adds a new
section in the summary for tests that modify the environment (thanks to
Ezio Melotti for that suggestion).
2009-10-14 13:58:07 +00:00
Georg Brandl 65e50555f8 Update Misc/README. 2009-10-11 21:17:14 +00:00
Georg Brandl 2bd92a5961 Move find_recursionlimit.py to Tools/scripts; it is out of place in Misc. 2009-10-11 21:10:07 +00:00
Antoine Pitrou beaf6a02f4 Issue #7084: Fix a (very unlikely) crash when printing a list from one
thread, and mutating it from another one.  Patch by Scott Dial.
2009-10-11 21:03:26 +00:00
Senthil Kumaran 274686631a Fixed Issue6894, urllib2 doesn't respect "no_proxy" environment 2009-10-11 02:00:07 +00:00
Antoine Pitrou 58d2f2689a Issue #7055: test___all__ now greedily detects all modules which have an
__all__ attribute, rather than using a hardcoded and incomplete list.
2009-10-10 20:52:11 +00:00
Vinay Sajip 1c77b7f84c Issue #7086: Added TCP support to SysLogHandler and tidied up some anachronisms in the code. 2009-10-10 20:32:36 +00:00
R. David Murray 0c8bee6393 Issue #7082: When falling back to the MIME 'name' parameter, the
correct place to look for it is the Content-Type header.

Patch by Darren Worrall.
2009-10-09 21:50:54 +00:00
Mark Dickinson 3d830828de Issue #7078: _struct.__doc__ was being ignored. Import it into struct.
Also add description of '?' struct format character.  Thanks Gabriel
Genellina for the patch.
2009-10-08 15:54:10 +00:00
Mark Dickinson 15ae41c2db Issue #7048: logb should round its result when that result doesn't fit
into the available precision.  (Tests for this change are included in
the most recent set of testcases from the Decimal Specification site;
those testcases will be updated shortly.)
2009-10-07 19:22:05 +00:00
Amaury Forgeot d'Arc 590ecf34ff Add Anders Chrigstrom to Misc/ACKS for his work on unicodedata. 2009-10-06 20:02:09 +00:00
Amaury Forgeot d'Arc d0052d17b1 #1571184: makeunicodedata.py now generates the functions _PyUnicode_ToNumeric,
_PyUnicode_IsLinebreak and _PyUnicode_IsWhitespace.

It now also parses the Unihan.txt for numeric values.
2009-10-06 19:56:32 +00:00
R. David Murray abe3d3ec85 Issue #7058: Added save/restore for argv and os.environ to runtest_inner
in regrtest, with warnings if the called test modifies them.
2009-10-05 17:03:09 +00:00
Mark Dickinson 245d915e3e Issue #7042: Fix test_signal failure on OS X 10.6 64-bit builds
(and also, with luck, on the x86 FreeBSD buildbot), by making sure
that some user time is used in test_itimer_virtual.
2009-10-04 18:38:39 +00:00
Benjamin Peterson 7adbb5a35d #7050 fix a SystemError when using tuple unpacking and augmented assignment 2009-10-03 20:23:24 +00:00
Tarek Ziadé 1b48671ef1 #6516 added owner/group support for tarfiles in Distutils 2009-10-02 23:49:48 +00:00
Georg Brandl 12fafe6936 Add NEWS entry for r75180. 2009-10-01 21:02:39 +00:00
Philip Jenvey 8b9020458a #5329: fix os.popen* regression from 2.5: don't execute commands as a sequence
through the shell. also document the correct subprocess replacement for this
case
patch from Jean-Paul Calderone and Jani Hakala
2009-09-29 19:10:15 +00:00
Mark Dickinson 7e7a3ec901 Issue #7019: Unmarshalling of bad long data could produce unnormalized
PyLongs.  Raise ValueError instead.
2009-09-29 19:01:06 +00:00
Antoine Pitrou 7248178cd9 Issue #6790: Make it possible again to pass an `array.array` to
`httplib.HTTPConnection.send`. Patch by Kirk McDonald.
2009-09-29 17:48:18 +00:00
Philip Jenvey dbf3b258e7 #6990: clear threading.local's key only after its thread state is removed:
fixes local subclasses leaving old state around after a ref cycle GC which
could be recycled by new locals
2009-09-29 04:32:44 +00:00
Mark Dickinson b93fff0a57 Issue #3366: Add gamma function to math module.
(lgamma, erf and erfc to follow).
2009-09-28 18:54:55 +00:00
Mark Dickinson 4b9d473d0a Issue #6713: Improve decimal int -> string conversions. Thanks Gawain
Bolton for the suggestion and original patches.
2009-09-27 16:05:21 +00:00
Brett Cannon 4d94743c28 When range checking was added to time.strftime() a check was placed on tm_isdst
to make sure it fell within [-1, 1] just in case someone implementing
strftime() in libc was stupid enough to assume this. Turns out, though, some
OSs (e.g. zOS) are stupid enough to use values outside of this range for time
structs created by the system itself. So instead of throwing a ValueError,
tm_isdst is now normalized before being passed to strftime().

Fixes issue #6823. Thanks Robert Shapiro for diagnosing the problem and
contributing an initial patch.
2009-09-22 00:29:48 +00:00
Antoine Pitrou 2a46658bee Issue #6236, #6348: Fix various failures in the io module under AIX
and other platforms, when using a non-gcc compiler. Patch by egreen.

In addition, I made explicit the signedness of all bitfields in the
IO library.
2009-09-21 21:17:48 +00:00
Tarek Ziadé 9977335984 #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. 2009-09-21 13:41:08 +00:00
Ronald Oussoren 9f20d9d0ee Issue 6877: this patch makes it possible to link the readline extension
to the libedit emulation of the readline API on OSX 10.5 or later.

This also adds a minimal testsuite for readline to check that the
history manipuation functions have the same interface with both
C libraries.
2009-09-20 14:18:15 +00:00
Ronald Oussoren 51f0633efd Fix for issue 6851: urllib.urlopen crashes in a thread on OSX 10.6 2009-09-20 10:31:22 +00:00
Georg Brandl 14a2e2f614 Add Mark Summerfield. 2009-09-19 13:20:49 +00:00
Georg Brandl c231d31c21 Add Doug. 2009-09-19 13:13:56 +00:00
Georg Brandl ab849891ef #6944: the argument to PyArg_ParseTuple should be a tuple, otherwise a SystemError is set. Also clean up another usage of PyArg_ParseTuple. 2009-09-19 07:35:07 +00:00
Benjamin Peterson 9db5540ec4 typo 2009-09-18 21:47:27 +00:00
Benjamin Peterson 332d721750 add keyword arguments support to str/unicode encode and decode #6300 2009-09-18 21:14:55 +00:00
Thomas Heller 6be522bfc2 Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...)
does now always result in NULL.
2009-09-18 20:05:44 +00:00
Thomas Heller 7a352c0ed8 Issue #5042: Structure sub-subclass does now initialize correctly with
base class positional arguments.
2009-09-18 18:55:17 +00:00
Mark Dickinson db9925a56b Add Gawain Bolton to Misc/ACKS for his work on base 10 integer -> string optimizations. 2009-09-18 18:35:42 +00:00
Georg Brandl c40e60e5e5 #6938: "ident" is always a string, so use a format code which works. 2009-09-18 09:18:27 +00:00
Georg Brandl e9741f3ed8 Issue #6922: Fix an infinite loop when trying to decode an invalid
UTF-32 stream with a non-raising error handler like "replace" or "ignore".
2009-09-17 11:28:09 +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
Georg Brandl 480b455e46 Add Armin Ronacher. 2009-09-15 20:26:59 +00:00
Matthias Klose 924eab64a3 Issue #6635: Fix profiler printing usage message. 2009-09-13 15:09:24 +00:00
Benjamin Peterson 3d85454bca update urls 2009-09-13 01:59:31 +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
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
Mark Dickinson 968f1690d3 #Issue 6795: Fix infinite recursion in long(Decimal('nan')); change int(Decimal('nan')) to raise ValueError instead of either returning NaN or raising InvalidContext. 2009-09-07 18:04:58 +00:00
Mark Dickinson 491ea55f28 Issue #6850: Fix bug in Decimal._parse_format_specifier for formats
with no type specifier.
2009-09-07 16:17:41 +00:00
Mark Dickinson 6b3f1ef190 Issue #6848: Fix curses module build failure on OS X 10.6. 2009-09-06 21:21:05 +00:00
Ronald Oussoren 626faeb77b Fix for issue 4937 2009-09-06 12:23:18 +00:00
Mark Dickinson c8a7c7c3b9 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.
2009-09-06 10:03:31 +00:00
Ronald Oussoren 2596758cb4 Fix build issues on OSX 10.6 (issue 6802) 2009-09-06 10:00:26 +00:00
Chris Withers 7f3ea6a5e5 news entry matching r74655 2009-09-04 16:32:22 +00:00
Georg Brandl d22b9519d1 Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments as documented. 2009-09-04 08:17:04 +00:00
Georg Brandl 2e1308f520 Issue #2666: Handle BROWSER environment variable properly for unknown browser names in the webbrowser module. 2009-09-04 06:59:20 +00:00
Brett Cannon e7e941e7f7 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.
2009-09-03 21:25:21 +00:00
Benjamin Peterson 6fcf9b50bc remove the check that classmethod's argument is a callable 2009-09-01 22:27:57 +00:00
Amaury Forgeot d'Arc fff896b309 #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
2009-08-29 18:14:40 +00:00
Tarek Ziadé 3092ed977f fixed #6801: symmetric_difference_update also accepts pipe 2009-08-29 13:33:21 +00:00
Lars Gustäbel f7cda5287d 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.
2009-08-28 19:23:44 +00:00
Mark Dickinson 7a7739d75e Issue #6794: Fix handling of NaNs in Decimal.compare_total and
Decimal.compare_total_mag.
2009-08-28 13:25:02 +00:00
Georg Brandl 1a46267bd2 Restore alphabetic order. 2009-08-23 21:28:56 +00:00
Tarek Ziadé c4a4aebe60 fixed misplaced Issue line 2009-08-21 14:28:38 +00:00
Tarek Ziadé f721666d33 Fixed #6556: Corrected doc on how Distutils looks for its user configuration file under Windows 2009-08-21 14:11:26 +00:00
Tarek Ziadé 764fc235a6 #6693: New functions in site.py to get user/global site packages paths. 2009-08-20 21:23:13 +00:00
Gregory P. Smith 4e63d54b36 Add weakref support to the thread.lock type. 2009-08-20 09:39:38 +00:00
Guilherme Polo 7b50c4fa7c Issue #1356969: Add missing info methods in Tix.HList. 2009-08-18 14:46:57 +00:00
Guilherme Polo 6b3c7098f3 Issue #1522587: New constants and methods for the Tix.Grid widget. 2009-08-18 14:23:00 +00:00
Guilherme Polo 6c823f8720 Issue #1250469: Fix the return value of Tix.PanedWindow.panes. 2009-08-18 13:29:20 +00:00
Guilherme Polo d3e6e4bb8f Issue #1119673: Do not override Tkinter.Text methods when creating a ScrolledText. 2009-08-18 13:23:08 +00:00
Benjamin Peterson fe8745d1e4 typos 2009-08-17 13:39:41 +00:00
Gregory P. Smith b98d6b2cbc Issue 6665: Fix fnmatch to properly match filenames with newlines in them. 2009-08-16 18:52:58 +00:00
Guilherme Polo 1ce2d5305a Wrong place for issue #6244. 2009-08-16 14:38:57 +00:00
Guilherme Polo fb118351a1 Issue #6244: Allow detect_tkinter to look for Tcl/Tk 8.6. 2009-08-16 14:34:26 +00:00
Benjamin Peterson c0ba828857 better col_offsets for "for" statements with tuple unpacking #6704
Patch from Frank Wierzbicki.
2009-08-15 22:59:21 +00:00
Benjamin Peterson 4c6e8088f5 #6707 fix a crash with dir() on an uninitialized module 2009-08-15 13:16:38 +00:00
Guilherme Polo e45f017023 Issue #1135: Add the XView and YView mix-ins to avoid duplicating
the xview* and yview* methods.
2009-08-14 14:36:45 +00:00
Brett Cannon 764465f315 Expat could crash if given the wrong kind of input by never stopping its
tokenizing step.

Thanks to Ivan Krstić for the patch.
2009-08-13 19:27:12 +00:00
Gregory P. Smith c4ad0345cf Fix issue1628205: Socket file objects returned by socket.socket.makefile() now
properly handles EINTR within the read, readline, write & flush methods.
The socket.sendall() method now properly handles interrupted system calls.
2009-08-13 18:54:50 +00:00
Antoine Pitrou 20e1f932fa Issue #6629: Fix a data corruption issue in the new `io` package, which could
occur when writing to a BufferedRandom object (e.g. a file opened in "rb+" or
"wb+" mode) after having buffered a certain amount of data for reading. This
bug was not present in the pure Python implementation.

Yes, this is a serious issue.
2009-08-06 20:18:29 +00:00
Jesse Noller 8497efeb40 Fix issue 4660: spurious task_done errors in multiprocessing, remove doc note for from_address 2009-08-06 02:05:56 +00:00
Mark Dickinson 9a6d6c93b4 Issue #6619: Remove duplicate 'isgenerator' function from inspect module.
Thanks Vincent Legoll.
2009-08-02 15:40:11 +00:00
Mark Dickinson 4326ad8f72 Issue #6595: Allow Decimal constructor to accept non-European decimal
digits, as recommended by the specification.  (Backport of r74279 from
py3k.)
2009-08-02 10:59:36 +00:00
Sean Reifscheider 9279e7d177 - Issue #6624: yArg_ParseTuple with "s" format when parsing argument with
NUL: Bogus TypeError detail string.
2009-08-01 23:54:55 +00:00
Amaury Forgeot d'Arc 3e5b027a64 #6511: ZipFile will now raise BadZipfile when opening an empty or tiny file,
like it does for larger invalid files.
2009-07-28 22:15:30 +00:00
Mark Dickinson fe67bd9168 Issue #6561: '\d' regular expression should not match characters of
category [No]; only those of category [Nd].  (Backport of r74237
from py3k.)
2009-07-28 20:35:03 +00:00
Raymond Hettinger c2b9e1a134 Issue 6573: Fix set.union() for cases where self is in the argument chain. 2009-07-27 20:32:04 +00:00
Kurt B. Kaiser 794b2a78d0 1. Clean workspace more thoughly before build.
2. Add url of branch we are building to 'results' webpage.
   (url is now available in $repo_path, could be added to failure email.)
3. Adjust permissions to improve upload reliability.
2009-07-27 16:09:28 +00:00
Amaury Forgeot d'Arc 74b3016783 #6553: crash in cPickle.load(), when given a StringIO with incomplete data.
Will backport to 2.6, 3.x already fixed a similar issue with issue4298.
2009-07-23 19:26:02 +00:00
Georg Brandl beca49953d Fix the "pylocals" gdb command. 2009-07-23 09:17:09 +00:00
Georg Brandl ec812caf5d Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. 2009-07-22 11:57:15 +00:00
Tarek Ziadé af2406f215 Issue #6545: Removed assert statements in distutils.Extension, so the behavior is similar when used with -O 2009-07-22 08:55:19 +00:00
Thomas Heller d8431ae3bd Revert rev 74134, as it does not completely fixx issue #6493. 2009-07-21 19:04:02 +00:00
Thomas Heller 6adda9641d Issue #6493: Fix a ctypes problem setting bitfields more than 31 bits
wide.
2009-07-21 06:27:14 +00:00
Benjamin Peterson 4879c907ce the Slice in x[::] has to have step as None to help the interpreter 2009-07-20 20:28:08 +00:00
Benjamin Peterson d7b0eebcae split unittest.py into a package 2009-07-19 20:18:21 +00:00
Mark Dickinson 5215875a95 Add Case Van Horsen to Misc/ACKS, for fractions module patches and other work 2009-07-18 16:01:57 +00:00
Mark Dickinson 88a0a2e47f Issue #6431: Fix Fraction comparisons with unknown types, and with
float infinities and nans.  Backport of r74078 from py3k.
2009-07-18 15:18:18 +00:00
Hirokazu Yamamoto 1a3d085008 NEWS about r74040. 2009-07-17 06:26:54 +00:00
Tarek Ziadé a99dedfce2 #6466 refactored distutils duplicate get_versions() functions (used to get gcc/ld/dllwrap versions) 2009-07-16 15:35:45 +00:00
Jesse Noller 7530e47948 Issue 6433: multiprocessing.pool.map hangs on empty list 2009-07-16 14:23:04 +00:00
Alexandre Vassalotti 999ecc0eaf Issue #2389: Pickle array objects using a list representation for portability
across different machine architectures and compatibility with Python 3.x.
2009-07-15 18:19:47 +00:00
Amaury Forgeot d'Arc 9d11fefe1b NEWS entry for r74000. 2009-07-13 20:03:21 +00:00
Vinay Sajip cbb24b35a0 Issue #6314: logging: Extra checks on the "level" argument in more places. 2009-07-13 11:21:05 +00:00
Benjamin Peterson d50a5d5deb fix umlaut 2009-07-13 00:03:20 +00:00
Benjamin Peterson 95e5ebe3e3 change encoding to utf-8 2009-07-12 23:56:18 +00:00
Benjamin Peterson 1944d7e724 fix another name 2009-07-12 23:49:23 +00:00
Benjamin Peterson dd116c2ea5 change encoding to utf-8 2009-07-12 23:44:43 +00:00
Benjamin Peterson 36a81381c6 fix Tarek's name 2009-07-12 23:40:33 +00:00
Benjamin Peterson 6736530df0 add Joe 2009-07-12 21:18:55 +00:00
Tarek Ziadé 51f32c00e8 reverted changes for #6459 (doesn't apply on 2.x) 2009-07-11 17:21:00 +00:00
Amaury Forgeot d'Arc 74b8d333b7 #2622 Import errors in email.message, from a py2app standalone application.
Patch by Mads Kiilerich, Reviewed by Barry Warsaw.
2009-07-11 14:33:51 +00:00
Tarek Ziadé 23a3775cc8 fixed #6459: distutils.command.build_ext.get_export_symbols now uses 'PyInit' 2009-07-11 10:55:27 +00:00
Tarek Ziadé 8c40001175 Fixed #6455 (the test shall use pyd files under win32, rather than so files) 2009-07-10 09:10:33 +00:00
Mark Dickinson 5fd3af24a2 Issue #1523: Remove deprecated overflow masking in struct module, and
make sure that out-of-range values consistently raise struct.error.
2009-07-07 15:08:28 +00:00
R. David Murray 23a736a4f0 Issue 6070: when creating a compiled file, after copying the mode bits, on
posix zap the execute bit in case it was set on the .py file, since the
compiled files are not directly executable on posix.  Patch by Marco N.
2009-07-07 01:06:13 +00:00
Tarek Ziadé e670e5ad5b Fixed #6377: distutils compiler switch ignored (and added a deprecation warning if compiler is not used as supposed = a string option) 2009-07-06 12:50:46 +00:00
Mark Dickinson 463dc4bf26 Issues #1530559, #1741130: Fix various inconsistencies in struct.pack
integer packing, and reenable some previously broken tests.
2009-07-05 10:01:24 +00:00
Tarek Ziadé 63f1738d4b Fixed #6413: fixed log level in distutils.dist.announce 2009-07-04 02:02:41 +00:00
Gregory P. Smith c197d0ada2 news entry for r73825 2009-07-04 01:55:11 +00:00
Tarek Ziadé 65ec61ed06 Fixed #6403 : package path usage for build_ext 2009-07-03 08:22:56 +00:00
Benjamin Peterson 753d16234f when print() gets unicode arguments, sep and end should be unicode by default #4618 2009-07-02 18:16:45 +00:00
Benjamin Peterson 1bf4765369 only order comparisons are removed in py3k #6119 2009-07-02 17:06:17 +00:00
Jesse Noller 1b90efbdc5 Resolves issues 5155, 5313, 5331 - bad file descriptor error with processes in processes 2009-06-30 17:11:52 +00:00
Mark Dickinson 2f865b962c Issue #6347: Add inttypes.h to the pyport.h #includes; fixes a build
failure on HP-UX 11.00.
2009-06-30 15:32:30 +00:00
Tarek Ziadé 3fbcc60eb8 Fixed 6365: wrong inplace location for build_ext if the extension had dots 2009-06-29 16:13:39 +00:00