Raymond Hettinger
aad5b02e62
Improve tooltips for splitlines() by showing that the default for keepends is False.
2012-06-02 01:42:58 -04:00
Benjamin Peterson
fe146ea3c7
merge 2.7 release branch
2012-04-09 14:54:09 -04:00
Benjamin Peterson
f51c384a0a
fix build without Py_DEBUG and DNDEBUG ( closes #14509 )
2012-04-09 14:53:07 -04:00
Benjamin Peterson
e8ecc73844
kill this terribly outdated comment
2012-03-25 22:40:54 -04:00
Benjamin Peterson
9d7601fcea
merge 2.6
2012-02-21 11:24:21 -05:00
Benjamin Peterson
26da920001
ensure no one tries to hash things before the random seed is found
2012-02-21 11:08:50 -05:00
Benjamin Peterson
aee9dfba4a
merge 2.6 with hash randomization fix
2012-02-20 21:44:56 -05:00
Barry Warsaw
1e13eb084f
- Issue #13703 : oCERT-2011-003: add -R command-line option and PYTHONHASHSEED
...
environment variable, to provide an opt-in way to protect against denial of
service attacks due to hash collisions within the dict and set types. Patch
by David Malcolm, based on work by Victor Stinner.
2012-02-20 20:42:21 -05:00
Éric Araujo
a4c81b07f8
Fix typo
2012-02-20 02:07:31 +01:00
Victor Stinner
975134e2a2
Issue #13093 : Fix error handling on PyUnicode_EncodeDecimal()
...
Add tests for PyUnicode_EncodeDecimal()
2011-11-22 01:54:19 +01:00
Antoine Pitrou
30402549de
Issue #13333 : The UTF-7 decoder now accepts lone surrogates
...
(the encoder already accepts them).
2011-11-15 01:49:40 +01:00
Ezio Melotti
15d6b65ead
#12266 : Fix str.capitalize() to correctly uppercase/lowercase titlecased and cased non-letter characters.
2011-08-15 09:22:24 +03:00
Senthil Kumaran
5e3a19d806
merge from 3.2 - Fix closes Issue12621 - Fix docstrings of find and rfind methods of bytes/bytearry/unicodeobject.
2011-07-27 23:36:51 +08:00
Ezio Melotti
e3685f6b1b
#6780 : fix starts/endswith error message to mention that tuples are accepted too.
2011-04-26 05:12:51 +03:00
Jesus Cea
44e81687a2
startswith and endswith don't accept None as slice index. Patch by Torsten Becker. ( closes #11828 )
2011-04-20 16:39:15 +02:00
Eric Smith
6c84085cfb
Improved docstrings for str and unicode methods format and __format__.
2010-11-06 19:43:44 +00:00
Georg Brandl
6290bcfc25
Merged revisions 83452,83457,83466,83471,83475,83480,83486 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/release27-maint
................
r83452 | georg.brandl | 2010-08-01 23:06:46 +0200 (So, 01 Aug 2010) | 25 lines
Merged revisions 83226-83227,83229-83230,83232 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83226 | georg.brandl | 2010-07-29 16:17:12 +0200 (Do, 29 Jul 2010) | 1 line
#1090076 : explain the behavior of *vars* in get() better.
........
r83227 | georg.brandl | 2010-07-29 16:23:06 +0200 (Do, 29 Jul 2010) | 1 line
Use Py_CLEAR().
........
r83229 | georg.brandl | 2010-07-29 16:32:22 +0200 (Do, 29 Jul 2010) | 1 line
#9407 : document configparser.Error.
........
r83230 | georg.brandl | 2010-07-29 16:36:11 +0200 (Do, 29 Jul 2010) | 1 line
Use correct directive and name.
........
r83232 | georg.brandl | 2010-07-29 16:49:08 +0200 (Do, 29 Jul 2010) | 1 line
#9388 : remove ERA_YEAR which is never defined in the source code.
........
................
r83457 | georg.brandl | 2010-08-01 23:10:57 +0200 (So, 01 Aug 2010) | 9 lines
Merged revisions 83223 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83223 | georg.brandl | 2010-07-29 15:38:37 +0200 (Do, 29 Jul 2010) | 1 line
#3874 : document HTMLParser.unknown_decl().
........
................
r83466 | georg.brandl | 2010-08-01 23:23:50 +0200 (So, 01 Aug 2010) | 29 lines
Merged revisions 83160-83161,83166,83168-83169,83171 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83160 | georg.brandl | 2010-07-26 10:51:42 +0200 (Mo, 26 Jul 2010) | 1 line
#9381 : fix markup.
........
r83161 | georg.brandl | 2010-07-26 11:33:12 +0200 (Mo, 26 Jul 2010) | 1 line
Add Brian Quinlan.
........
r83166 | georg.brandl | 2010-07-26 17:11:49 +0200 (Mo, 26 Jul 2010) | 1 line
Fix grammar.
........
r83168 | georg.brandl | 2010-07-26 19:00:20 +0200 (Mo, 26 Jul 2010) | 1 line
Fix indentation in example.
........
r83169 | georg.brandl | 2010-07-26 19:09:32 +0200 (Mo, 26 Jul 2010) | 1 line
Add Reid.
........
r83171 | georg.brandl | 2010-07-26 23:12:13 +0200 (Mo, 26 Jul 2010) | 1 line
Clarify.
........
................
r83471 | georg.brandl | 2010-08-01 23:26:45 +0200 (So, 01 Aug 2010) | 9 lines
Merged revisions 83106 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83106 | georg.brandl | 2010-07-23 18:55:26 +0200 (Fr, 23 Jul 2010) | 1 line
Fix some markup glitches.
........
................
r83475 | georg.brandl | 2010-08-01 23:28:47 +0200 (So, 01 Aug 2010) | 9 lines
Merged revisions 82965 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82965 | georg.brandl | 2010-07-19 13:28:05 +0200 (Mo, 19 Jul 2010) | 1 line
Clarification. Yay importlib!
........
................
r83480 | georg.brandl | 2010-08-01 23:33:42 +0200 (So, 01 Aug 2010) | 17 lines
Merged revisions 82871,82960-82961 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82871 | georg.brandl | 2010-07-14 10:00:22 +0200 (Mi, 14 Jul 2010) | 1 line
#9258 : fix copy-paste errors.
........
r82960 | georg.brandl | 2010-07-19 08:52:35 +0200 (Mo, 19 Jul 2010) | 1 line
Clarify.
........
r82961 | georg.brandl | 2010-07-19 08:57:52 +0200 (Mo, 19 Jul 2010) | 1 line
Clarify :option: description.
........
................
r83486 | georg.brandl | 2010-08-01 23:44:38 +0200 (So, 01 Aug 2010) | 13 lines
Merged revisions 82832,82834 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82832 | georg.brandl | 2010-07-12 11:00:29 +0200 (Mo, 12 Jul 2010) | 1 line
Take care of duplicate target name warnings.
........
r82834 | georg.brandl | 2010-07-12 11:06:13 +0200 (Mo, 12 Jul 2010) | 1 line
Use raw string literals for regexes containing backlash.
........
................
2010-08-01 21:48:47 +00:00
Georg Brandl
d070cc5350
Merged revisions 83226-83227,83229-83230,83232 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83226 | georg.brandl | 2010-07-29 16:17:12 +0200 (Do, 29 Jul 2010) | 1 line
#1090076 : explain the behavior of *vars* in get() better.
........
r83227 | georg.brandl | 2010-07-29 16:23:06 +0200 (Do, 29 Jul 2010) | 1 line
Use Py_CLEAR().
........
r83229 | georg.brandl | 2010-07-29 16:32:22 +0200 (Do, 29 Jul 2010) | 1 line
#9407 : document configparser.Error.
........
r83230 | georg.brandl | 2010-07-29 16:36:11 +0200 (Do, 29 Jul 2010) | 1 line
Use correct directive and name.
........
r83232 | georg.brandl | 2010-07-29 16:49:08 +0200 (Do, 29 Jul 2010) | 1 line
#9388 : remove ERA_YEAR which is never defined in the source code.
........
2010-08-01 21:06:46 +00:00
Georg Brandl
e27d044769
Recorded merge of revisions 83444 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83444 | georg.brandl | 2010-08-01 22:51:02 +0200 (So, 01 Aug 2010) | 1 line
Revert r83395, it introduces test failures and is not necessary anyway since we now have to nul-terminate the string anyway.
........
2010-08-01 20:54:30 +00:00
Georg Brandl
09f0d60f7c
Merged revisions 83395 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83395 | georg.brandl | 2010-08-01 10:49:18 +0200 (So, 01 Aug 2010) | 1 line
#8821 : do not rely on Unicode strings being terminated with a \u0000, rather explicitly check range before looking for a second surrogate character.
........
2010-08-01 18:41:59 +00:00
Stefan Krah
ae7dd8fab0
Merged revisions 82980 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/release27-maint
........
r82980 | stefan.krah | 2010-07-19 20:06:46 +0200 (Mon, 19 Jul 2010) | 3 lines
Sub-issue of #9036 : Fix incorrect use of Py_CHARMASK.
........
2010-07-19 18:24:18 +00:00
Stefan Krah
0b9201fa1c
Sub-issue of #9036 : Fix incorrect use of Py_CHARMASK.
2010-07-19 18:06:46 +00:00
Senthil Kumaran
5261b10556
Merged revisions 82573 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82573 | senthil.kumaran | 2010-07-05 17:30:56 +0530 (Mon, 05 Jul 2010) | 3 lines
Fix the docstrings of the capitalize method.
........
2010-07-05 12:04:07 +00:00
Ezio Melotti
86e5e17bda
Merged revisions 81758-81759 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81758 | ezio.melotti | 2010-06-05 20:51:07 +0300 (Sat, 05 Jun 2010) | 15 lines
Update PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629.
1) #8271 : when a byte sequence is invalid, only the start byte and all the
valid continuation bytes are now replaced by U+FFFD, instead of replacing
the number of bytes specified by the start byte.
See http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (pages 94-95);
2) 5- and 6-bytes-long UTF-8 sequences are now considered invalid (no changes
in behavior);
3) Add code and tests to reject surrogates (U+D800-U+DFFF) as defined in
RFC 3629, but leave it commented out since it's not backward compatible;
4) Change the error messages "unexpected code byte" to "invalid start byte"
and "invalid data" to "invalid continuation byte";
5) Add an extensive set of tests in test_unicode;
6) Fix test_codeccallbacks because it was failing after this change.
........
r81759 | ezio.melotti | 2010-06-05 22:21:32 +0300 (Sat, 05 Jun 2010) | 1 line
Add a NEWS entry for r81758 and clarify a comment.
........
2010-07-03 05:34:39 +00:00
Ezio Melotti
6327bf1c6a
Merged revisions 82248 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82248 | ezio.melotti | 2010-06-26 21:44:42 +0300 (Sat, 26 Jun 2010) | 1 line
Fix extra space.
........
2010-06-26 18:47:01 +00:00
Ezio Melotti
2f06b78d61
Fix extra space.
2010-06-26 18:44:42 +00:00
Benjamin Peterson
8e5effaaa4
fix warning with ucs4
2010-06-12 17:47:06 +00:00
Antoine Pitrou
4595e51817
Merged revisions 81907 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81907 | antoine.pitrou | 2010-06-11 23:42:26 +0200 (ven., 11 juin 2010) | 5 lines
Issue #8941 : decoding big endian UTF-32 data in UCS-2 builds could crash
the interpreter with characters outside the Basic Multilingual Plane
(higher than 0x10000).
........
2010-06-11 21:48:02 +00:00
Antoine Pitrou
cca3a3f396
Issue #8941 : decoding big endian UTF-32 data in UCS-2 builds could crash
...
the interpreter with characters outside the Basic Multilingual Plane
(higher than 0x10000).
2010-06-11 21:42:26 +00:00
Ezio Melotti
e57e50c8e7
Update PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629.
...
1) #8271 : when a byte sequence is invalid, only the start byte and all the
valid continuation bytes are now replaced by U+FFFD, instead of replacing
the number of bytes specified by the start byte.
See http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (pages 94-95);
2) 5- and 6-bytes-long UTF-8 sequences are now considered invalid (no changes
in behavior);
3) Add code and tests to reject surrogates (U+D800-U+DFFF) as defined in
RFC 3629, but leave it commented out since it's not backward compatible;
4) Change the error messages "unexpected code byte" to "invalid start byte"
and "invalid data" to "invalid continuation byte";
5) Add an extensive set of tests in test_unicode;
6) Fix test_codeccallbacks because it was failing after this change.
2010-06-05 17:51:07 +00:00
Brett Cannon
a7f13ee3f5
Remove an unneeded variable and assignment.
...
Found using Clang's static analyzer.
2010-05-04 01:16:51 +00:00
Benjamin Peterson
bea424af98
more _PyString_Resize error checking
2010-04-03 00:57:33 +00:00
Florent Xicluna
22b243809e
#7643 : Unicode codepoints VT (0x0B) and FF (0x0C) are linebreaks according to Unicode Standard Annex #14 .
2010-03-30 08:24:06 +00:00
Larry Hastings
402b73fb8d
Backported PyCapsule from 3.1, and converted most uses of
...
CObject to PyCapsule.
2010-03-25 00:54:54 +00:00
Victor Stinner
4fd2ff90a4
Merged revisions 79278,79280 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79278 | victor.stinner | 2010-03-22 13:24:37 +0100 (lun., 22 mars 2010) | 2 lines
Issue #1583863 : An unicode subclass can now override the __str__ method
........
r79280 | victor.stinner | 2010-03-22 13:36:28 +0100 (lun., 22 mars 2010) | 5 lines
Fix the NEWS about my last commit: an unicode subclass can now override the
__unicode__ method (and not the __str__ method).
Simplify also the testcase.
........
2010-03-22 12:56:39 +00:00
Victor Stinner
95affc4449
Issue #1583863 : An unicode subclass can now override the __str__ method
2010-03-22 12:24:37 +00:00
Ezio Melotti
85ddea7e69
Merged revisions 78449 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78449 | ezio.melotti | 2010-02-25 19:36:04 +0200 (Thu, 25 Feb 2010) | 1 line
#7649 : "u'%c' % char" now behaves like "u'%s' % char" and raises a UnicodeDecodeError if 'char' is a byte string that can't be decoded using the default encoding.
........
2010-02-25 17:51:33 +00:00
Ezio Melotti
321251567e
#7649 : "u'%c' % char" now behaves like "u'%s' % char" and raises a UnicodeDecodeError if 'char' is a byte string that can't be decoded using the default encoding.
2010-02-25 17:36:04 +00:00
Victor Stinner
f7270ba58f
Merged revisions 78392 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78392 | victor.stinner | 2010-02-24 00:16:07 +0100 (mer., 24 févr. 2010) | 4 lines
Issue #7649 : Fix u'%c' % char for character in range 0x80..0xFF
=> raise an UnicodeDecodeError. Patch written by Ezio Melotti.
........
2010-02-23 23:20:14 +00:00
Victor Stinner
f20f9c299e
Issue #7649 : Fix u'%c' % char for character in range 0x80..0xFF
...
=> raise an UnicodeDecodeError. Patch written by Ezio Melotti.
2010-02-23 23:16:07 +00:00
Ezio Melotti
dabb5f7db9
Merged revisions 77743 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77743 | ezio.melotti | 2010-01-25 13:24:37 +0200 (Mon, 25 Jan 2010) | 1 line
#7775 : fixed docstring for rpartition
........
2010-01-25 11:46:11 +00:00
Ezio Melotti
1fafaab5e5
#7775 : fixed docstring for rpartition
2010-01-25 11:24:37 +00:00
Antoine Pitrou
10042922d9
Sanitize bloom filter macros
2010-01-13 14:01:26 +00:00
Antoine Pitrou
5c767c2f87
Fix Windows build (re r77461)
2010-01-13 08:55:20 +00:00
Antoine Pitrou
6467213bfd
Issue #7622 : Improve the split(), rsplit(), splitlines() and replace()
...
methods of bytes, bytearray and unicode objects by using a common
implementation based on stringlib's fast search. Patch by Florent Xicluna.
2010-01-13 07:55:48 +00:00
R. David Murray
0a0a1a842c
Issue #1680159 : unicode coercion during an 'in' operation was masking
...
any errors that might occur during coercion of the left operand and
turning them into a TypeError with a message text that was confusing in
the given context. This patch lets any errors through, as was already
done during coercion of the right hand side.
2009-12-14 16:28:26 +00:00
Eric Smith
c4ab8339e9
Issue #3382 : Make '%F' and float.__format__('F') convert results to upper case. Much of the patch came from Mark Dickinson.
2009-11-29 17:40:57 +00:00
Mark Dickinson
9dd5e16c5d
Issue #7117 , continued: Remove substitution of %g-style formatting for
...
%f-style formatting, which used to occur at high precision. Float formatting
should now be consistent between 2.7 and 3.1.
2009-11-23 20:54:09 +00:00
Mark Dickinson
18cfada1ea
Remove restriction on precision when formatting floats. This is the
...
first step towards removing the %f -> %g switch (see issues 7117,
5859).
2009-11-23 18:46:41 +00:00
Georg Brandl
5d2eb34f5c
Merged revisions 75363,75365,75376,75392,75394,75403,75418,75484,75572,75580,75590,75592,75594-75596,75600,75602-75603,75605-75607,75610-75613,75616-75617,75623,75627,75647 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75363 | georg.brandl | 2009-10-11 20:31:23 +0200 (So, 11 Okt 2009) | 1 line
Add the Python FAQ lists to the documentation. Copied from sandbox/faq. Many thanks to AMK for the preparation work.
........
r75365 | georg.brandl | 2009-10-11 22:16:16 +0200 (So, 11 Okt 2009) | 1 line
Fix broken links found by "make linkcheck". scipy.org seems to be done right now, so I could not verify links going there.
........
r75376 | benjamin.peterson | 2009-10-12 03:26:07 +0200 (Mo, 12 Okt 2009) | 1 line
platform we don't care about
........
r75392 | andrew.kuchling | 2009-10-13 18:11:49 +0200 (Di, 13 Okt 2009) | 1 line
Various link, textual, and markup fixes
........
r75394 | georg.brandl | 2009-10-13 20:10:59 +0200 (Di, 13 Okt 2009) | 1 line
Fix markup.
........
r75403 | georg.brandl | 2009-10-14 17:57:46 +0200 (Mi, 14 Okt 2009) | 1 line
#7126 : os.environ changes *do* take effect in subprocesses started with os.system().
........
r75418 | georg.brandl | 2009-10-14 20:48:32 +0200 (Mi, 14 Okt 2009) | 1 line
#7116 : str.join() takes an iterable.
........
r75484 | georg.brandl | 2009-10-18 09:58:12 +0200 (So, 18 Okt 2009) | 1 line
Fix missing word.
........
r75572 | benjamin.peterson | 2009-10-20 23:55:17 +0200 (Di, 20 Okt 2009) | 1 line
clarify buffer arg #7178
........
r75580 | georg.brandl | 2009-10-21 09:15:59 +0200 (Mi, 21 Okt 2009) | 1 line
#7170 : fix explanation about non-weakrefable builtin types.
........
r75590 | benjamin.peterson | 2009-10-22 04:36:47 +0200 (Do, 22 Okt 2009) | 1 line
rewrite to be nice to other implementations
........
r75592 | georg.brandl | 2009-10-22 09:05:48 +0200 (Do, 22 Okt 2009) | 1 line
Fix punctuation.
........
r75594 | georg.brandl | 2009-10-22 09:56:02 +0200 (Do, 22 Okt 2009) | 1 line
Fix markup.
........
r75595 | georg.brandl | 2009-10-22 09:56:56 +0200 (Do, 22 Okt 2009) | 1 line
Fix duplicate target.
........
r75596 | georg.brandl | 2009-10-22 10:05:04 +0200 (Do, 22 Okt 2009) | 1 line
Add a new directive marking up implementation details and start using it.
........
r75600 | georg.brandl | 2009-10-22 13:01:46 +0200 (Do, 22 Okt 2009) | 1 line
Make it more robust.
........
r75602 | georg.brandl | 2009-10-22 13:28:06 +0200 (Do, 22 Okt 2009) | 1 line
Document new directive.
........
r75603 | georg.brandl | 2009-10-22 13:28:23 +0200 (Do, 22 Okt 2009) | 1 line
Allow short form with text as argument.
........
r75605 | georg.brandl | 2009-10-22 13:48:10 +0200 (Do, 22 Okt 2009) | 1 line
Use "impl-detail" directive where applicable.
........
r75606 | georg.brandl | 2009-10-22 17:00:06 +0200 (Do, 22 Okt 2009) | 1 line
#6324 : membership test tries iteration via __iter__.
........
r75607 | georg.brandl | 2009-10-22 17:04:09 +0200 (Do, 22 Okt 2009) | 1 line
#7088 : document new functions in signal as Unix-only.
........
r75610 | georg.brandl | 2009-10-22 17:27:24 +0200 (Do, 22 Okt 2009) | 1 line
Reorder __slots__ fine print and add a clarification.
........
r75611 | georg.brandl | 2009-10-22 17:42:32 +0200 (Do, 22 Okt 2009) | 1 line
#7035 : improve docs of the various <method>_errors() functions, and give them docstrings.
........
r75612 | georg.brandl | 2009-10-22 17:52:15 +0200 (Do, 22 Okt 2009) | 1 line
#7156 : document curses as Unix-only.
........
r75613 | georg.brandl | 2009-10-22 17:54:35 +0200 (Do, 22 Okt 2009) | 1 line
#6977 : getopt does not support optional option arguments.
........
r75616 | georg.brandl | 2009-10-22 18:17:05 +0200 (Do, 22 Okt 2009) | 1 line
Add proper references.
........
r75617 | georg.brandl | 2009-10-22 18:20:55 +0200 (Do, 22 Okt 2009) | 1 line
Make printout margin important.
........
r75623 | georg.brandl | 2009-10-23 10:14:44 +0200 (Fr, 23 Okt 2009) | 1 line
#7188 : fix optionxform() docs.
........
r75627 | fred.drake | 2009-10-23 15:04:51 +0200 (Fr, 23 Okt 2009) | 2 lines
add further note about what's passed to optionxform
........
r75647 | georg.brandl | 2009-10-24 12:04:19 +0200 (Sa, 24 Okt 2009) | 1 line
Fix markup.
........
2009-10-27 15:08:27 +00:00