Commit Graph

4339 Commits

Author SHA1 Message Date
Michael Foord b4a81c838a Add test discovery to unittest. Issue 6001. 2009-05-29 20:33:46 +00:00
Martin v. Löwis 4f16d3b4ac Issue #4873: Fix resource leaks in error cases of pwd and grp. 2009-05-29 15:58:08 +00:00
Tarek Ziadé 3e3eace7d7 Fixed #6131: test_modulefinder leaked when run after test_distutils 2009-05-29 08:08:07 +00:00
Raymond Hettinger 578a228ee2 Issue 5982: Classmethod and staticmethod expose wrapped function with __func__. 2009-05-29 04:58:52 +00:00
Raymond Hettinger 822b87f276 Deprecate contextlib.nested(). The with-statement now provides this functionality directly. 2009-05-29 01:46:48 +00:00
Raymond Hettinger b4d2d31874 Issue 5150: Add rstrip() option to IDLE's format menu. 2009-05-29 01:36:26 +00:00
Tarek Ziadé 9e5d2dc6a6 Fixed #6048: Distutils uses the tarfile module instead of the tar command now 2009-05-28 12:53:54 +00:00
R. David Murray d67ea7d4c6 fix issue #6121 by stripping spaces from the argument in the 'help'
function.
2009-05-27 20:07:21 +00:00
Georg Brandl 944f684ce6 Allow multiple context managers in one with statement, as proposed
in http://codereview.appspot.com/53094 and accepted by Guido.

The construct is transformed into multiple With AST nodes so that
there should be no problems with the semantics.
2009-05-25 21:02:56 +00:00
Benjamin Peterson 1880d8b823 add a SETUP_WITH opcode
It speeds up the with statement and correctly looks up the special
methods involved.
2009-05-25 13:13:44 +00:00
Benjamin Peterson 176a56c69b make class skipping decorators the same as skipping every test of the class
This removes ClassTestSuite and a good bit of hacks.
2009-05-25 00:48:58 +00:00
Antoine Pitrou f2caeed9c6 Issue #3585: Add pkg-config support.
It creates a python-2.7.pc file and a python.pc symlink in the
$(LIBDIR)/pkgconfig directory. Patch by Clinton Roy.
2009-05-24 20:23:57 +00:00
Martin v. Löwis 0b09c42ffe Issue #6050: Don't fail extracting a directory from a zipfile if
the directory already exists.
2009-05-24 19:30:52 +00:00
Martin v. Löwis 53b578eba1 Issue #6065: Do not try to build a version-independent
installer if the package has extension modules.

Also add NEWS entry for #5311.
2009-05-24 19:10:52 +00:00
Antoine Pitrou d49e375eed Issue #1309352: fcntl now converts its third arguments to a C `long` rather
than an int, which makes some operations possible under 64-bit Linux (e.g.
DN_MULTISHOT with F_NOTIFY).
2009-05-24 15:40:09 +00:00
Senthil Kumaran e266f25cf1 Fixed Issue1424152, urllib2 fails with HTTPS over Proxy. 2009-05-24 09:14:50 +00:00
Benjamin Peterson 40748f362b reorder name 2009-05-23 19:31:02 +00:00
Benjamin Peterson e5afa3b24b support building with subversion 1.7 #6094 2009-05-23 19:24:37 +00:00
Antoine Pitrou 5e858fe52b Issue #1983: Fix functions taking or returning a process identifier to use
the dedicated C type `pid_t` instead of a C `int`. Some platforms have
a process identifier type wider than the standard C integer type.
2009-05-23 15:37:45 +00:00
R. David Murray ad3058e0b8 Fix Issue #4066: smtplib.SMTP_SSL._get_socket now correctly returns
the socket.  Patch by Farhan Ahmad, test by Marcin Bachry.
2009-05-23 00:48:58 +00:00
Mark Dickinson a4e0efa4b1 Issue #5829: don't raise OverflowError for complex('1e500'). Backport of r72803. 2009-05-20 18:43:07 +00:00
Tarek Ziadé 7d7127dd84 fixed the 'package' option of build_ext 2009-05-19 16:17:21 +00:00
Collin Winter f03c42f0ab Issue 6032: fix refleaks in test_urllib2_localnet. 2009-05-18 21:35:40 +00:00
Tarek Ziadé 07bbfcc5e2 Fixed #6053 - win32 fixes for distutils tests 2009-05-18 12:21:26 +00:00
Tarek Ziadé fcc7f039ec Fixed the library extension when distutils build_ext is used inplace 2009-05-18 08:03:37 +00:00
Hirokazu Yamamoto a4f90184dc Added NEWS for r72698. 2009-05-17 02:58:36 +00:00
Benjamin Peterson 0c3b4c6e70 typo 2009-05-16 23:34:19 +00:00
Benjamin Peterson eb9fb2c495 update 2009-05-16 22:46:11 +00:00
Tarek Ziadé cb76804b17 #6041: sdist and register now use the check command. No more duplicate code for metadata checking 2009-05-16 16:37:06 +00:00
Antoine Pitrou 775fd66d7b Issue #2116: Weak references and weak dictionaries now support copy()ing and deepcopy()ing. 2009-05-15 16:54:52 +00:00
Antoine Pitrou 52035a04ab Issue #1655: Make imaplib IPv6-capable. Patch by Derek Morr. 2009-05-15 11:50:29 +00:00
Antoine Pitrou 42b5bcf048 Issue #5918: Fix a crash in the parser module.
Patch by Amaury.
2009-05-14 21:48:09 +00:00
Antoine Pitrou eed30d830b Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr.
(Unfortunately, nntplib doesn't have a test suite)
2009-05-14 21:22:08 +00:00
Tarek Ziadé cbb4f9ef58 #6022 fixed test_get_outputs so it doesn't leaves a test file in the cwd 2009-05-14 20:14:13 +00:00
R. David Murray 996ba02602 Issue #4050: inspect.findsource/getsource now raise an IOError if the 'source'
file is a binary.  Patch by Brodie Rao, test by Daniel Diniz.
2009-05-13 17:14:11 +00:00
R. David Murray 525cffcd7e Move news item to correct section, remove spurious 'see below'
from docstring.
2009-05-13 13:07:14 +00:00
R. David Murray a3ec697cbd Issue 5994: add docstrings to marshal. 2009-05-13 00:30:29 +00:00
Tarek Ziadé 972480d999 fixed #5977: distutils build_ext.get_outputs was not using the inplace option 2009-05-12 17:07:14 +00:00
Michael Foord 5471a77687 Add missing # to NEWS 2009-05-11 18:01:45 +00:00
Michael Foord 5d31e057c5 Adds a verbosity keyword argument to unittest.main plus a minor fix allowing you to specify test modules / classes
from the command line.

Closes issue 5995.

Michael Foord
2009-05-11 17:59:43 +00:00
Mark Dickinson b1d45856c2 Issue #5981: Fix some float.fromhex bugs related to inf and nan handling. 2009-05-11 15:33:08 +00:00
Tarek Ziadé d5d83424d2 fixed #5984 and improved test coverage 2009-05-10 10:12:08 +00:00
Vinay Sajip f9b01fe692 Issue #5971: StreamHandler.handleError now swallows IOErrors which occur when trying to print a traceback. 2009-05-09 12:07:17 +00:00
Tarek Ziadé 812d77152e #5976: fixed distutils test_check_environ 2009-05-09 10:06:00 +00:00
Tarek Ziadé e2be83def8 Fixed Issue 5900: distutils.command.build_ext - Ensure RUNPATH is added to extension modules with RPATH if GNU ld is used 2009-05-09 08:28:53 +00:00
Jeffrey Yasskin f7f858d141 Issue 5954, PyFrame_GetLineNumber:
Most uses of PyCode_Addr2Line
(http://www.google.com/codesearch?q=PyCode_Addr2Line) are just trying to get
the line number of a specified frame, but there's no way to do that directly.
Forcing people to go through the code object makes them know more about the
guts of the interpreter than they should need.

The remaining uses of PyCode_Addr2Line seem to be getting the line from a
traceback (for example,
http://www.google.com/codesearch/p?hl=en#u_9_nDrchrw/pygame-1.7.1release/src/base.c&q=PyCode_Addr2Line),
which is replaced by the tb_lineno field.  So we may be able to deprecate
PyCode_Addr2Line entirely for external use.
2009-05-08 22:23:21 +00:00
Jeffrey Yasskin 1aa4700234 PyCode_NewEmpty:
Most uses of PyCode_New found by http://www.google.com/codesearch?q=PyCode_New
are trying to build an empty code object, usually to put it in a dummy frame
object. This patch adds a PyCode_NewEmpty wrapper which lets the user specify
just the filename, function name, and first line number, instead of also
requiring lots of code internals.
2009-05-08 21:51:06 +00:00
Jeroen Ruigrok van der Werven b87b33462c Update the Windows locale mapping with the ones introduced with Vista. 2009-05-08 14:11:23 +00:00
Tarek Ziadé 99f660af3f Fixed #5941: added ARFLAGS for the archiver command. 2009-05-07 21:20:34 +00:00
R. David Murray d3bf34cd4b News item for Issue5955. 2009-05-07 16:29:19 +00:00
Walter Dörwald 726ba8e1c3 Add NEWS entry about issue #3739. 2009-05-06 14:32:35 +00:00
Thomas Heller a57773e483 Fix Issue #4875: find_library can return directories instead of files
(on win32)
2009-05-05 18:55:47 +00:00
Eric Smith a985a3aee4 Issue #5920: Changed format.__float__ and complex.__float__ to use a precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson. 2009-05-05 18:26:08 +00:00
Martin v. Löwis 588b54b646 Issue #5847: Remove -n switch on "Edit with IDLE" menu item. 2009-05-05 16:10:16 +00:00
Georg Brandl 4d4313d59d #5142: add module skipping feature to pdb. 2009-05-05 08:54:11 +00:00
Georg Brandl e3869c41f2 Add a news entry for r72319. 2009-05-05 08:30:28 +00:00
R. David Murray 7ba8e1cbfd Fix issue 5890: (property subclass shadows __doc__ string) by inserting
the __doc__ into the subclass instance __dict__.  The fix refactors
property_copy to call property_init in such a way that the __doc__
logic is re-executed correctly when getter_doc is 1, thus simplifying
property_copy.
2009-05-04 22:16:24 +00:00
Antoine Pitrou 97377bf566 Issue #5692: In :class:`zipfile.Zipfile`, fix wrong path calculation when extracting a file to the root directory. 2009-05-04 21:17:17 +00:00
Antoine Pitrou 2aabce7348 Add Nick Barnes to ACKS. 2009-05-04 18:32:50 +00:00
Antoine Pitrou 653dece278 Issue #4426: The UTF-7 decoder was too strict and didn't accept some legal sequences.
Patch by Nick Barnes and Victor Stinner.
2009-05-04 18:32:32 +00:00
Hirokazu Yamamoto 406d7aaee7 Issue #5913: os.listdir() should fail for empty path on windows. 2009-05-04 05:28:39 +00:00
Gregory P. Smith d02eedacab Issue #4751: For hashlib algorithms provided by OpenSSL, the Python
GIL is now released during computation on data lengths >= 2048 bytes.
2009-05-04 00:16:49 +00:00
Walter Dörwald ed960ac404 Issue #5108: Handle %s like %S and %R in PyUnicode_FromFormatV(): Call
PyUnicode_DecodeUTF8() once, remember the result and output it in a second
step. This avoids problems with counting UTF-8 bytes that ignores the effect
of using the replace error handler in PyUnicode_DecodeUTF8().
2009-05-03 22:36:33 +00:00
Michael Foord 07ef487a96 2009-05-02 22:43:34 +00:00
Antoine Pitrou 7430989cda Isue #5084: unpickling now interns the attribute names of pickled objects,
saving memory and avoiding growth in size of subsequent pickles. Proposal
and original patch by Jake McGuire.
2009-05-02 21:13:23 +00:00
Antoine Pitrou 3fd4ea9dab Issue #5726: Make Modules/ld_so_aix return the actual exit code of the linker, rather than always exit successfully.
Patch by Floris Bruynooghe.
2009-05-01 21:16:14 +00:00
Antoine Pitrou 1fc0231a22 Issue #3002: `shutil.copyfile()` and `shutil.copytree()` now raise an
error when a named pipe is encountered, rather than blocking infinitely.
2009-05-01 20:55:35 +00:00
Gregory P. Smith 1d499265e0 Adds the ipaddr module to the standard library. Issue #3959.
Based off of subversion r69 from http://code.google.com/p/ipaddr-py/

This code is 2to3 safe, I'll merge it into py3k later this afternoon.
2009-05-01 19:59:52 +00:00
Eric Smith 9139cc6a3b Issue #1588: Add complex.__format__. 2009-04-30 00:58:58 +00:00
Mark Dickinson 92fcc9c991 Issue #5864: format(1234.5, '.4') gives misleading result
(Backport of r72109 from py3k.)
2009-04-29 20:41:00 +00:00
Matthias Klose 10cbe4886e - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
the order that backends for the dbm extension are checked.
2009-04-29 17:18:19 +00:00
R. David Murray 25b4add5b0 Fix issue 2245. aifc now skips any chunk type it doesn't actually
process instead of throwing errors for anything not in an explicit
skip list.  This is per this spec: http://www.cnpbagwell.com/aiff-c.txt.
Spec reference and test sound file provided by Santiago Peresón, fix
based on patch by Hiroaki Kawai.
2009-04-29 13:17:37 +00:00
Tarek Ziadé a1b91d944b Fixed #5874 : distutils.tests.test_config_cmd is not locale-sensitive anymore 2009-04-29 08:03:46 +00:00
Thomas Heller 90c61a2e09 Issue #4305: ctypes fails to build on mipsel-linux-gnu (detects mips
instead of mipsel)
2009-04-28 19:23:41 +00:00
Antoine Pitrou e988e286b2 Issue #1734234: Massively speedup `unicodedata.normalize()` when the
string is already in normalized form, by performing a quick check beforehand.
Original patch by Rauli Ruohonen.
2009-04-27 21:53:26 +00:00
Antoine Pitrou f2651e193c Issue #5853: calling a function of the mimetypes module from several threads
at once could hit the recursion limit if the mimetypes database hadn't been
initialized before.
2009-04-27 20:50:20 +00:00
Eric Smith cac7af6863 Issue #5793: rationalize isdigit / isalpha / tolower, etc. Will port to py3k. Should fix Windows buildbot errors. 2009-04-27 19:04:37 +00:00
Vinay Sajip e34d6aa86f Issue #5854: Updated __all__ to include some missing names and remove some names which should not be exported. 2009-04-27 13:44:27 +00:00
Martin v. Löwis 99f277933e Issue #4971: Fix titlecase for characters that are their own
titlecase, but not their own uppercase.
2009-04-26 00:53:18 +00:00
Eric Smith 068f06568b Issue #5835, deprecate PyOS_ascii_formatd.
If anyone wants to clean up the documentation, feel free. It's my first documentation foray, and it's not that great.

Will port to py3k with a different strategy.
2009-04-25 21:40:15 +00:00
Walter Dörwald 5d98ec76bb Issue #5828 (Invalid behavior of unicode.lower): Fixed bogus logic in
makeunicodedata.py and regenerated the Unicode database (This fixes
u'\u1d79'.lower() == '\x00').
2009-04-25 14:03:16 +00:00
Tarek Ziadé bcddf6777a #5810: Fixed Distutils test_build_scripts 2009-04-25 12:51:59 +00:00
Tarek Ziadé d567c38ef2 Issue #4951: Fixed failure in test_httpservers 2009-04-25 12:38:08 +00:00
Walter Dörwald a145317be9 Issue #5837: Certain sequences of calls to set() and unset() for
support.EnvironmentVarGuard objects restored the environment variables
incorrectly on __exit__.

Fix this by recording the initial value of each environment variable on the
first access in set() or unset().
2009-04-25 12:15:07 +00:00
Benjamin Peterson 5083dc552b fix a segfault when setting __class__ in __del__ #5283 2009-04-25 00:41:22 +00:00
Thomas Heller 5c6af808f7 Issue #3102: All global symbols that the _ctypes extension defines are
now prefixed with 'Py' or '_ctypes'.
2009-04-24 20:31:47 +00:00
Thomas Heller ec21ccde12 Issue 5041: ctypes unwilling to allow pickling wide character. 2009-04-24 20:00:41 +00:00
Mark Dickinson 4af8e745c4 Issue #5812: The two-argument form of the Fraction constructor
now accepts arbitrary Rational instances.
2009-04-24 13:56:07 +00:00
Mark Dickinson 95bc980d9e Issue #5816:
- simplify parsing and printing of complex numbers
 - make complex(repr(z)) round-tripping work for complex
   numbers involving nans, infs, or negative zeros
 - don't accept some of the stranger complex strings
   that were previously allowed---e.g., complex('1..1j')
2009-04-24 12:46:53 +00:00
Mark Dickinson 8100bd8431 Issue #5812: make Fraction('1e-6') valid. Backport of r71806. 2009-04-22 18:15:25 +00:00
Nick Coghlan 5533ff6a2e Issue 5354: Change API for import_fresh_module() to better support test_warnings use case (also fixes some bugs in the original implementation) 2009-04-22 15:26:04 +00:00
Eric Smith aca19e6a74 Backport of some of the work in r71665 to trunk. This reworks much of
int, long, and float __format__(), and it keeps their implementation
in sync with py3k.

Also added PyOS_double_to_string. This is the "fallback" version
that's also available in trunk, and should be kept in sync with that
code. I'll add an issue to document PyOS_double_to_string in the C
API.

There are many internal cleanups. Externally visible changes include:

- Implement PEP 378, Format Specifier for Thousands Separator, for
  floats, ints, and longs.

- Issue #5515: 'n' formatting for ints, longs, and floats handles
  leading zero formatting poorly.

- Issue #5772: For float.__format__, don't add a trailing ".0" if
  we're using no type code and we have an exponent.
2009-04-22 13:29:05 +00:00
Mark Dickinson 6736cf8d20 Issue #3166: Make long -> float (and int -> float) conversions
correctly rounded, using round-half-to-even.  This ensures that the
value of float(n) doesn't depend on whether we're using 15-bit digits
or 30-bit digits for Python longs.
2009-04-20 21:13:33 +00:00
Tarek Ziadé 31559b6123 adding a NEWS note for #5795 (previously checked via the buildbot) 2009-04-20 14:29:42 +00:00
Benjamin Peterson d4d400cb8a try to initalize all builtin types with PyType_Ready to avoid problems like #5787 2009-04-18 20:12:47 +00:00
Mark Dickinson 1bdf7e9cab Issue #1869: Fix a couple of minor round() issues. 2009-04-18 14:59:42 +00:00
Vinay Sajip 22aa4bbdc5 Issue #5768: Change to Unicode output logic and test case for same. 2009-04-16 19:15:49 +00:00
Benjamin Peterson 99d36f1563 call __float__ on str subclasses #5759
tests by R. David Murray
2009-04-15 21:26:36 +00:00
R. David Murray abc26603a4 Add missing NEWS item for issue1161031 fix. 2009-04-13 16:56:32 +00:00
Tarek Ziadé 156c31a7be Fixed #5607: Distutils test_get_platform was failing fo Mac OS X fat binaries. 2009-04-13 12:34:01 +00:00