Commit Graph

1712 Commits

Author SHA1 Message Date
Mark Dickinson b27406c03e Issue 2748: fix __ceil__, __floor__ and __round__ magic methods in
Decimal, and add tests.
2008-05-09 13:42:33 +00:00
Benjamin Peterson d71ca41b37 Remove os.path.walk 2008-05-08 23:44:58 +00:00
Brett Cannon 34afe87d3a Document that the mutex module is now gone. 2008-05-08 20:31:44 +00:00
Brett Cannon 900ee3a073 Remove the user module. 2008-05-08 20:31:11 +00:00
Brett Cannon 0d71ee756d Add entry for removal of imputil. Also start the 3.0b1 section. 2008-05-08 18:13:40 +00:00
Barry Warsaw 9eab8b0385 Missed one file 2008-05-08 13:05:38 +00:00
Thomas Heller b041fdaf94 Merged revisions 60056-60071,60073-60127,60129-60261,60263-60284,60286-62589,62591-62594 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k-ctypes-pep3118

........
  r60059 | thomas.heller | 2008-01-18 22:17:05 +0100 (Fri, 18 Jan 2008) | 1 line

  Implement pep3118 format strings for SimpleCData types.
........
  r60108 | thomas.heller | 2008-01-19 22:56:12 +0100 (Sat, 19 Jan 2008) | 3 lines

  Always use explicit endian specifiers for simple types, and a bug fix
  too.  Add unittest.
........
  r60112 | thomas.heller | 2008-01-19 23:25:14 +0100 (Sat, 19 Jan 2008) | 2 lines

  Fully implement tp_asbuffer for pointer types.
........
  r60261 | thomas.heller | 2008-01-24 22:01:29 +0100 (Thu, 24 Jan 2008) | 4 lines

  Added shape and ndim field to StgDictObject.  Implemented pep3118
  format string, ndim, and shape for array types.  Added a
  buffer_info(type_or_object) for testing.
........
  r60278 | thomas.heller | 2008-01-25 11:53:33 +0100 (Fri, 25 Jan 2008) | 2 lines

  Implement pep3118 format strings for ctypes.Structure and ctypes.Union.
........
  r60288 | thomas.heller | 2008-01-25 17:58:30 +0100 (Fri, 25 Jan 2008) | 2 lines

  All ctypes types now use the same CData_GetBuffer function.
........
  r60289 | thomas.heller | 2008-01-25 19:59:45 +0100 (Fri, 25 Jan 2008) | 2 lines

  Fix format string for structures, and itemsize for arrays.
........
  r60290 | thomas.heller | 2008-01-25 20:09:03 +0100 (Fri, 25 Jan 2008) | 2 lines

  Implement to format string for function pointers.
........
  r60292 | thomas.heller | 2008-01-25 20:32:20 +0100 (Fri, 25 Jan 2008) | 3 lines

  Only structures with native packing implement the pep.  Unions, or
  packed structures do not.
........
  r60293 | thomas.heller | 2008-01-25 20:34:31 +0100 (Fri, 25 Jan 2008) | 2 lines

  Update the test.
........
  r60295 | thomas.heller | 2008-01-25 20:44:41 +0100 (Fri, 25 Jan 2008) | 2 lines

  Fixed a few XXX markers.
........
  r60298 | thomas.heller | 2008-01-25 21:11:08 +0100 (Fri, 25 Jan 2008) | 1 line

  Fix test for 64-bt platform.
........
  r60299 | thomas.heller | 2008-01-25 21:34:11 +0100 (Fri, 25 Jan 2008) | 2 lines

  Add test for the readonly bit.
........
  r60384 | thomas.heller | 2008-01-28 08:45:04 +0100 (Mon, 28 Jan 2008) | 4 lines

  Restructure the test so that it contains little endian format strings.
  On big endian machines, the format strings are converted by replacing
  '<' with '>'.
........
  r60385 | thomas.heller | 2008-01-28 08:58:46 +0100 (Mon, 28 Jan 2008) | 1 line

  Bugfix and test for explicit big and little endian types.
........
  r60428 | thomas.heller | 2008-01-29 22:00:37 +0100 (Tue, 29 Jan 2008) | 1 line

  Add comments to clarify the tests.
........
  r62589 | thomas.heller | 2008-04-30 13:49:46 +0200 (Wed, 30 Apr 2008) | 1 line

  Fix compiler warnings.
........
2008-04-30 17:11:46 +00:00
Benjamin Peterson a2f837f751 Document the fact that '\U' and '\u' escapes are not treated specially in 3.0 (see issue 2541) 2008-04-28 21:05:10 +00:00
Mark Dickinson b0e2b4c52f Merged revisions 62499 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r62499 | mark.dickinson | 2008-04-25 12:11:04 -0400 (Fri, 25 Apr 2008) | 7 lines

  Issue #1496032.  Add -mieee to BASECFLAGS on alpha, when gcc is
  the compiler.  This should(?) help to fix failures in test_math
  and test_cmath on Linux/alpha.

  Also add configure message reporting the result of uname -m, as
  a debugging aid.
........
2008-04-26 20:48:56 +00:00
Thomas Heller e106dc3cf6 Merged revisions 62481 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r62481 | thomas.heller | 2008-04-24 20:14:19 +0200 (Do, 24 Apr 2008) | 3 lines

  Remove cyclic reference in CFuncPtr instances; see issue #2682.

  Backport candidate for the release25-maint branch.
........
2008-04-24 18:39:36 +00:00
Mark Dickinson 7ab6be216a PyLong_FromSsize_t was incorrect when sizeof(size_t) > sizeof(long);
rewrite it so that it doesn't care about relative sizes of size_t,
long and long long.

The rewrite is modeled on PyLong_FromLong, instead of using
PyLong_FromByteArray;  this makes the algorithm simpler and
more direct, and possibly also slightly faster.
2008-04-15 21:42:42 +00:00
Lars Gustäbel c2ea8c6c3a Issue #2058: Remove the buf attribute and add __slots__ to the
TarInfo class in order to reduce tarfile's memory usage.
2008-04-14 10:05:48 +00:00
Amaury Forgeot d'Arc 7fedbe513d Add a NEWS entry for issue2221.
Also don't flush stdout on each call to exec() or eval().
Only interactive input really needs it.
2008-04-10 21:03:09 +00:00
Martin v. Löwis 8efc62cc3f Bug #2606: Avoid calling .sort() on a dict_keys object. 2008-04-10 19:02:25 +00:00
Guido van Rossum dc21db36cb "make install" is now an alias for "make altinstall", to prevent
accidentally overwriting a Python 2.x installation.
Use "make fullinstall" to force Python 3.0 to be installed as
"python".
2008-04-07 18:37:41 +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
Martin v. Löwis 790465fd90 Change command line processing API to use wchar_t.
Fixes #2128.
2008-04-05 20:41:37 +00:00
Thomas Heller bff533b479 Merged revisions 62149, 62153, 62154 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

Sync with files from the just released libffi 3.0.5 version.

More files from libffi 3.0.5.
Removed libffi.pc.in because it is not needed for ctypes.

News entry for: Sync with files from the just released libffi 3.0.5 version.
2008-04-04 19:53:14 +00:00
Thomas Heller f44b9a1ac2 Merged revisions 62145 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r62145 | thomas.heller | 2008-04-04 12:07:55 +0200 (Fri, 04 Apr 2008) | 3 lines

  Issue #2544: On HP-UX systems, use 'gcc -shared' for linking when gcc
  is used as compiler.
........
2008-04-04 10:18:23 +00:00
Barry Warsaw 66079cd987 post release updates 2008-04-04 01:36:36 +00:00
Barry Warsaw bb5cd08688 release.py induced and manual editing steps for 3.0a4. 2008-04-02 23:33:27 +00:00
Benjamin Peterson ec79aad427 Fixed NEWS due to my bad merging skills 2008-04-02 22:44:10 +00:00
Benjamin Peterson ad9d48d865 Merged revisions 62090-62091,62096,62100,62102,62110-62114 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r62090 | brett.cannon | 2008-04-01 07:37:43 -0500 (Tue, 01 Apr 2008) | 3 lines

  Generalize test.test_support.test_stdout() with a base context manager so that
  it is easy to capture stderr if desired.
........
  r62091 | brett.cannon | 2008-04-01 07:46:02 -0500 (Tue, 01 Apr 2008) | 3 lines

  Add ``if __name__ == '__main__'`` to some test files where it didn't take a lot
  of effort to do so.
........
  r62096 | amaury.forgeotdarc | 2008-04-01 17:52:48 -0500 (Tue, 01 Apr 2008) | 4 lines

  Newly enabled test appears to leak:
  it registers the same codec on each iteration.
  Do it only once at load time.
........
  r62100 | amaury.forgeotdarc | 2008-04-01 19:55:04 -0500 (Tue, 01 Apr 2008) | 4 lines

  A DocTestSuite cannot run multiple times: it clears its globals dictionary after the first run.

  Rebuild the DocTestSuite on each iteration.
........
  r62102 | jeffrey.yasskin | 2008-04-01 23:07:44 -0500 (Tue, 01 Apr 2008) | 3 lines

  Try to make test_signal less flaky.  I still see some flakiness in
  test_itimer_prof.
........
  r62110 | vinay.sajip | 2008-04-02 16:09:27 -0500 (Wed, 02 Apr 2008) | 1 line

  Fix: #2315, #2316, #2317: TimedRotatingFileHandler - changed logic to better handle daylight savings time, deletion of old log files, and fixed a bug in calculating rollover when no logging occurs for a longer interval than the rollover period.
........
  r62111 | vinay.sajip | 2008-04-02 16:10:23 -0500 (Wed, 02 Apr 2008) | 1 line

  Added updates with respect to recent changes to TimedRotatingFileHandler.
........
  r62112 | vinay.sajip | 2008-04-02 16:17:25 -0500 (Wed, 02 Apr 2008) | 1 line

  Added updates with respect to recent changes to TimedRotatingFileHandler.
........
  r62113 | amaury.forgeotdarc | 2008-04-02 16:18:46 -0500 (Wed, 02 Apr 2008) | 2 lines

  Remove debug prints; the buildbot now passes the tests
........
  r62114 | benjamin.peterson | 2008-04-02 16:20:35 -0500 (Wed, 02 Apr 2008) | 2 lines

  Suggested proposed changes to Python be considered on some mailing lists first
........
2008-04-02 21:49:44 +00:00
Neal Norwitz 6cf49cf106 Remove the dl module per PEP 3108. 2008-03-24 06:22:57 +00:00
Martin v. Löwis 73a22f0500 Add build_py_2to3. 2008-03-22 00:35:10 +00:00
Trent Nelson 428de65ca9 - Issue #719888: Updated tokenize to use a bytes API. generate_tokens has been
renamed tokenize and now works with bytes rather than strings. A new
  detect_encoding function has been added for determining source file encoding
  according to PEP-0263. Token sequences returned by tokenize always start
  with an ENCODING token which specifies the encoding used to decode the file.
  This token is used to encode the output of untokenize back to bytes.

Credit goes to Michael "I'm-going-to-name-my-first-child-unittest" Foord from Resolver Systems for this work.
2008-03-18 22:41:35 +00:00
Guido van Rossum f416981691 - A new pickle protocol (protocol 3) is added with explicit support
for bytes.  This is the default protocol.  It intentionally cannot
  be unpickled by Python 2.x.

- When a pickle	written	by Python 2.x contains an (8-bit) str
  instance, this is now decoded to a (Unicode) str instance.  The
  encoding used to do this defaults to ASCII, but can be overridden
  via two new keyword arguments to the Unpickler class.  Previously
  this would create bytes instances, which is usually wrong: str
  instances are often used to pickle attribute names etc., and text is
  more common than binary data anyway.
2008-03-17 22:56:06 +00:00
Gregory P. Smith 425136be01 mention the zlib crc32/adler32 changes 2008-03-17 20:45:21 +00:00
Martin v. Löwis 2593146227 Bug #2301: Don't try decoding the source code into the original
encoding for syntax errors.
2008-03-17 20:43:42 +00:00
Ka-Ping Yee ddaa7064ee Patch from jbalogh fixes issue #2282 (misnamed seekable() method). 2008-03-17 20:35:15 +00:00
Raymond Hettinger 736c0ab428 Move itertools izip() code to builtins as zip(). Complete the renaming. 2008-03-13 02:09:15 +00:00
Martin v. Löwis 071ef771dc Default to ASCII as the locale.getpreferredencoding, if the POSIX
system doesn't support CODESET and LANG isn't set or doesn't
allow deduction of an encoding.
2008-03-08 11:24:24 +00:00
Martin v. Löwis 92fab7569d Use wchar_t functions in _locale module. 2008-03-08 10:40:41 +00:00
Brett Cannon e7a30f7216 Toss test.testall. 2008-03-03 03:36:27 +00:00
Barry Warsaw a9d499d791 Prep for 3.0a4 2008-03-01 18:38:07 +00:00
Barry Warsaw 659fc42653 Copyright and version tweaks for 3.0a3. 2008-03-01 17:45:23 +00:00
Neal Norwitz de802dc1fa Remove bogus entries from r60902 which was a problem from merging. There might be some extra
stuff left in here, but it should be close to accurate now.  Checked in with permission from Barry.
2008-03-01 03:38:40 +00:00
Christian Heimes 09aaa88328 Patch from Georg Brandl: Fix co_lineno of decorated function and class objects. If you see an error in test_inspect please delete all pyc files. 2008-02-23 15:01:06 +00:00
Raymond Hettinger b3a65f8d19 Move UserString to collections.
Removed decode() method.  Added isidentifier() and format() methods.
Drop MutableUserString class.
2008-02-21 22:11:37 +00:00
Guido van Rossum ea6775b6c4 Remove merge turds.
Break long lines.
Remove item that was rolled back (float formatting).
2008-02-21 20:16:31 +00:00
Christian Heimes 7131fd957d Merged revisions 60481,60485,60489-60492,60494-60496,60498-60499,60501-60503,60505-60506,60508-60509,60523-60524,60532,60543,60545,60547-60548,60552,60554,60556-60559,60561-60562,60569,60571-60572,60574,60576-60583,60585-60586,60589,60591,60594-60595,60597-60598,60600-60601,60606-60612,60615,60617,60619-60621,60623-60625,60627-60629,60631,60633,60635,60647,60650,60652,60654,60656,60658-60659,60664-60666,60668-60670,60672,60676,60678,60680-60683,60685-60686,60688,60690,60692-60694,60697-60700,60705-60706,60708,60711,60714,60720,60724-60730,60732,60736,60742,60744,60746,60748,60750-60751,60753,60756-60757,60759-60761,60763-60764,60766,60769-60770,60774-60784,60787-60789,60793,60796,60799-60809,60812-60813,60815-60821,60823-60826,60828-60829,60831-60834,60836,60838-60839,60846-60849,60852-60854,60856-60859,60861-60870,60874-60878,60880-60892,60894-60898 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r60876 | georg.brandl | 2008-02-17 16:14:10 +0100 (Sun, 17 Feb 2008) | 2 lines

  Fix function name.
........
  r60877 | facundo.batista | 2008-02-17 17:21:13 +0100 (Sun, 17 Feb 2008) | 4 lines


  Now we handle different the backup copy, because of security
  issues regarding user/group and permissions. Fixes 1050828.
........
  r60878 | facundo.batista | 2008-02-17 19:59:29 +0100 (Sun, 17 Feb 2008) | 4 lines


  Issue 2112. mmap does not raises EnvironmentError no more, but
  a subclass of it. Thanks John Lenton.
........
  r60882 | amaury.forgeotdarc | 2008-02-17 21:56:31 +0100 (Sun, 17 Feb 2008) | 5 lines

  Compilation was broken on Windows since the introduction of Advanced String Formatting.

  Only PCBuild (vs9) was really tested.
  Changes for older compilers were done manually.
........
  r60883 | georg.brandl | 2008-02-17 22:18:55 +0100 (Sun, 17 Feb 2008) | 2 lines

  #2133: fix HTML color spec.
........
  r60884 | facundo.batista | 2008-02-18 04:43:43 +0100 (Mon, 18 Feb 2008) | 5 lines


  Issue #1916. Added isgenerator() and isgeneratorfunction() to
  inspect.py.  Thanks Javi Mansilla for patch review and
  corrections.
........
  r60885 | facundo.batista | 2008-02-18 13:48:43 +0100 (Mon, 18 Feb 2008) | 4 lines


  Issue 1224. Now we support again the double slash in the URL.
  Thanks Anthony Lenton.
........
  r60887 | eric.smith | 2008-02-18 15:25:02 +0100 (Mon, 18 Feb 2008) | 1 line

  Temporarily removed float tests.  See issue 1600.
........
  r60891 | kristjan.jonsson | 2008-02-18 18:40:47 +0100 (Mon, 18 Feb 2008) | 1 line

  Perform correct handling of stack overflow for windows: Catch the correct exception code and reset the overflow condition when handled.
........
2008-02-19 14:21:46 +00:00
Christian Heimes a156e09b19 Merged revisions 60481,60485,60489-60492,60494-60496,60498-60499,60501-60503,60505-60506,60508-60509,60523-60524,60532,60543,60545,60547-60548,60552,60554,60556-60559,60561-60562,60569,60571-60572,60574,60576-60583,60585-60586,60589,60591,60594-60595,60597-60598,60600-60601,60606-60612,60615,60617,60619-60621,60623-60625,60627-60629,60631,60633,60635,60647,60650,60652,60654,60656,60658-60659,60664-60666,60668-60670,60672,60676,60678,60680-60683,60685-60686,60688,60690,60692-60694,60697-60700,60705-60706,60708,60711,60714,60720,60724-60730,60732,60736,60742,60744,60746,60748,60750-60751,60753,60756-60757,60759-60761,60763-60764,60766,60769-60770,60774-60784,60787-60845 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r60790 | raymond.hettinger | 2008-02-14 10:32:45 +0100 (Thu, 14 Feb 2008) | 4 lines

  Add diagnostic message to help figure-out why SocketServer tests occasionally crash
  when trying to remove a pid that in not in the activechildren list.
........
  r60791 | raymond.hettinger | 2008-02-14 11:46:57 +0100 (Thu, 14 Feb 2008) | 1 line

  Add fixed-point examples to the decimal FAQ
........
  r60792 | raymond.hettinger | 2008-02-14 12:01:10 +0100 (Thu, 14 Feb 2008) | 1 line

  Improve rst markup
........
  r60794 | raymond.hettinger | 2008-02-14 12:57:25 +0100 (Thu, 14 Feb 2008) | 1 line

  Show how to remove exponents.
........
  r60795 | raymond.hettinger | 2008-02-14 13:05:42 +0100 (Thu, 14 Feb 2008) | 1 line

  Fix markup.
........
  r60797 | christian.heimes | 2008-02-14 13:47:33 +0100 (Thu, 14 Feb 2008) | 1 line

  Implemented Martin's suggestion to clear the free lists during the garbage collection of the highest generation.
........
  r60798 | raymond.hettinger | 2008-02-14 13:49:37 +0100 (Thu, 14 Feb 2008) | 1 line

  Simplify moneyfmt() recipe.
........
  r60810 | raymond.hettinger | 2008-02-14 20:02:39 +0100 (Thu, 14 Feb 2008) | 1 line

  Fix markup
........
  r60811 | raymond.hettinger | 2008-02-14 20:30:30 +0100 (Thu, 14 Feb 2008) | 1 line

  No need to register subclass of ABCs.
........
  r60814 | thomas.heller | 2008-02-14 22:00:28 +0100 (Thu, 14 Feb 2008) | 1 line

  Try to correct a markup error that does hide the following paragraph.
........
  r60822 | christian.heimes | 2008-02-14 23:40:11 +0100 (Thu, 14 Feb 2008) | 1 line

  Use a static and interned string for __subclasscheck__ and __instancecheck__ as suggested by Thomas Heller in #2115
........
  r60827 | christian.heimes | 2008-02-15 07:57:08 +0100 (Fri, 15 Feb 2008) | 1 line

  Fixed repr() and str() of complex numbers. Complex suffered from the same problem as floats but I forgot to test and fix them.
........
  r60830 | christian.heimes | 2008-02-15 09:20:11 +0100 (Fri, 15 Feb 2008) | 2 lines

  Bug #2111: mmap segfaults when trying to write a block opened with PROT_READ
  Thanks to Thomas Herve for the fix.
........
  r60835 | eric.smith | 2008-02-15 13:14:32 +0100 (Fri, 15 Feb 2008) | 1 line

  In PyNumber_ToBase, changed from an assert to returning an error when PyObject_Index() returns something other than an int or long.  It should never be possible to trigger this, as PyObject_Index checks to make sure it returns an int or long.
........
  r60837 | skip.montanaro | 2008-02-15 20:03:59 +0100 (Fri, 15 Feb 2008) | 8 lines

  Two new functions:

    * place_summary_first copies the regrtest summary to the front of the file
      making it easier to scan quickly for problems.

    * count_failures gets the actual count of the number of failing tests, not
      just a 1 (some failures) or 0 (no failures).
........
  r60840 | raymond.hettinger | 2008-02-15 22:21:25 +0100 (Fri, 15 Feb 2008) | 1 line

  Update example to match the current syntax.
........
  r60841 | amaury.forgeotdarc | 2008-02-15 22:22:45 +0100 (Fri, 15 Feb 2008) | 8 lines

  Issue #2115: __slot__ attributes setting was 10x slower.
  Also correct a possible crash using ABCs.

  This change is exactly the same as an optimisation
  done 5 years ago, but on slot *access*:
  http://svn.python.org/view?view=rev&rev=28297
........
  r60842 | amaury.forgeotdarc | 2008-02-15 22:27:44 +0100 (Fri, 15 Feb 2008) | 2 lines

  Temporarily let these tests pass
........
  r60843 | kurt.kaiser | 2008-02-15 22:56:36 +0100 (Fri, 15 Feb 2008) | 2 lines

  ScriptBinding event handlers weren't returning 'break'. Patch 2050, Tal Einat.
........
  r60844 | kurt.kaiser | 2008-02-15 23:25:09 +0100 (Fri, 15 Feb 2008) | 4 lines

  Configured selection highlighting colors were ignored; updating highlighting
  in the config dialog would cause non-Python files to be colored as if they
  were Python source; improve use of ColorDelagator.  Patch 1334. Tal Einat.
........
  r60845 | amaury.forgeotdarc | 2008-02-15 23:44:20 +0100 (Fri, 15 Feb 2008) | 9 lines

  Re-enable tests, they were failing since gc.collect() clears the various freelists.
  They still remain fragile.

  For example, a call to assertEqual currently does not make any allocation
  (which surprised me at first).
  But this can change when gc.collect also deletes the numerous "zombie frames"
  attached to each function.
........
2008-02-16 07:38:31 +00:00
Raymond Hettinger 65baa34115 Issue 2025: Add index() and count() methods to tuple so that it will follow
the ABC for collections.Sequence.
2008-02-07 00:41:02 +00:00
Raymond Hettinger e4c96ad7d3 Update docs for collections ABCs and for collections.UserDict. 2008-02-06 01:23:58 +00:00
Raymond Hettinger 0fc8351f64 Remove the old UserDict module. 2008-02-06 00:15:42 +00:00
Raymond Hettinger 48b8b665d7 Put an updated UserDict class in the collections module and
register it as a compliant Mutable Mapping.

Todo:  Convert the UserDict dependent tests to the new API
       and then remove the old UserDict module.  Move the
       UserDict docs to collections.rst.
2008-02-05 01:53:00 +00:00
Raymond Hettinger edf3b734c0 Remove DictMixin which is superceded by collections.MutableMapping 2008-02-04 22:07:15 +00:00
Christian Heimes dfc12edbca Fixed multiple reinitialization of the Python interpreter. The small int list in longobject.c has caused a seg fault during the third finalization. 2008-01-31 15:16:38 +00:00
Raymond Hettinger 70b64fce96 Issue #1771: Remove cmp parameter from list.sort() and builtin.sorted(). 2008-01-30 20:15:17 +00:00
Christian Heimes c04dac08c4 Fixed issue #1973: bytes.fromhex('') raises SystemError 2008-01-30 11:27:57 +00:00
Christian Heimes 7b876158dc Fixed #1969: split and rsplit in bytearray are inconsistent 2008-01-30 09:51:48 +00:00
Raymond Hettinger 1dfde1ddc0 Replace map(None, *iterables) with zip(*iterables). 2008-01-22 23:25:35 +00:00
Facundo Batista 2336bddd5d Fix Issue #1769: Now int('- 1') or int('+ 1') is not allowed
any more.  Thanks Juan Jose Conti.  Also added tests.
2008-01-19 19:12:01 +00:00
Christian Heimes 386cd1e3c9 long(float('nan')) raises an OverflowError as discussed on the mailing list a week ago 2008-01-15 02:01:20 +00:00
Christian Heimes 62fe8a8e1c Fixed merge accident 2008-01-15 01:58:48 +00:00
Raymond Hettinger da3caedc55 Remove Queue.empty() and Queue.full() in favor of using qsize() or trapping the Empty and Full exceptions. 2008-01-14 21:39:24 +00:00
Raymond Hettinger 1acde190b2 Take Tim's advice and have random.sample() support only sequences and sets. 2008-01-14 01:00:53 +00:00
Raymond Hettinger 28de64fd0f Remove defunct parts of the random module 2008-01-13 23:40:30 +00:00
Christian Heimes 790c823201 Merged revisions 59822-59841 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r59822 | georg.brandl | 2008-01-07 17:43:47 +0100 (Mon, 07 Jan 2008) | 2 lines

  Restore "somenamedtuple" as the "class" for named tuple attrs.
........
  r59824 | georg.brandl | 2008-01-07 18:09:35 +0100 (Mon, 07 Jan 2008) | 2 lines

  Patch #602345 by Neal Norwitz and me: add -B option and PYTHONDONTWRITEBYTECODE envvar to skip writing bytecode.
........
  r59827 | georg.brandl | 2008-01-07 18:25:53 +0100 (Mon, 07 Jan 2008) | 2 lines

  patch #1668: clarify envvar docs; rename THREADDEBUG to PYTHONTHREADDEBUG.
........
  r59830 | georg.brandl | 2008-01-07 19:16:36 +0100 (Mon, 07 Jan 2008) | 2 lines

  Make Python compile with --disable-unicode.
........
  r59831 | georg.brandl | 2008-01-07 19:23:27 +0100 (Mon, 07 Jan 2008) | 2 lines

  Restructure urllib doc structure.
........
  r59833 | georg.brandl | 2008-01-07 19:41:34 +0100 (Mon, 07 Jan 2008) | 2 lines

  Fix #define ordering.
........
  r59834 | georg.brandl | 2008-01-07 19:47:44 +0100 (Mon, 07 Jan 2008) | 2 lines

  #467924, patch by Alan McIntyre: Add ZipFile.extract and ZipFile.extractall.
........
  r59835 | raymond.hettinger | 2008-01-07 19:52:19 +0100 (Mon, 07 Jan 2008) | 1 line

  Fix inconsistent title levels -- it made the whole doc build crash horribly.
........
  r59836 | georg.brandl | 2008-01-07 19:57:03 +0100 (Mon, 07 Jan 2008) | 2 lines

  Fix two further doc build warnings.
........
  r59837 | georg.brandl | 2008-01-07 20:17:10 +0100 (Mon, 07 Jan 2008) | 2 lines

  Clarify metaclass docs and add example.
........
  r59838 | vinay.sajip | 2008-01-07 20:40:10 +0100 (Mon, 07 Jan 2008) | 1 line

  Added section about adding contextual information to log output.
........
  r59839 | christian.heimes | 2008-01-07 20:58:41 +0100 (Mon, 07 Jan 2008) | 1 line

  Fixed indention problem that caused the second TIPC test to run on systems without TIPC
........
  r59840 | raymond.hettinger | 2008-01-07 21:07:38 +0100 (Mon, 07 Jan 2008) | 1 line

  Cleanup named tuple subclassing example.
........
2008-01-07 21:14:23 +00:00
Christian Heimes 3b06e5378a Another patch for #1762972: __file__ points to the py file instead pyo/pyc file 2008-01-07 20:12:44 +00:00
Georg Brandl 52d168a995 Remove traces of Py_USING_UNICODE and Unicode-specific conditionals in configure.
Rename --enable-unicode to --with-wide-unicode; the default is still not wide.
2008-01-07 18:10:24 +00:00
Christian Heimes 043d6f67c7 Copied doc for reload() from trunk's function.rst to imp.rst 2008-01-07 17:19:16 +00:00
Guido van Rossum e239b007e1 Add some missing news. Add some periods. 2008-01-06 00:44:20 +00:00
Guido van Rossum ab078ddb4f Issue #1393: object_richcompare() returns NotImplemented instead of
False if the objects aren't equal, to give the other side a chance.
2008-01-06 00:09:11 +00:00
Kurt B. Kaiser 43b15097cc Interpreter wasn't displaying the location of a SyntaxError
Issue1692
2008-01-05 04:32:22 +00:00
Amaury Forgeot d'Arc bccd63c389 NEWS entry for r59682. 2008-01-04 01:21:27 +00:00
Christian Heimes a3534a6ff5 Issue #1587: Added instancemethod wrapper for PyCFunctions. The Python C API
has gained a new type *PyInstanceMethod_Type* and the functions
*PyInstanceMethod_Check(o)*, *PyInstanceMethod_New(func)* and
*PyInstanceMethod_Function(im)*.
2007-12-11 19:56:40 +00:00
Christian Heimes fc5aa9d0bc Added note about 1585 to Misc/NEWS 2007-12-11 09:00:01 +00:00
Amaury Forgeot d'Arc ad8dcd5f1a Minor cleanup in the gc module.
Removed gc.DEBUG_OBJECT: there is only one kind of objects.
Now gc.DEBUG_COLLECTABLE or gc.DEBUG_UNCOLLECTABLE can be used alone to print the
corresponding list of objects.

Also removed a footnote about version 2.2, and a comment explaining some deleted code.
2007-12-10 23:58:35 +00:00
Christian Heimes 827b35c9fe Issue #1580: New free format floating point representation based on "Floating-Point Printer Sample Code", by Robert G. Burger. For example repr(11./5) now returns '2.2' instead of '2.2000000000000002'.
Thanks to noam for the patch! I had to modify doubledigits.c slightly to support X64 and IA64 machines on Windows. I also added the new file to the three project files.
2007-12-10 22:19:17 +00:00
Christian Heimes 0ec88b33d0 Fixed #1578: Problems in win_getpass 2007-12-10 17:02:00 +00:00
Christian Heimes 0ded5b54bb Fixed issue #1564: The set implementation should special-case PyUnicode instead of PyString
I moved the unicode_eq to stringlib/eq.h to keep the function static and possible inline for setobject.c and dictobject.h. I also removed the unused _PyString_Eq method. If it's required in the future it can be added to eq.h
2007-12-10 15:50:56 +00:00
Christian Heimes bc8734174a Fixed #1573: Improper use of the keyword-only syntax makes the parser crash
>>> def f(*, **kw):
...   pass
...
python: Python/ast.c:652: handle_keywordonly_args: Assertion 'kwonlyargs
!= ((void *)0)' failed.
2007-12-08 22:11:32 +00:00
Guido van Rossum 99533a95bb Get ready for releasing 3.0a2.
(Next: update the whatsnew docs.)
2007-12-06 05:07:41 +00:00
Christian Heimes a37d4c693a Removed PyInt_GetMax and sys.maxint
I replaced sys.maxint with sys.maxsize in Lib/*.py. Does anybody see a problem with the change on Win 64bit platforms? Win 64's long is just 32bit but the sys.maxsize is now 2**63-1 on every 64bit platform.
Also added docs for sys.maxsize.
2007-12-04 23:02:19 +00:00
Christian Heimes f9290773fc Reverting last commit. I had some staled data from an attempted svnmerge in my local sandbox 2007-12-03 19:53:57 +00:00
Christian Heimes e69c320d48 Patch #1537 from Chad Austin
Change GeneratorExit's base class from Exception to BaseException
2007-12-03 19:47:54 +00:00
Christian Heimes f78b1c6573 I've moved the remains of PyInt_ to the longobject.h header file and removed the inclusing of intobject.h from Python.h. Now the intobject.h exists only to provide some aliases for porters from Python 2.x. 2007-12-02 16:52:32 +00:00
Christian Heimes c9543e4233 Removed the new module
Removed a lot of types from the 'types' module that are available through builtins.
2007-11-28 08:28:28 +00:00
Christian Heimes ff737954f3 Removed the API to create unbound methods and simplified the API for bound methods. The signature is PyMethod_New(func, instance).
Also removed im_class and renamed im_self to __self__ and im_func to __func__. im_class can be substituted with method.__self__.__class__.
I've also updated some parts of the documenation.
2007-11-27 10:40:20 +00:00
Christian Heimes bce52be491 Fixed some build issues and updated docs. 2007-11-17 19:08:41 +00:00
Christian Heimes 58cb1b8b0e Fix for #1415 pythonw.exe fails because std streams a missing
After a long discussion about the problem with Windows GUI apps Guido decided that sys.stdin, stdout and stderr should be None when the C runtime library returns invalid file descriptors for the standard streams.

So far the only known cases are Windows GUI apps and scripts started with pythonw on Windows. The OS restrictions are tight enough to catch the problem on other OSes.
2007-11-13 02:19:40 +00:00
Guido van Rossum 98297ee781 Merging the py3k-pep3137 branch back into the py3k branch.
No detailed change log; just check out the change log for the py3k-pep3137
branch.  The most obvious changes:

  - str8 renamed to bytes (PyString at the C level);
  - bytes renamed to buffer (PyBytes at the C level);
  - PyString and PyUnicode are no longer compatible.

I.e. we now have an immutable bytes type and a mutable bytes type.

The behavior of PyString was modified quite a bit, to make it more
bytes-like.  Some changes are still on the to-do list.
2007-11-06 21:34:58 +00:00
Guido van Rossum 2dced8b602 Patch 1329 (partial) by Christian Heimes.
Add a closefd flag to open() which can be set to False to prevent closing
the file descriptor when close() is called or when the object is destroyed.
Useful to ensure that sys.std{in,out,err} keep their file descriptors open
when Python is uninitialized.  (This was always a feature in 2.x, it just
wasn't implemented in 3.0 yet.)
2007-10-30 17:27:30 +00:00
Brett Cannon 37f7e6ebcb Add a missing news entry about how str8's constructor signature now matches the
bytes type.
2007-10-26 05:42:09 +00:00
Guido van Rossum 687b9c0779 Patch 1318 by Christian Heimes: remove os.tmpnam(), os.tempnam(),
and os.tmpfile().
2007-10-25 23:18:51 +00:00
Brett Cannon 4043001f5d Make str/str8 comparisons return True/False for !=/==.
Code that has been returning str8 becomes much more apparent thanks to this
(e.g., struct module returning str8 for all string-related formats or sqlite3
passing in str8 instances when converting objects that had a __conform__
method).  One also has to watch out in C code when making a key from char *
using PyString in the C code but a str instance in Python code as that will not
longer compare equal.

Once str8 gains a constructor like the current bytes type then
test_modulefinder needs a cleanup as the fix is a little messy in that file.

Thanks goes to Thomas Lee for writing the patch for the change giving an
initial run-down of why most of the tests were failing.
2007-10-22 20:24:51 +00:00
Guido van Rossum 40d20bcf1f Issue 1267, continued.
Additional patch by Christian Heimes to deal more cleanly with the
FILE* vs file-descriptor issues.
I cleaned up his code a bit, and moved the lseek() call into import.c.
2007-10-22 00:09:51 +00:00
Brett Cannon e9fd23165c Make _load_testfile() use its encoding argument when __loader__ is defined. 2007-10-12 19:18:19 +00:00
Fred Drake 0e474a801a remove hotshot profiler from Py3k 2007-10-11 18:01:43 +00:00
Guido van Rossum cf1be88b43 Add some miscellanea. 2007-08-30 22:07:17 +00:00
Kurt B. Kaiser 2c7f314eaf Fix a typo and a trailing space.
N.B. NEWS doesn't mention that map() and filter() return iterators.
2007-08-30 21:52:19 +00:00
Guido van Rossum 845702c096 Small updates. 2007-08-30 18:44:53 +00:00
Guido van Rossum 4405cf3c62 Update Misc/NEWS. Add RELNOTES. 2007-08-30 17:16:55 +00:00
Neal Norwitz 30d1c51ac9 Remove _PyObject_Del 2007-08-19 22:48:23 +00:00
Walter Dörwald 41980caf64 Apply SF patch #1775604: This adds three new codecs (utf-32, utf-32-le and
ut-32-be). On narrow builds the codecs combine surrogate pairs in the unicode
object into one codepoint on encoding and create surrogate pairs for
codepoints outside the BMP on decoding. Lone surrogates are passed through
unchanged in all cases.

Backport to the trunk will follow.
2007-08-16 21:55:45 +00:00
Martin v. Löwis 47383403a0 Implement PEP 3131. Add isidentifier to str. 2007-08-15 07:32:56 +00:00
Martin v. Löwis 967f1e3b85 Remove string.{letters,lowercase,uppercase}. 2007-08-14 09:23:10 +00:00
Neal Norwitz 016880229a Kill execfile(), use exec() instead 2007-08-12 00:43:29 +00:00
Neal Norwitz 8dfc4a9bac Remove support for __members__ and __methods__. There still might be
some cleanup to do on this.  Particularly in Python/traceback.c with
getting rid of the getattr if possible and Demo/*metaclasses/Enum.py.
2007-08-11 06:39:53 +00:00