Commit Graph

371 Commits

Author SHA1 Message Date
Benjamin Peterson
0348681494 Merged revisions 71862 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r71862 | benjamin.peterson | 2009-04-24 20:08:45 -0500 (Fri, 24 Apr 2009) | 9 lines

  Merged revisions 71860 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r71860 | benjamin.peterson | 2009-04-24 19:41:22 -0500 (Fri, 24 Apr 2009) | 1 line

    fix a segfault when setting __class__ in __del__ #5283
  ........
................
2009-04-25 01:37:40 +00:00
Benjamin Peterson
1c5672fc5c Merged revisions 70507-70508 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r70507 | benjamin.peterson | 2009-03-21 12:31:58 -0500 (Sat, 21 Mar 2009) | 75 lines

  Merged revisions 70342,70385-70387,70389-70390,70392-70393,70395,70400,70405-70406,70418,70438,70464,70468 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r70342 | georg.brandl | 2009-03-13 14:03:58 -0500 (Fri, 13 Mar 2009) | 1 line

    #5486: typos.
  ........
    r70385 | benjamin.peterson | 2009-03-15 09:38:55 -0500 (Sun, 15 Mar 2009) | 1 line

    fix tuple.index() error message #5495
  ........
    r70386 | georg.brandl | 2009-03-15 16:32:06 -0500 (Sun, 15 Mar 2009) | 1 line

    #5496: fix docstring of lookup().
  ........
    r70387 | georg.brandl | 2009-03-15 16:37:16 -0500 (Sun, 15 Mar 2009) | 1 line

    #5493: clarify __nonzero__ docs.
  ........
    r70389 | georg.brandl | 2009-03-15 16:43:38 -0500 (Sun, 15 Mar 2009) | 1 line

    Fix a small nit in the error message if bool() falls back on __len__ and it returns the wrong type: it would tell the user that __nonzero__ should return bool or int.
  ........
    r70390 | georg.brandl | 2009-03-15 16:44:43 -0500 (Sun, 15 Mar 2009) | 1 line

    #5491: clarify nested() semantics.
  ........
    r70392 | georg.brandl | 2009-03-15 16:46:00 -0500 (Sun, 15 Mar 2009) | 1 line

    #5488: add missing struct member.
  ........
    r70393 | georg.brandl | 2009-03-15 16:47:42 -0500 (Sun, 15 Mar 2009) | 1 line

    #5478: fix copy-paste oversight in function signature.
  ........
    r70395 | georg.brandl | 2009-03-15 16:51:48 -0500 (Sun, 15 Mar 2009) | 1 line

    #5276: document IDLESTARTUP and .Idle.py.
  ........
    r70400 | georg.brandl | 2009-03-15 16:59:37 -0500 (Sun, 15 Mar 2009) | 3 lines

    Fix markup in re docs and give a mail address in regex howto, so that
    the recommendation to send suggestions to the author can be followed.
  ........
    r70405 | georg.brandl | 2009-03-15 17:11:07 -0500 (Sun, 15 Mar 2009) | 7 lines

    Move the previously local import of threading to module level.

    This is cleaner and avoids lockups in obscure cases where a Queue
    is instantiated while the import lock is already held by another thread.

    OKed by Tim Peters.
  ........
    r70406 | hirokazu.yamamoto | 2009-03-15 17:43:14 -0500 (Sun, 15 Mar 2009) | 1 line

    Added skip for old MSVC.
  ........
    r70418 | georg.brandl | 2009-03-16 14:42:03 -0500 (Mon, 16 Mar 2009) | 1 line

    Add token markup.
  ........
    r70438 | benjamin.peterson | 2009-03-17 15:29:51 -0500 (Tue, 17 Mar 2009) | 1 line

    I thought this was begging for an example
  ........
    r70464 | benjamin.peterson | 2009-03-18 15:58:09 -0500 (Wed, 18 Mar 2009) | 1 line

    a much better example
  ........
    r70468 | benjamin.peterson | 2009-03-18 22:04:31 -0500 (Wed, 18 Mar 2009) | 1 line

    close files after comparing them
  ........
................
  r70508 | benjamin.peterson | 2009-03-21 12:36:10 -0500 (Sat, 21 Mar 2009) | 1 line

  port the queue change r70405
................
2009-03-21 17:44:10 +00:00
Benjamin Peterson
e7d30a2886 Merged revisions 69451 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r69451 | benjamin.peterson | 2009-02-08 15:07:20 -0600 (Sun, 08 Feb 2009) | 1 line

  fix len() when __len__() returns a non number type #5137
........
2009-02-08 21:16:01 +00:00
Mark Dickinson
dc7e8d73ae Merged revisions 69431 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r69431 | mark.dickinson | 2009-02-08 11:02:10 +0000 (Sun, 08 Feb 2009) | 4 lines

  Issue #1717: add a DeprecationWarning in 3.x on type initialization
  for types that implement tp_reserved (formerly tp_compare) but
  not tp_richcompare.
........
2009-02-08 11:05:01 +00:00
Mark Dickinson
d925ef83bc Merged revisions 69214 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r69214 | mark.dickinson | 2009-02-02 20:36:42 +0000 (Mon, 02 Feb 2009) | 4 lines

  Issue #1717: rename tp_compare to tp_reserved.  I'll change the
  type of tp_compare in a separate commit, for ease of reversion
  should things go wrong.
........
2009-02-02 20:41:29 +00:00
Mark Dickinson
c2c707cb70 Merged revisions 69192 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r69192 | mark.dickinson | 2009-02-01 20:36:08 +0000 (Sun, 01 Feb 2009) | 2 lines

  Remove exception for non-NULL tp_compare that was introduced in r69188.
........
2009-02-01 20:37:23 +00:00
Mark Dickinson
a6243a0a47 Merged revisions 69188 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r69188 | mark.dickinson | 2009-02-01 13:59:22 +0000 (Sun, 01 Feb 2009) | 6 lines

  Issue #1717, continued:  remove PyObject_Compare and Py_CmpToRich declarations
  from object.h; don't inherit tp_compare slot on subclasses; and raise TypeError
  when initializing a type that has a nonzero tp_compare slot.  Fix up
  comparison-related comments in object.c and code.h.
........
2009-02-01 14:09:04 +00:00
Mark Dickinson
8bd5f8359f Merged revisions 69184 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r69184 | mark.dickinson | 2009-02-01 12:13:56 +0000 (Sun, 01 Feb 2009) | 3 lines

  Issue #1717:  remove the cmp builtin function, the C-API functions
  PyObject_Cmp, PyObject_Compare, and various support functions.
........
2009-02-01 12:31:56 +00:00
Mark Dickinson
d9a1c5611b Merged revisions 68650-68653 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r68650 | mark.dickinson | 2009-01-17 09:45:37 +0000 (Sat, 17 Jan 2009) | 2 lines

  Remove a couple of references to long in the c-api docs
........
  r68651 | mark.dickinson | 2009-01-17 10:04:45 +0000 (Sat, 17 Jan 2009) | 2 lines

  Issue #4910, patch 3/3:  rename nb_long to nb_reserved
........
  r68652 | mark.dickinson | 2009-01-17 10:21:23 +0000 (Sat, 17 Jan 2009) | 2 lines

  Fix a few more references to long integers in the docs.
........
  r68653 | mark.dickinson | 2009-01-17 10:48:28 +0000 (Sat, 17 Jan 2009) | 2 lines

  Remove attempted long->int conversions in py3k version of float.as_integer_ratio.
........
2009-01-17 18:00:58 +00:00
Mark Dickinson
ab7c4390d6 Merged revisions 68508 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r68508 | mark.dickinson | 2009-01-10 22:14:33 +0000 (Sat, 10 Jan 2009) | 3 lines

  Issue #4910: replace "long" with "int" in docstring for __long__ slot and
  in documentation for PyNumber_Long.
........
2009-01-10 22:18:36 +00:00
Barry Warsaw
91cc8fb92b Fix for bug 4360 "SystemError when method has both super() & closure". Patch
by amaury.forgeotdarc and reviewed by brett.cannon.

Also add release notes about the known problems with the email package.
2008-11-20 20:01:57 +00:00
Benjamin Peterson
9262b849fb Merged revisions 67246 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67246 | benjamin.peterson | 2008-11-17 16:39:09 -0600 (Mon, 17 Nov 2008) | 5 lines

  when __getattr__ is a descriptor, call it correctly; fixes #4230

  patch from Ziga Seilnacht
........
2008-11-17 22:45:50 +00:00
Benjamin Peterson
60192084c4 remove some more references to __cmp__ #1717 2008-10-16 19:34:46 +00:00
Antoine Pitrou
ec569b7947 Issue #2534: speed up isinstance() and issubclass() by 50-70%, so as to
match Python 2.5 speed despite the __instancecheck__ / __subclasscheck__
mechanism. In the process, fix a bug where isinstance() and issubclass(),
when given a tuple of classes as second argument, were looking up
__instancecheck__ / __subclasscheck__ on the tuple rather than on each
type object.

Reviewed by Benjamin Peterson and Raymond Hettinger.
2008-08-26 22:40:48 +00:00
Marc-André Lemburg
4cc0f24857 Rename PyUnicode_AsString -> _PyUnicode_AsString and
PyUnicode_AsStringAndSize -> _PyUnicode_AsStringAndSize to mark
them for interpreter internal use only.

We'll have to rework these APIs or create new ones for the
purpose of accessing the UTF-8 representation of Unicode objects
for 3.1.
2008-08-07 18:54:33 +00:00
Nick Coghlan
d1abd25ed8 Manual forward port of 64962 - use PyObject_HashNotImplemented as a tp_hash level indicator that the default hash implementation has not been inherited 2008-07-15 15:46:38 +00:00
Georg Brandl
f08a9ddcb7 Merged revisions 63724,63726,63732,63744,63754-63755,63757-63758,63760,63775,63781-63782,63787,63805-63808,63818-63819,63823-63824 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r63724 | gregory.p.smith | 2008-05-26 22:22:14 +0200 (Mon, 26 May 2008) | 6 lines

  Fixes issue2791: subprocess.Popen.communicate leaked a file descripton until
  the last reference to the Popen instance was dropped.  Adding explicit
  close() calls fixes it.

  Candidate for backport to release25-maint.
........
  r63726 | benjamin.peterson | 2008-05-26 22:43:24 +0200 (Mon, 26 May 2008) | 2 lines

  fix minor grammar typo
........
  r63732 | benjamin.peterson | 2008-05-26 23:44:26 +0200 (Mon, 26 May 2008) | 2 lines

  remove duplication in test module
........
  r63744 | lars.gustaebel | 2008-05-27 14:39:23 +0200 (Tue, 27 May 2008) | 3 lines

  Do not close external file objects passed to tarfile.open(mode='w:bz2')
  when the TarFile is closed.
........
  r63754 | benjamin.peterson | 2008-05-28 03:12:35 +0200 (Wed, 28 May 2008) | 2 lines

  update tutorial function with more appropiate one from Eric Smith
........
  r63755 | mark.hammond | 2008-05-28 03:54:55 +0200 (Wed, 28 May 2008) | 2 lines

  bdist_wininst now works correctly when both --skip-build and --plat-name are specified.
........
  r63757 | georg.brandl | 2008-05-28 13:21:39 +0200 (Wed, 28 May 2008) | 2 lines

  #2989: add PyType_Modified().
........
  r63758 | benjamin.peterson | 2008-05-28 13:51:41 +0200 (Wed, 28 May 2008) | 2 lines

  fix spelling
........
  r63760 | georg.brandl | 2008-05-28 17:41:36 +0200 (Wed, 28 May 2008) | 2 lines

  #2990: prevent inconsistent state while updating method cache.
........
  r63775 | georg.brandl | 2008-05-29 09:18:17 +0200 (Thu, 29 May 2008) | 2 lines

  Two fixes in bytearray docs.
........
  r63781 | georg.brandl | 2008-05-29 09:38:37 +0200 (Thu, 29 May 2008) | 2 lines

  #2988: add note about catching CookieError when parsing untrusted cookie data.
........
  r63782 | georg.brandl | 2008-05-29 09:45:26 +0200 (Thu, 29 May 2008) | 2 lines

  #2985: allow i8 in XMLRPC responses.
........
  r63787 | georg.brandl | 2008-05-29 16:35:39 +0200 (Thu, 29 May 2008) | 2 lines

  Revert #2990 patch; it's not necessary as Armin showed.
........
  r63805 | raymond.hettinger | 2008-05-30 08:37:27 +0200 (Fri, 30 May 2008) | 1 line

  Issue 2784: fix leaks in exception exit.
........
  r63806 | raymond.hettinger | 2008-05-30 08:49:47 +0200 (Fri, 30 May 2008) | 1 line

  Issue 2855: Fix obscure crasher by slowing down the entire module.  Mimics what was done to dictionaries in r59223.
........
  r63807 | raymond.hettinger | 2008-05-30 09:16:53 +0200 (Fri, 30 May 2008) | 1 line

  Issue 2903:  Add __name__ in globals for namedtuple namespace.
........
  r63808 | georg.brandl | 2008-05-30 09:54:16 +0200 (Fri, 30 May 2008) | 2 lines

  #2999: fix name of third parameter in unicode.replace()'s docstring.
........
  r63818 | georg.brandl | 2008-05-30 21:12:13 +0200 (Fri, 30 May 2008) | 2 lines

  getloadavg() is not available on Windows.
........
  r63819 | georg.brandl | 2008-05-30 21:17:29 +0200 (Fri, 30 May 2008) | 2 lines

  Better quote with single quotes.
........
  r63823 | benjamin.peterson | 2008-05-30 22:44:39 +0200 (Fri, 30 May 2008) | 2 lines

  fix grammar
........
  r63824 | marc-andre.lemburg | 2008-05-30 22:52:18 +0200 (Fri, 30 May 2008) | 5 lines

  Update the locale module alias table.

  Closes #3011.
........
2008-06-10 16:57:31 +00:00
Martin v. Löwis
00709aaa3d Merged revisions 63856-63857,63859-63860 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r63856 | robert.schuppenies | 2008-06-01 18:16:17 +0200 (So, 01 Jun 2008) | 2 lines

  Issue #2898: Added sys.getsizeof() to retrieve size of objects in bytes.
........
  r63859 | georg.brandl | 2008-06-01 18:42:16 +0200 (So, 01 Jun 2008) | 2 lines

  Some style nits. Also clarify in the docstrings what __sizeof__ does.
........
  r63860 | georg.brandl | 2008-06-01 19:05:56 +0200 (So, 01 Jun 2008) | 2 lines

  Fix test_descrtut.
........
2008-06-04 14:18:43 +00:00
Christian Heimes
72b710a596 Renamed PyString to PyBytes 2008-05-26 13:28:38 +00:00
Georg Brandl
1bcf35ae39 #2963: fix method cache types. 2008-05-25 09:32:09 +00:00
Alexandre Vassalotti
f7fa63dd55 Rename copy_reg module to copyreg.
Updated documentation.
Merged revisions 63042 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r63042 | alexandre.vassalotti | 2008-05-11 04:25:28 -0400 (Sun, 11 May 2008) | 5 lines

  Added module stub for copy_reg renaming in 3.0.
  Renamed copy_reg to copyreg in the standard library, to avoid
  spurious warnings and ease later merging to py3k branch. Public
  documentation remains intact.
........
2008-05-11 08:55:36 +00:00
Alexandre Vassalotti
a85998af7c Issue #1950: Fixed misusage of PyUnicode_AsString(). 2008-05-03 18:24:43 +00:00
Martin v. Löwis
250ad613f3 Bug #2565: The repr() of type objects now calls them 'class',
not 'type' - whether they are builtin types or not.
2008-04-07 05:43:42 +00:00
Christian Heimes
9e7f1d2e96 Merged revisions 61038,61042-61045,61047,61050,61053,61055-61056,61061-61062,61066,61068,61070,61083,61085,61092-61103 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r61098 | jeffrey.yasskin | 2008-02-28 05:45:36 +0100 (Thu, 28 Feb 2008) | 7 lines

  Move abc._Abstract into object by adding a new flag Py_TPFLAGS_IS_ABSTRACT,
  which forbids constructing types that have it set. The effect is to speed

    ./python.exe -m timeit -s 'import abc' -s 'class Foo(object): __metaclass__ = abc.ABCMeta' 'Foo()'

  up from 2.5us to 0.201us. This fixes issue 1762.
........
  r61099 | jeffrey.yasskin | 2008-02-28 06:53:18 +0100 (Thu, 28 Feb 2008) | 3 lines

  Speed test_socketserver up from 28.739s to 0.226s, simplify the logic, and make
  sure all tests run even if some fail.
........
  r61100 | jeffrey.yasskin | 2008-02-28 07:09:19 +0100 (Thu, 28 Feb 2008) | 21 lines

  Thread.start() used sleep(0.000001) to make sure it didn't return before the
  new thread had started. At least on my MacBook Pro, that wound up sleeping for
  a full 10ms (probably 1 jiffy). By using an Event instead, we can be absolutely
  certain that the thread has started, and return more quickly (217us).

  Before:
  $  ./python.exe -m timeit -s 'from threading import Thread'  't = Thread(); t.start(); t.join()'
  100 loops, best of 3: 10.3 msec per loop
  $  ./python.exe -m timeit -s 'from threading import Thread; t = Thread()'  't.isAlive()'
  1000000 loops, best of 3: 0.47 usec per loop

  After:
  $  ./python.exe -m timeit -s 'from threading import Thread'  't = Thread(); t.start(); t.join()'
  1000 loops, best of 3: 217 usec per loop
  $  ./python.exe -m timeit -s 'from threading import Thread; t = Thread()'  't.isAlive()'
  1000000 loops, best of 3: 0.86 usec per loop

  To be fair, the 10ms isn't CPU time, and other threads including the spawned
  one get to run during it. There are also some slightly more complicated ways to
  get back the .4us in isAlive() if we want.
........
  r61101 | raymond.hettinger | 2008-02-28 10:23:48 +0100 (Thu, 28 Feb 2008) | 1 line

  Add repeat keyword argument to itertools.product().
........
  r61102 | christian.heimes | 2008-02-28 12:18:49 +0100 (Thu, 28 Feb 2008) | 1 line

  The empty tuple is usually a singleton with a much higher refcnt than 1
........
2008-02-28 12:27:11 +00:00
Christian Heimes
2685563583 Merged revisions 60364-60378 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r60364 | neal.norwitz | 2008-01-27 19:09:48 +0100 (Sun, 27 Jan 2008) | 4 lines

  Update the comment and remove the close.  If we close we can't flush anymore.
  We might still need to close after the for loop if flushing 6! times still
  doesn't cause the signal/exception.
........
  r60365 | georg.brandl | 2008-01-27 19:14:43 +0100 (Sun, 27 Jan 2008) | 2 lines

  Remove effectless expression statement.
........
  r60367 | neal.norwitz | 2008-01-27 19:19:04 +0100 (Sun, 27 Jan 2008) | 1 line

  Try to handle socket.errors properly in is_unavailable
........
  r60370 | christian.heimes | 2008-01-27 20:01:45 +0100 (Sun, 27 Jan 2008) | 1 line

  Change isbasestring function as discussed on the cvs list a while ago
........
  r60372 | neal.norwitz | 2008-01-27 21:03:13 +0100 (Sun, 27 Jan 2008) | 3 lines

  socket.error doesn't have a headers attribute like ProtocolError.
  Handle that situation where we catch socket.errors.
........
  r60375 | georg.brandl | 2008-01-27 21:25:12 +0100 (Sun, 27 Jan 2008) | 2 lines

  Add refcounting extension to build config.
........
  r60377 | jeffrey.yasskin | 2008-01-28 00:08:46 +0100 (Mon, 28 Jan 2008) | 6 lines

  Moved Rational._binary_float_to_ratio() to float.as_integer_ratio() because
  it's useful outside of rational numbers.

  This is my first C code that had to do anything significant. Please be more
  careful when looking over it.
........
  r60378 | christian.heimes | 2008-01-28 00:34:59 +0100 (Mon, 28 Jan 2008) | 1 line

  Added clear cache methods to clear the internal type lookup cache for ref leak test runs.
........
2008-01-27 23:50:43 +00:00