Commit Graph

38130 Commits

Author SHA1 Message Date
Georg Brandl 38d54f7867 #4975: fix bytes/str issue. 2009-01-18 10:43:58 +00:00
Georg Brandl e17d586024 #4983: clarify what "byte sequence" is. 2009-01-18 10:40:25 +00:00
Georg Brandl 64150bc629 #4984: fix number of types. 2009-01-18 10:38:16 +00:00
Brett Cannon 2c5c79cfc4 Tests of case-sensitivity were being executed on OSs which did not have a
case-insensitive file system, leading to test failures. This was due to using
the TestCase objects directly instead of the guard in the test_main() function.
Move over to a class decorator instead to control if the tests should be run.
2009-01-18 06:55:05 +00:00
Jesse Noller b0516a6bc6 Merge r68708 to py3k, fixes 4449 2009-01-18 03:11:38 +00:00
Benjamin Peterson 34f9b4c6f1 Blocked revisions 68705 via svnmerge
........
  r68705 | benjamin.peterson | 2009-01-17 19:28:09 -0600 (Sat, 17 Jan 2009) | 1 line

  bytearrays are mutable sequences
........
2009-01-18 01:29:28 +00:00
Brett Cannon 24b6a2cf38 NOTES for importlib should mention the ultimate end-goal for the package. 2009-01-18 00:36:55 +00:00
Brett Cannon 7044d6b848 Skip over any file or folder that starts with a dot (e.g. .svn). 2009-01-18 00:36:22 +00:00
Amaury Forgeot d'Arc d3fb4bb450 Merged revisions 68678 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68678 | amaury.forgeotdarc | 2009-01-17 23:43:50 +0100 (Sat, 17 Jan 2009) | 3 lines

  follow-up of #3997: since 0xFFFF numbers are not enough to indicate a zip64 format,
  always try to read the "zip64 end of directory structure".
........
2009-01-18 00:29:02 +00:00
Brett Cannon 23cbd8a656 Add initial implementation of importlib. See the NOTES files for what is
planned for the package.

There are no docs yet, but they are coming once the API for the first new
function, importlib.import_module() is finalized.
2009-01-18 00:24:28 +00:00
Benjamin Peterson 458ad47a2c Merged revisions 68459 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68459 | kristjan.jonsson | 2009-01-09 14:27:16 -0600 (Fri, 09 Jan 2009) | 1 line

  Issue 4336:  Let users of HTTPConnection.endheaders() submit a message body to the function if required.
........
2009-01-18 00:08:45 +00:00
Benjamin Peterson 822b21c43b Merged revisions 68458 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68458 | kristjan.jonsson | 2009-01-09 14:23:16 -0600 (Fri, 09 Jan 2009) | 1 line

  Issue 4336:  HTTPRequest._send_output() now deals with the case of the message body not being a string.  This allows clients to use endheaders(message_body) instead of endheaders() + send(message_body) without making any extra checks.
........
2009-01-18 00:04:57 +00:00
Benjamin Peterson b4ddfa41cc fix compiler warning 2009-01-17 23:46:54 +00:00
Benjamin Peterson e5bf383959 Merged revisions 68460 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68460 | kristjan.jonsson | 2009-01-09 14:31:26 -0600 (Fri, 09 Jan 2009) | 1 line

  Issue 4293:  Make Py_AddPendingCall() thread safe
........
2009-01-17 23:43:58 +00:00
Benjamin Peterson 92d0a6a559 I'm just going to assume that all of these revisions don't need to be merge, since it's not indicated:
Blocked revisions 68559,68562,68565-68567,68569,68603-68605 via svnmerge

........
  r68559 | raymond.hettinger | 2009-01-12 16:58:41 -0600 (Mon, 12 Jan 2009) | 1 line

  Issue 1696199: Add collections.Counter().
........
  r68562 | raymond.hettinger | 2009-01-12 19:05:03 -0600 (Mon, 12 Jan 2009) | 7 lines

  Simplify Counter() API.  Replace items keyword argument
  with a mapping.  Makes Counter() idempotent, makes update()
  API the same as Counter.__init__(), makes a more readable
  repr, makes the API more dict-like, and allows Steven
  Bethard's update() example to work.
........
  r68565 | raymond.hettinger | 2009-01-12 21:49:43 -0600 (Mon, 12 Jan 2009) | 1 line

  Minor documentation tweaks and simpler update() example.
........
  r68566 | raymond.hettinger | 2009-01-12 22:13:53 -0600 (Mon, 12 Jan 2009) | 1 line

  Fixup and simplify docstrings and doctests.
........
  r68567 | raymond.hettinger | 2009-01-12 22:50:35 -0600 (Mon, 12 Jan 2009) | 1 line

  Speed-up __repr__.  Eliminate duplicate tests.  Use a from-irmport.
........
  r68569 | raymond.hettinger | 2009-01-13 02:38:14 -0600 (Tue, 13 Jan 2009) | 7 lines

  Add table of idioms/patterns for using Counter objects.
  Improve the appearance and flow of the References section -- it used
  to have a box around it that wasn't distinct from the preceding code
  boxes and it had a weird bolding pattern and hanging indents that
  made the section disproportionately large.
........
  r68603 | raymond.hettinger | 2009-01-13 18:15:21 -0600 (Tue, 13 Jan 2009) | 1 line

  Minor doc tweaks.
........
  r68604 | raymond.hettinger | 2009-01-13 19:15:06 -0600 (Tue, 13 Jan 2009) | 1 line

  Add tests for __init__() and update() with no args.
........
  r68605 | raymond.hettinger | 2009-01-13 19:39:51 -0600 (Tue, 13 Jan 2009) | 1 line

  Fix-up indentation of sample code blocks for namedtuple mthod definitions.
........
2009-01-17 23:28:17 +00:00
Benjamin Peterson c465600466 Merged revisions 68676 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68676 | benjamin.peterson | 2009-01-17 16:27:54 -0600 (Sat, 17 Jan 2009) | 1 line

  fix inspect.isclass() on instances with a custom __getattr__ #1225107
........
2009-01-17 22:41:18 +00:00
Mark Dickinson 17c7cd8d02 Replace PyNumber_Int with PyNumber_Long. 2009-01-17 21:57:11 +00:00
Antoine Pitrou e4bc7f69c2 Issue #4838: When a module is deallocated, free the memory backing the optional module state data. 2009-01-17 21:06:43 +00:00
Amaury Forgeot d'Arc 0c3f8a4800 Merged revisions 68661 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68661 | amaury.forgeotdarc | 2009-01-17 17:40:17 +0100 (Sat, 17 Jan 2009) | 5 lines

  #3997: zipfiles generated with more than 65536 files could not be opened
  with other applications.

  Reviewed by Martin, will backport to 2.6 and 3.0
........
2009-01-17 16:42:26 +00:00
Mark Dickinson 0156dabadf Remove attempted long->int conversions in py3k version of float.as_integer_ratio. 2009-01-17 10:48:28 +00:00
Mark Dickinson bf5c6a97f8 Fix a few more references to long integers in the docs. 2009-01-17 10:21:23 +00:00
Mark Dickinson 8055afd019 Issue #4910, patch 3/3: rename nb_long to nb_reserved 2009-01-17 10:04:45 +00:00
Mark Dickinson 0bbcc4cf98 Remove a couple of references to long in the c-api docs 2009-01-17 09:45:37 +00:00
Benjamin Peterson 9953a8dfd6 fix inspect.formatargspec on functions with keyword-only arguments without defaults #4959 2009-01-17 04:15:01 +00:00
Antoine Pitrou c10c34d6cb Make test_io faster 2009-01-17 02:40:13 +00:00
Mark Dickinson fdaa3a303d Define PY_SSIZE_T_CLEAN at the top of the dbm module. This should fix the
segfaults on the PPC64/Debian buildbots.
2009-01-16 19:31:13 +00:00
Benjamin Peterson 058e31ef2a Merged revisions 68450,68480-68481,68493,68495,68501,68512,68514-68515,68534-68536,68552,68563,68570-68572,68575,68582,68596,68623-68624,68628 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68450 | jeffrey.yasskin | 2009-01-09 10:47:07 -0600 (Fri, 09 Jan 2009) | 3 lines

  Fix issue 4884, preventing a crash in the socket code when python is compiled
  with llvm-gcc and run with a glibc <2.10.
........
  r68480 | vinay.sajip | 2009-01-10 07:38:04 -0600 (Sat, 10 Jan 2009) | 1 line

  Minor documentation changes cross-referencing NullHandler to the documentation on configuring logging in a library.
........
  r68481 | vinay.sajip | 2009-01-10 07:42:04 -0600 (Sat, 10 Jan 2009) | 1 line

  Corrected an incorrect self-reference.
........
  r68493 | benjamin.peterson | 2009-01-10 11:18:55 -0600 (Sat, 10 Jan 2009) | 1 line

  rewrite verbose conditionals
........
  r68495 | benjamin.peterson | 2009-01-10 11:36:44 -0600 (Sat, 10 Jan 2009) | 1 line

  tp_iter only exists with Py_TPFLAGS_HAVE_ITER #4901
........
  r68501 | vinay.sajip | 2009-01-10 13:22:57 -0600 (Sat, 10 Jan 2009) | 1 line

  Corrected minor typo and added .currentmodule directives to fix missing cross-references.
........
  r68512 | benjamin.peterson | 2009-01-10 16:42:10 -0600 (Sat, 10 Jan 2009) | 1 line

  make tests fail if they can't be imported
........
  r68514 | benjamin.peterson | 2009-01-10 17:41:59 -0600 (Sat, 10 Jan 2009) | 1 line

  move seealso to a more appropiate place
........
  r68515 | benjamin.peterson | 2009-01-10 17:49:08 -0600 (Sat, 10 Jan 2009) | 1 line

  macos 9 isn't supported
........
  r68534 | gregory.p.smith | 2009-01-11 11:53:33 -0600 (Sun, 11 Jan 2009) | 2 lines

  correct email address
........
  r68535 | gregory.p.smith | 2009-01-11 11:57:54 -0600 (Sun, 11 Jan 2009) | 9 lines

  Update the documentation for binascii and zlib crc32/adler32 functions
  to better describe the signed vs unsigned return value behavior on
  different platforms and versions of python.  Mention the workaround to
  make them all return the same thing by using & 0xffffffff.

  Fixes issue4903.

  Also needs to be merged into release26-maint, release30-maint, & py3k.
........
  r68536 | benjamin.peterson | 2009-01-11 13:48:15 -0600 (Sun, 11 Jan 2009) | 1 line

  add email addresses
........
  r68552 | vinay.sajip | 2009-01-12 14:36:18 -0600 (Mon, 12 Jan 2009) | 1 line

  Minor changes/corrections in markup.
........
  r68563 | benjamin.peterson | 2009-01-12 19:49:10 -0600 (Mon, 12 Jan 2009) | 1 line

  small logic correction
........
  r68570 | raymond.hettinger | 2009-01-13 03:08:32 -0600 (Tue, 13 Jan 2009) | 5 lines

  Issue 4922: Incorrect comments for MutableSet.add() and MutableSet.discard().

  Needs to be backported to 2.6 and forward ported to 3.0 and 3.1.
........
  r68571 | armin.ronacher | 2009-01-13 05:52:23 -0600 (Tue, 13 Jan 2009) | 3 lines

  ast.literal_eval can properly evaluate complex numbers now.  This fixes issue4907.
........
  r68572 | andrew.kuchling | 2009-01-13 07:40:54 -0600 (Tue, 13 Jan 2009) | 1 line

  Note that first coord. is left alone
........
  r68575 | thomas.heller | 2009-01-13 11:32:28 -0600 (Tue, 13 Jan 2009) | 1 line

  Fix refcount leak in error cases.  Bug found by coverity.
........
  r68582 | georg.brandl | 2009-01-13 16:14:01 -0600 (Tue, 13 Jan 2009) | 2 lines

  Use assertRaises.
........
  r68596 | amaury.forgeotdarc | 2009-01-13 17:39:22 -0600 (Tue, 13 Jan 2009) | 3 lines

  #1162154: inspect.getmembers() now skips attributes that raise AttributeError,
  e.g. a __slots__ attribute which has not been set.
........
  r68623 | vinay.sajip | 2009-01-15 16:48:13 -0600 (Thu, 15 Jan 2009) | 1 line

  Made minor changes/corrections in markup. Added a couple of section headings.
........
  r68624 | vinay.sajip | 2009-01-15 17:04:47 -0600 (Thu, 15 Jan 2009) | 1 line

  Minor changes/corrections in markup.
........
  r68628 | benjamin.peterson | 2009-01-15 20:55:24 -0600 (Thu, 15 Jan 2009) | 1 line

  compare with == not is #4946
........
2009-01-16 03:54:08 +00:00
Benjamin Peterson 1456778a6a remove duplicate definition of PyExc_BufferError #4950 2009-01-16 03:06:57 +00:00
Mark Dickinson cce2f217d4 Issue 4910, patch 2 of (probably) 3: pave the way for renaming of
nb_long:  remove last remaining use of nb_long
(in the struct module) from the core, set nb_long slots on all builtin
and extension types to 0, and remove uses of __long__ in test_complex
and test_binop.

Reviewed by Benjamin Peterson.
2009-01-15 19:32:23 +00:00
Mark Dickinson 29500f64b6 Merged revisions 68611-68613 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68611 | mark.dickinson | 2009-01-15 14:54:37 +0000 (Thu, 15 Jan 2009) | 2 lines

  Issue #4397.  Fix occasional test_socket failure on OS X.
........
  r68612 | mark.dickinson | 2009-01-15 14:58:28 +0000 (Thu, 15 Jan 2009) | 2 lines

  Comment typo
........
  r68613 | mark.dickinson | 2009-01-15 15:17:43 +0000 (Thu, 15 Jan 2009) | 2 lines

  Another typo fix.
........
2009-01-15 15:36:10 +00:00
Raymond Hettinger b8baf6360f Issue #1696199: Add collections.Counter().
Forward port from Py2.7.
2009-01-14 02:20:07 +00:00
Amaury Forgeot d'Arc 3bc0f7ebee Blocked revisions 68592 via svnmerge
........
  r68592 | amaury.forgeotdarc | 2009-01-14 00:19:08 +0100 (mer., 14 janv. 2009) | 5 lines

  #4807: Remove a wrong usage of wsprintf in the winreg module
  ("windows sprintf", different than swprintf)

  Needed for the windows CE port.
........
2009-01-13 23:21:11 +00:00
Antoine Pitrou 2a1854bcf4 Blocked revisions 68589 via svnmerge
........
  r68589 | antoine.pitrou | 2009-01-14 00:13:52 +0100 (mer., 14 janv. 2009) | 5 lines

  Issue #4935: The overflow checking code in the expandtabs() method common
  to str, bytes and bytearray could be optimized away by the compiler, letting
  the interpreter segfault instead of raising an error.
........
2009-01-13 23:14:47 +00:00
Benjamin Peterson b6eba4f8b6 encoding returns bytes objects 2009-01-13 23:14:04 +00:00
Antoine Pitrou 8d4e505aa8 Issue #4935: The overflow checking code in the expandtabs() method common
to str, bytes and bytearray could be optimized away by the compiler (*), letting
the interpreter segfault instead of raising an error.

(*) or at least it is our interpretation
2009-01-13 22:59:11 +00:00
Benjamin Peterson b9d1a4ddc3 Blocked revisions 68579-68580,68584 via svnmerge
........
  r68579 | benjamin.peterson | 2009-01-13 15:42:23 -0600 (Tue, 13 Jan 2009) | 1 line

  make bytearrayobject.o depend on the stringlib #4936
........
  r68580 | benjamin.peterson | 2009-01-13 15:43:11 -0600 (Tue, 13 Jan 2009) | 1 line

  add bytearrayobject.h to PYTHON_HEADERS
........
  r68584 | benjamin.peterson | 2009-01-13 16:22:41 -0600 (Tue, 13 Jan 2009) | 1 line

  de-spacify
........
2009-01-13 22:33:14 +00:00
Benjamin Peterson b197fec58b de-spacify 2009-01-13 22:25:18 +00:00
Benjamin Peterson 9ae3220c06 make bytearrayobject.o depend on the stringlib headers #4936 2009-01-13 21:53:28 +00:00
Benjamin Peterson a54c9090ac Merged revisions 68425,68461,68498 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68425 | benjamin.peterson | 2009-01-08 20:56:32 -0600 (Thu, 08 Jan 2009) | 1 line

  fix markup
........
  r68461 | kristjan.jonsson | 2009-01-09 15:35:16 -0600 (Fri, 09 Jan 2009) | 2 lines

  Issue 4293:  Make Py_AddPendingCall() thread safe
  Add test cases and documentation
........
  r68498 | benjamin.peterson | 2009-01-10 13:08:49 -0600 (Sat, 10 Jan 2009) | 1 line

  fix encoding
........
2009-01-13 02:11:23 +00:00
Amaury Forgeot d'Arc f343e01c17 Merged revisions 68560 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68560 | amaury.forgeotdarc | 2009-01-13 00:36:55 +0100 (mar., 13 janv. 2009) | 6 lines

  #3720: Interpreter crashes when an evil iterator removes its own next function.

  Now the slot is filled with a function that always raises.

  Will not backport: extensions compiled with 2.6.x would not run on 2.6.0.
........
2009-01-12 23:58:21 +00:00
Mark Dickinson e5e298f875 Issue #4910 (1st patch of a series): fix int() and the corresponding
PyNumber_Int/PyNumber_Long API function so that it no longer attempts
to call the __long__ method for conversion.  Only the __int__ and __trunc__
methods are used.  (This removes a major remaining use of the nb_long
slot from the Python 3.x core.)

Thanks Benjamin for review.
2009-01-12 20:49:19 +00:00
Martin v. Löwis 7c2b66cc02 Merged revisions 68455,68476,68542 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68455 | kristjan.jonsson | 2009-01-09 21:03:27 +0100 (Fr, 09 Jan 2009) | 1 line

  Issue 3582.  Improved thread support and TLS for Windows
........
  r68476 | kristjan.jonsson | 2009-01-10 13:14:31 +0100 (Sa, 10 Jan 2009) | 1 line

  Issue 4906:  Preserve windows error state across PyThread_get_key_value
........
  r68542 | martin.v.loewis | 2009-01-12 09:11:24 +0100 (Mo, 12 Jan 2009) | 2 lines

  Issue #4893: Use NT threading on CE.
........
2009-01-12 08:21:03 +00:00
Martin v. Löwis ec59d04fad Merged revisions 68540 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68540 | martin.v.loewis | 2009-01-12 08:57:11 +0100 (Mo, 12 Jan 2009) | 2 lines

  Issue #4915: Port sysmodule to Windows CE.
........
2009-01-12 07:59:10 +00:00
Gregory P. Smith de3369f2ca Fixes issue #3826 and #4791:
Have SocketIO objects update their reference count in the underlying
socket object on close() so that the underlying socket object is
closed immediately when the last user is done rather than at an
unknown later time when garbage collection can do it.
2009-01-12 04:50:11 +00:00
Benjamin Peterson ce36962d12 remove docs for PyBytes_Format #4917 2009-01-12 00:28:16 +00:00
Antoine Pitrou d6e8de1797 Issue #4916: fix little-endian UTF-16 decoding bug on big-endian UCS-4 builds, introduced by r68483. 2009-01-11 23:56:55 +00:00
Benjamin Peterson a4a37fefb6 Merged revisions 68381 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68381 | martin.v.loewis | 2009-01-07 12:40:40 -0600 (Wed, 07 Jan 2009) | 2 lines

  Issue #4850: Change COUNT_ALLOCS variables to Py_ssize_t.
........
2009-01-11 17:13:55 +00:00
Mark Dickinson c7d484de9b Remove __long__ methods from UserString and from Demo/ classes. 2009-01-11 11:54:02 +00:00
Martin v. Löwis e97637daaa Merged revisions 68527 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68527 | martin.v.loewis | 2009-01-11 10:43:55 +0100 (So, 11 Jan 2009) | 2 lines

  Issue #4895: Use _strdup on Windows CE.
........
2009-01-11 09:45:11 +00:00
Martin v. Löwis a9b54c78d7 Merged revisions 68523 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r68523 | martin.v.loewis | 2009-01-11 10:26:54 +0100 (So, 11 Jan 2009) | 2 lines

  Issue #4279: Fix build of parsermodule under Cygwin.
........
2009-01-11 09:30:50 +00:00