1. 02 May, 2002 2 kayıt (commit)
  2. 01 May, 2002 2 kayıt (commit)
  3. 30 Nis, 2002 7 kayıt (commit)
    • Fred Drake's avatar
    • Anthony Baxter's avatar
      backport theller's patch: · 43eb1d3a
      Anthony Baxter yazdı
      Typo: whcar_t should be wchar_t.
      
      Bugfix candidate? Don't know how this is handled in the docs.
      
      Original patch(es):
      python/dist/src/Doc/api/concrete.tex:1.15
      43eb1d3a
    • Anthony Baxter's avatar
      backport tim_one's patch: · 91193370
      Anthony Baxter yazdı
      Repair widespread misuse of _PyString_Resize.  Since it's clear people
      don't understand how this function works, also beefed up the docs.  The
      most common usage error is of this form (often spread out across gotos):
      
      	if (_PyString_Resize(&s, n) < 0) {
      		Py_DECREF(s);
      		s = NULL;
      		goto outtahere;
      	}
      
      The error is that if _PyString_Resize runs out of memory, it automatically
      decrefs the input string object s (which also deallocates it, since its
      refcount must be 1 upon entry), and sets s to NULL.  So if the "if"
      branch ever triggers, it's an error to call Py_DECREF(s):  s is already
      NULL!  A correct way to write the above is the simpler (and intended)
      
      	if (_PyString_Resize(&s, n) < 0)
      		goto outtahere;
      
      Bugfix candidate.
      
      Original patch(es):
      python/dist/src/Python/bltinmodule.c:2.253
      91193370
    • Anthony Baxter's avatar
      backport tim_one's patch: · 3864a45c
      Anthony Baxter yazdı
      Repair widespread misuse of _PyString_Resize.  Since it's clear people
      don't understand how this function works, also beefed up the docs.  The
      most common usage error is of this form (often spread out across gotos):
      
      	if (_PyString_Resize(&s, n) < 0) {
      		Py_DECREF(s);
      		s = NULL;
      		goto outtahere;
      	}
      
      The error is that if _PyString_Resize runs out of memory, it automatically
      decrefs the input string object s (which also deallocates it, since its
      refcount must be 1 upon entry), and sets s to NULL.  So if the "if"
      branch ever triggers, it's an error to call Py_DECREF(s):  s is already
      NULL!  A correct way to write the above is the simpler (and intended)
      
      	if (_PyString_Resize(&s, n) < 0)
      		goto outtahere;
      
      Bugfix candidate.
      
      Original patch(es):
      python/dist/src/Objects/fileobject.c:2.161
      python/dist/src/Objects/stringobject.c:2.161
      python/dist/src/Objects/unicodeobject.c:2.147
      3864a45c
    • Anthony Baxter's avatar
      backport tim_one's patch: · 07fb92a8
      Anthony Baxter yazdı
      (some tweaking for different _PyObject_GC_Malloc() call in 2.2. checked,
      still returns the same thing on failure...)
      
      _PyObject_GC_New:  Could call PyObject_INIT with a NULL 1st argument.
      _PyObject_GC_NewVar:  Could call PyObject_INIT_VAR likewise.
      
      Bugfix candidate.
      
      Original patch(es):
      python/dist/src/Modules/gcmodule.c:2.40
      07fb92a8
    • Anthony Baxter's avatar
      backport tim_one's patch: · 608ee5a8
      Anthony Baxter yazdı
      Repair widespread misuse of _PyString_Resize.  Since it's clear people
      don't understand how this function works, also beefed up the docs.  The
      most common usage error is of this form (often spread out across gotos):
      
      	if (_PyString_Resize(&s, n) < 0) {
      		Py_DECREF(s);
      		s = NULL;
      		goto outtahere;
      	}
      
      The error is that if _PyString_Resize runs out of memory, it automatically
      decrefs the input string object s (which also deallocates it, since its
      refcount must be 1 upon entry), and sets s to NULL.  So if the "if"
      branch ever triggers, it's an error to call Py_DECREF(s):  s is already
      NULL!  A correct way to write the above is the simpler (and intended)
      
      	if (_PyString_Resize(&s, n) < 0)
      		goto outtahere;
      
      Bugfix candidate.
      
      Original patch(es):
      python/dist/src/Doc/api/concrete.tex:1.13
      608ee5a8
    • Fred Drake's avatar
      Added a missing "|" in the grammar productions used in the reference manual · 026ae2fd
      Fred Drake yazdı
      (reported by François Pinard).
      Added some missing "_" characters in the same cluster of productions.
      Added missing floor division operator in m_expr production, and mention
      floor division in the relevant portion of the text.
      026ae2fd
  4. 26 Nis, 2002 3 kayıt (commit)
  5. 24 Nis, 2002 2 kayıt (commit)
  6. 23 Nis, 2002 3 kayıt (commit)
  7. 22 Nis, 2002 4 kayıt (commit)
    • Walter Dörwald's avatar
      Backport checkin: · aa82bc08
      Walter Dörwald yazdı
      Apply patch diff.txt from SF feature request
      http://www.python.org/sf/444708
      
      This adds the optional argument for str.strip
      to unicode.strip too and makes it possible
      to call str.strip with a unicode argument
      and unicode.strip with a str argument.
      aa82bc08
    • Walter Dörwald's avatar
      Backport the following changes: · 1c097b71
      Walter Dörwald yazdı
      Misc/NEWS 1.387->1.388
      Lib/test/string_tests.py 1.10->1.11, 1.12->1.14,
      Lib/test/test_unicode.py 1.50->1.51, 1.53->1.54, 1.55->1.56
      Lib/test/test_string.py 1.15->1.16
      Lib/string.py 1.61->1.63
      Lib/test/test_userstring.py 1.5->1.6, 1.11, 1.12
      Objects/stringobject.c 2.156->2.159
      Objects/unicodeobject.c 2.137->2.139
      Doc/lib/libstdtypes.tec 1.87->1.88
      
      Add a method zfill to str, unicode and UserString
      and change Lib/string.py accordingly
      (see SF patch http://www.python.org/sf/536241)
      
      This also adds Guido's fix to test_userstring.py
      and the subinstance checks in test_string.py
      and test_unicode.py.
      1c097b71
    • Anthony Baxter's avatar
      backport mhammond's patch: · c3d8fa59
      Anthony Baxter yazdı
      Fix bug 544473 - "Queue module can deadlock".
      Use try/finally to ensure all Queue locks remain stable.
      Includes test case.  Bugfix candidate.
      
      (and branchpatch can now handle adding files :)
      c3d8fa59
    • cvs2svn's avatar
      This commit was manufactured by cvs2svn to create branch · d111f3b9
      cvs2svn yazdı
      'release22-maint'.
      d111f3b9
  8. 20 Nis, 2002 2 kayıt (commit)
  9. 19 Nis, 2002 5 kayıt (commit)
  10. 18 Nis, 2002 10 kayıt (commit)
    • Martin v. Löwis's avatar
    • Anthony Baxter's avatar
      backport gvanrossum's patch: · ea89d8f2
      Anthony Baxter yazdı
      Deprecate % as well.  The message for deprecation of //, % and divmod
      is the same in all three cases (mostly because // calls divmod :-).
      
      Original patches were:
      python/dist/src/Objects/complexobject.c:2.59
      ea89d8f2
    • Anthony Baxter's avatar
      backport gvanrossum's patch: · ee571fa0
      Anthony Baxter yazdı
      Add news about deprecated complex ops.
      
      Original patches were:
      python/dist/src/Misc/NEWS:1.387
      ee571fa0
    • Anthony Baxter's avatar
      backport gvanrossum's patch: · c82143eb
      Anthony Baxter yazdı
      SF bug #543387.
      
      Complex numbers implement divmod() and //, neither of which makes one
      lick of sense.  Unfortunately this is documented, so I'm adding a
      deprecation warning now, so we can delete this silliness, oh, around
      2005 or so.
      
      Bugfix candidate (At least for 2.2.2, I think.)
      
      Original patches were:
      python/dist/src/Objects/complexobject.c:2.58
      c82143eb
    • Anthony Baxter's avatar
      backport fdrake's patch: · 93e81e7c
      Anthony Baxter yazdı
      Document the optional argument to the .strip(), .rstrip(), .strip() string
      methods.
      Part of SF feature #444708.
      
      Original patches were:
      python/dist/src/Doc/lib/libstdtypes.tex:1.87
      93e81e7c
    • Anthony Baxter's avatar
      News for new strip method argument. Made the news message a bit · c11ee1ef
      Anthony Baxter yazdı
      more informative.
      c11ee1ef
    • Anthony Baxter's avatar
      backport gvanrossum's patch: · f908d0a8
      Anthony Baxter yazdı
      Partially implement SF feature request 444708.
      
      Add optional arg to string methods strip(), lstrip(), rstrip().
      The optional arg specifies characters to delete.
      
      Also for UserString.
      
      Still to do:
      
      - Misc/NEWS
      - LaTeX docs (I did the docstrings though)
      - Unicode methods, and Unicode support in the string methods.
      
      Original patches were:
      python/dist/src/Lib/test/string_tests.py:1.12
      f908d0a8
    • Anthony Baxter's avatar
      backport gvanrossum's patch: · 22115b7e
      Anthony Baxter yazdı
      Partially implement SF feature request 444708.
      
      Add optional arg to string methods strip(), lstrip(), rstrip().
      The optional arg specifies characters to delete.
      
      Also for UserString.
      
      Still to do:
      
      - Misc/NEWS
      - LaTeX docs (I did the docstrings though)
      - Unicode methods, and Unicode support in the string methods.
      
      Original patches were:
      python/dist/src/Lib/UserString.py:1.11
      22115b7e
    • Anthony Baxter's avatar
      backport gvanrossum's patch: · 0bc13db8
      Anthony Baxter yazdı
      Partially implement SF feature request 444708.
      
      Add optional arg to string methods strip(), lstrip(), rstrip().
      The optional arg specifies characters to delete.
      
      Also for UserString.
      
      Still to do:
      
      - Misc/NEWS
      - LaTeX docs (I did the docstrings though)
      - Unicode methods, and Unicode support in the string methods.
      
      
      
      
      Original patches were:
      python/dist/src/Objects/stringobject.c:2.156
      0bc13db8
    • Anthony Baxter's avatar
      backport gvanrossum's patch: · a3597faa
      Anthony Baxter yazdı
      SF bug #543318 (Frank J. Tobin).
      
      In DatagramRequestHandler.setup(), the wfile initialization should be
      StringIO.StringIO(), not StringIO.StringIO(slf.packet).
      
      Bugfix candidate (all the way back to Python 1.5.2 :-).
      
      
      Original patches were:
      python/dist/src/Lib/SocketServer.py:1.31
      a3597faa