Commit Graph

3749 Commits

Author SHA1 Message Date
Eric Smith f32d4acead Issue #7988: Fix default alignment to be right aligned for complex.__format__. Now it matches other numeric types. 2010-02-22 18:33:47 +00:00
Mark Dickinson 82b34c5dbe Issue #5211: Fix complex type to avoid implicit calls to
complex.__coerce__.  Thanks Meador Inge for the patch.
2010-02-21 12:57:35 +00:00
R. David Murray 51f1204590 Issue 7970: When email.Parser.Parser parses a MIME message of type
message/rfc822 it turns it into an object whose body consists of
a list containing a single Message object.  HeaderParser, on the
other hand, just copies the body as a string.  Generator.flatten
has a special handler for the message mime type that expected the
body to be the one item list.  This fails if the message was parsed
by HeaderParser.  So we now check to see if the body is a string
first, and if so just we just emit it.
2010-02-21 04:23:00 +00:00
Ezio Melotti 4cc80ca921 #3426: os.path.abspath now returns unicode when its arg is unicode. 2010-02-20 08:09:39 +00:00
Mark Dickinson 6d8effb1fc Issue #7633: Context method in the decimal module (with the exception
of the 'canonical' and 'is_canonical' methods) now consistently accept
integer arguments wherever a Decimal instance is accepted.  Thanks
Juan José Conti for the patch.
2010-02-18 14:27:02 +00:00
Martin v. Löwis 413fabc070 Stop providing crtassem.h symbols when compiling with
Visual Studio 2010, as msvcr100.dll is not a platform
assembly anymore.
2010-02-18 09:22:20 +00:00
Martin v. Löwis 7875ef67cd Issue #7903: Define _BSD_SOURCE through OpenBSD 4.9. 2010-02-15 21:41:12 +00:00
Martin v. Löwis 5e2dd866a8 Issue #3920: Define _BSD_SOURCE on OpenBSD 4.4. 2010-02-15 08:32:00 +00:00
R. David Murray 63e4fd7eef Issue 7835: Shelve's __del__ method calls its close method, and its
close method refers to an identifier in the global module namespace.
This means that when __del__ is called during interpreter shutdown (if,
for example, the calling program still has a pointer to the shelf),
sometimes that global identifier would wind up being None, causing
mysterious 'ignored' exceptions.  This patch checks for the possible None
value first before using the global, thus avoiding the error messages.
2010-02-10 22:42:04 +00:00
Ezio Melotti 8f6a287029 #7712: add a temp_cwd context manager to test_support and use it in regrtest to run all the tests in a temporary directory, saving the original CWD in test_support.SAVEDCWD. Thanks to Florent Xicluna who helped with the patch. 2010-02-10 21:40:33 +00:00
Michael Foord db43b5a1f5 Issue 7893 and Issue 7588 2010-02-10 14:25:12 +00:00
Antoine Pitrou 42fb6ab491 Issue #2746: Don't escape ampersands and angle brackets ("&", "<", ">")
in XML processing instructions and comments.  These raw characters are
allowed by the XML specification, and are necessary when outputting e.g.
PHP code in a processing instruction.  Patch by Neil Muller.
2010-02-09 17:08:05 +00:00
Ronald Oussoren dd25e86cf4 Issue 6003: ZipFile.writestr "compression_type" argument 2010-02-07 20:18:02 +00:00
Vinay Sajip 64e8b970f9 Issue #7869: logging: improved format-time diagnostics and removed some 1.5.2 support code. 2010-02-07 12:56:54 +00:00
Vinay Sajip 657514a690 Issue #7868: logging: added loggerClass attribute to Manager. 2010-02-07 01:37:08 +00:00
Benjamin Peterson 2d798ac619 post release updates 2010-02-06 18:26:27 +00:00
Benjamin Peterson a7be9d240a bump version to 2.7a3 2010-02-06 16:37:32 +00:00
R. David Murray ce6e4b0930 issue #7728: test_timeout was using a hardcoded port, which was
causing buildbot failures.  Changed to use test_support.bind_port.
Patch by Florent Xicluna.
2010-02-06 04:27:21 +00:00
Barry Warsaw b1e66ee651 Resolve bug 7847 by including documentation for -J, -U, and -X under "Options
you shouldn't use".
2010-02-05 18:45:25 +00:00
Antoine Pitrou bb445a1f22 Issue #5677: Explicitly forbid write operations on read-only file objects,
and read operations on write-only file objects.  On Windows, the system C
library would return a bogus result; on Solaris, it was possible to crash
the interpreter.  Patch by Stefan Krah.
2010-02-05 17:05:54 +00:00
Benjamin Peterson 565d78586b normalize exceptions passed to the __exit__ method #7853
In Python 2.x, exceptions in finally blocks are not normalized.  Since with
statements are implemented using finally blocks, ceval.c had to be tweaked to
distinguish between with finally blocks and normal ones.

A test for the finalization of generators containing with statements was also
added.
2010-02-05 02:12:14 +00:00
Vinay Sajip 0e6e97d9ad Issue #7851: logging: clarification on logging configuration files. 2010-02-04 20:23:45 +00:00
Antoine Pitrou d840e5174d Issue #4772: Raise a ValueError when an unknown Bluetooth protocol is
specified, rather than fall through to AF_PACKET (in the `socket` module).
Also, raise ValueError rather than TypeError when an unknown TIPC address
type is specified.  Patch by Brian Curtin.
2010-02-04 20:20:18 +00:00
Vinay Sajip 28c382f73a Logging: Implemented PEP 391. 2010-02-04 18:48:53 +00:00
Antoine Pitrou 526e421b12 Issue #7385: Fix a crash in `MemoryView_FromObject` when
`PyObject_GetBuffer` fails.  Patch by Florent Xicluna.
2010-02-02 22:36:17 +00:00
Victor Stinner b4b0a2935d Issue #7819: Check sys.call_tracing() arguments types.
py3k was already patched by issue #3661.
2010-01-31 22:32:15 +00:00
Antoine Pitrou f3fa074703 - Issue #6939: Fix file I/O objects in the `io` module to keep the original
file position when calling `truncate()`.  It would previously change the
  file position to the given argument, which goes against the tradition of
  ftruncate() and other truncation APIs.  Patch by Pascal Chambon.
2010-01-31 22:26:04 +00:00
Matthias Klose 626d92aaea - Update python manual page (options -B, -O0, -s, environment variables
PYTHONDONTWRITEBYTECODE, PYTHONNOUSERSITE).
2010-01-31 16:05:13 +00:00
Mark Dickinson a36507c64c Issue #7767: Add new C-API function PyLong_AsLongLongAndOverflow, a
long long variant of PyLong_AsLongAndOverflow.  Patch by Case Van
Horsen.
2010-01-30 10:08:33 +00:00
Mark Dickinson 36ecd676ea Issue #7788: Fix a crash produced by deleting a list slice with huge
step value.  Patch by Marcin Bachry.
2010-01-29 17:11:39 +00:00
Benjamin Peterson e06f7114a2 an -> a 2010-01-28 02:15:02 +00:00
Benjamin Peterson 9ef7d4f73c add compat note 2010-01-28 01:24:46 +00:00
Antoine Pitrou 94c33ebfa8 Issue #7610: Reworked implementation of the internal
:class:`zipfile.ZipExtFile` class used to represent files stored inside
an archive.  The new implementation is significantly faster and can
be wrapped in a :class:`io.BufferedReader` object for more speedups.
It also solves an issue where interleaved calls to `read()` and
`readline()` give wrong results.  Patch by Nir Aides.
2010-01-27 20:59:50 +00:00
Jesse Noller 654ade3e6a Issue #6963: Added maxtasksperchild argument to multiprocessing.Pool 2010-01-27 03:05:57 +00:00
Benjamin Peterson 2deb5c758a raise a clear TypeError when trying to register a non-class 2010-01-27 02:16:42 +00:00
Eric Smith ee931b7253 Issue #7766: Change sys.getwindowsversion() return value to a named tuple and add the additional members returned in an OSVERSIONINFOEX structure. The new members are service_pack_major, service_pack_minor, suite_mask, and product_type. 2010-01-27 00:28:29 +00:00
Ezio Melotti 82230f952d Add a news entry for the functions verify and vereq that have been removed in r77729 and r77731 2010-01-25 12:37:02 +00:00
Benjamin Peterson a43f34cc2a fix an UnboundLocalError when the release file is empty #7773 2010-01-25 03:31:13 +00:00
Tarek Ziadé f14c7fc33d Fixed #7748: now upload and register commands don't need to force the encoding anymore : DistributionMetada returns utf8 strings 2010-01-24 00:33:32 +00:00
Matthias Klose 0d948ac90c - Expat: Fix DoS via XML document with malformed UTF-8 sequences
(CVE_2009_3560).
2010-01-22 00:39:04 +00:00
Matthias Klose 3b0f9b01f6 - Mention CVE-2009-3720 for change in r74429. 2010-01-22 00:34:48 +00:00
Antoine Pitrou c07336c673 Add a NEWS entry for r77599 and r77600. 2010-01-18 21:15:21 +00:00
Mark Dickinson 9481c576cd Issue #7632: When Py_USING_MEMORY_DEBUGGER is defined, disable the
private memory allocation scheme in dtoa.c, along with a piece of code
that caches powers of 5 for future use.  This makes it easier to
detect dtoa.c memory leaks with Valgrind or similar tools.

Patch by Stefan Krah.
2010-01-17 20:57:56 +00:00
Ronald Oussoren a55af9a9db - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
- Issue #7714: Use ``gcc -dumpversion`` to detect the version of GCC on
  MacOSX.

- Make configure look for util.h as well as libutil.h. The former
  is the header file that on OSX contains the defition of openpty.

  (Needed to compile for OSX 10.4 on OSX 10.6)

- Use the correct definition of CC to compile the pythonw executable
2010-01-17 16:25:57 +00:00
Mark Dickinson 23df3d270d Issue #7632: Fix a memory leak in _Py_dg_strtod. 2010-01-17 13:37:57 +00:00
Antoine Pitrou e80a6a4ead Issue #7561: Operations on empty bytearrays (such as `int(bytearray())`)
could crash in many places because of the PyByteArray_AS_STRING() macro
returning NULL.  The macro now returns a statically allocated empty
string instead.
2010-01-17 12:26:20 +00:00
Ezio Melotti 3373a3a282 typo: use one instead instead of two 2010-01-16 18:38:01 +00:00
Mark Dickinson 476279f18b Issue #7632: Fix a serious wrong output bug for string -> float conversion.
Also remove some now unused variables, and add comments clarifying the
possible outputs of the parsing section of _Py_dg_strtod.  Thanks
Eric Smith for reviewing.
2010-01-16 10:44:00 +00:00
R. David Murray ed44dfa4c7 Issue #1670765: Prevent email.generator.Generator from re-wrapping
headers in multipart/signed MIME parts, which fixes one of the sources of
invalid modifications to such parts by Generator.  Patch and tests by
Martin von Gagern.
2010-01-16 05:15:17 +00:00
Vinay Sajip 334ffe8cc8 Fixed issue-number mistake in NEWS update. 2010-01-15 23:27:05 +00:00
Antoine Pitrou c391ad007b Issue #7701: Fix crash in binascii.b2a_uu() in debug mode when given a
1-byte argument.  Patch by Victor Stinner.
2010-01-15 00:18:00 +00:00
Brett Cannon 3ffa43db48 The silencing of DeprecationWarning was not taking -3 into consideration. Since
Py3K warnings are DeprecationWarning by default this was causing -3 to
essentially be a no-op. Now DeprecationWarning is only silenced if -3 is not
used.

Closes issue #7700. Thanks Ezio Melotti and Florent Xicluna for patch help.
2010-01-14 20:00:28 +00:00
Antoine Pitrou efdddd3370 Issue #3299: Fix possible crash in the _sre module when given bad
argument values in debug mode.  Patch by Victor Stinner.
2010-01-14 17:25:24 +00:00
Antoine Pitrou fd3a60d5ef Issue #7703: Add support for the new buffer API to functions of the
binascii module.  Backported from py3k by Florent Xicluna, with some
additional tests.
2010-01-14 16:27:09 +00:00
Antoine Pitrou 5a9112c0cc Issue #2846: Add support for gzip.GzipFile reading zero-padded files.
Patch by Brian Curtin.
2010-01-13 14:32:10 +00:00
Antoine Pitrou 8c510e704e Issue #7661: Allow ctypes to be built from a non-ASCII directory path.
Patch by Florent Xicluna.
2010-01-13 11:47:49 +00:00
Antoine Pitrou 6467213bfd Issue #7622: Improve the split(), rsplit(), splitlines() and replace()
methods of bytes, bytearray and unicode objects by using a common
implementation based on stringlib's fast search.  Patch by Florent Xicluna.
2010-01-13 07:55:48 +00:00
Mark Dickinson 5ff4f279e6 Issue #7632: Fix a bug in dtoa.c that could lead to incorrectly-rounded results. 2010-01-12 22:55:51 +00:00
Mark Dickinson 8efef5ce9f Issue #7632: Fix a problem with _Py_dg_strtod that could lead to
crashes in debug builds, for certain long numeric strings
corresponding to subnormal values.
2010-01-12 22:23:56 +00:00
Ezio Melotti b5689de044 #5827: make sure that normpath preserves unicode 2010-01-12 03:32:05 +00:00
Alexandre Vassalotti 69eb51697c Issue #1967: Backport dictionary views. 2010-01-11 23:17:10 +00:00
Alexandre Vassalotti 7a8df80285 Add missing NEWS entry for r77422. 2010-01-11 23:13:49 +00:00
Tarek Ziadé dc0f487c3b Fixed #5372: .o files are now always rebuilt because file age test don't work in some case 2010-01-11 22:50:29 +00:00
Brett Cannon 6fdd3dcb6a DeprecationWarning is now silent by default.
This was originally suggested by Guido, discussed on the stdlib-sig mailing
list, and given the OK by Guido directly to me. What this change essentially
means is that Python has taken a policy of silencing warnings that are only
of interest to developers by default. This should prevent users from seeing
warnings which are triggered by an application being run against a new
interpreter before the app developer has a chance to update their code.

Closes issue #7319. Thanks to Antoine Pitrou, Ezio Melotti, and Brian Curtin
for helping with the issue.
2010-01-10 02:56:19 +00:00
Alexandre Vassalotti ee936a2130 Issue #2335: Backport set literals syntax from Python 3.x. 2010-01-09 23:35:54 +00:00
Benjamin Peterson dd6d92a560 post release version adjustment 2010-01-09 17:30:31 +00:00
Benjamin Peterson aa7e51f006 bump version to 2.7a2 2010-01-09 16:34:06 +00:00
Tarek Ziadé c25417f644 Fixed #7617: all flavors of gcc should be recognized now 2010-01-08 23:42:23 +00:00
Antoine Pitrou 8015725d4f Issue #7092: Remove py3k warning when importing cPickle. 2to3 handles
renaming of `cPickle` to `pickle`.  The warning was annoying since there's
no alternative to cPickle if you care about performance.  Patch by Florent
Xicluna.
2010-01-08 19:20:17 +00:00
Antoine Pitrou 54584188cd Fix reattribution mistake when fixing attribution mistake! 2010-01-07 17:54:10 +00:00
Antoine Pitrou 254d23f3a3 Fix attribution. Florent actually repackaged and reviewed Victor's patch (sorry!). 2010-01-07 17:49:37 +00:00
Antoine Pitrou 0d423b870b Issue #7455: Fix possible crash in cPickle on invalid input. Patch by
Florent Xicluna.
2010-01-07 17:46:49 +00:00
Antoine Pitrou b9d4963a98 Issue #7092: Fix the DeprecationWarnings emitted by the standard library
when using the -3 flag.  Patch by Florent Xicluna.
2010-01-04 23:22:44 +00:00
Benjamin Peterson ecdae19fbe do correct lookup of the __complex__ method 2010-01-04 00:43:01 +00:00
Antoine Pitrou 673ddf9907 Issue #7471: Improve the performance of GzipFile's buffering mechanism,
and make it implement the `io.BufferedIOBase` ABC to allow for further
speedups by wrapping it in an `io.BufferedReader`.  Patch by Nir Aides.
2010-01-03 22:29:56 +00:00
Gregory P. Smith 9d3252154f issue3972: HTTPConnection and HTTPSConnection now support a
source_address parameter.

Also cleans up an annotation in the socket documentation.
2010-01-03 02:06:07 +00:00
Gregory P. Smith 79a3eb1058 Adds an optional source_address parameter to socket.create_connection().
For use by issue3972.
2010-01-03 01:29:44 +00:00
Georg Brandl 92c58ae384 Fix typo. 2010-01-02 22:55:55 +00:00
Gregory P. Smith fe32d3010c mention the r77252 change 2010-01-02 22:42:50 +00:00
Antoine Pitrou 5b7139aab4 Issue #7462: Implement the stringlib fast search algorithm for the `rfind`,
`rindex`, `rsplit` and `rpartition` methods.  Patch by Florent Xicluna.
2010-01-02 21:12:58 +00:00
Martin v. Löwis f477b93d9d Update Windows build to sqlite 3.6.21. 2010-01-02 09:25:21 +00:00
Mark Dickinson 1b34d2552c Issue #5080: turn the DeprecationWarning from float arguments passed
to integer PyArg_Parse* format codes into a TypeError.  Add a
DeprecationWarning for floats passed with the 'L' format code, which
didn't previously have a warning.
2010-01-01 17:27:30 +00:00
Benjamin Peterson edfe72f66f allow --with-dbmliborder to specify that no dbm modules will be built #6491 2010-01-01 15:21:13 +00:00
Benjamin Peterson 6c99b4e0d6 fix indentation 2010-01-01 15:20:06 +00:00
Benjamin Peterson b4abef6d42 add note 2010-01-01 15:18:38 +00:00
Benjamin Peterson 2c19674b51 add a --with-system-expat option to build pyexpat against the system's lib #7609 2009-12-31 03:17:18 +00:00
Benjamin Peterson 0f02d3933b check if the attribute is set before deleting it with T_OBJECT_EX (fixes #7604)
Also, add a note to the docs about the better behavior of T_OBJECT_EX as
compared to T_OBJECT.
2009-12-30 19:34:10 +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 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
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 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 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
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
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