Mark Dickinson
0169af1534
Merged revisions 87032 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87032 | mark.dickinson | 2010-12-04 12:25:30 +0000 (Sat, 04 Dec 2010) | 3 lines
Issue #10596 : Fix float.__mod__ to have the same behaviour as
float.__divmod__ with respect to signed zeros.
........
2010-12-04 13:04:18 +00:00
Mark Dickinson
33154388f9
Backout broken backport. (Sorry.)
2010-12-04 12:42:18 +00:00
Mark Dickinson
11e77ffcbc
Merged revisions 87032 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87032 | mark.dickinson | 2010-12-04 12:25:30 +0000 (Sat, 04 Dec 2010) | 3 lines
Issue #10596 : Fix float.__mod__ to have the same behaviour as
float.__divmod__ with respect to signed zeros.
........
2010-12-04 12:38:19 +00:00
Mark Dickinson
d2a9b20efa
Issue #10596 : Fix float.__mod__ to have the same behaviour as
...
float.__divmod__ with respect to signed zeros.
2010-12-04 12:25:30 +00:00
Mark Dickinson
66f2623fb2
Remove some unecessary '#ifdef Py_NAN's from floatobject.c
2010-12-04 11:52:58 +00:00
Mark Dickinson
c9fb3c6417
Fix indentation in Objects/longobject.c
2010-12-04 11:06:25 +00:00
Martin v. Löwis
da72231c9f
Regenerate.
2010-12-04 09:12:14 +00:00
Martin v. Löwis
81c9b45905
Add Revision keyword.
2010-12-04 09:11:41 +00:00
Martin v. Löwis
35f08f0f84
Make script 2-vs-3-agnostic.
2010-12-04 09:08:10 +00:00
Alexander Belopolsky
942af5a9a4
Issue #10557 : Fixed error messages from float() and other numeric
...
types. Added a new API function, PyUnicode_TransformDecimalToASCII(),
which transforms non-ASCII decimal digits in a Unicode string to their
ASCII equivalents.
2010-12-04 03:38:46 +00:00
Martin v. Löwis
4d0d471a80
Merge branches/pep-0384.
2010-12-03 20:14:31 +00:00
Victor Stinner
f961377e99
#6780 : fix complex() constructor TypeError message
2010-12-03 16:51:33 +00:00
Nick Coghlan
37ee850b10
Issue 2690: Add support for slicing and negative indices to range objects (includes precalculation and storage of the range length).
...
Refer to the tracker issue for the language moratorium implications of this change
2010-12-03 14:26:13 +00:00
Georg Brandl
3b9406b08a
Remove redundant check for PyBytes in unicode_encode.
2010-12-03 07:54:09 +00:00
Benjamin Peterson
9efdccae25
code style
2010-12-03 01:44:10 +00:00
Daniel Stutzbach
98338227a7
Issue9915: speeding up sorting with a key
2010-12-02 21:55:33 +00:00
Georg Brandl
02524629f3
#7475 : add (un)transform method to bytes/bytearray and str, add back codecs that can be used with them from Python 2.
2010-12-02 18:06:51 +00:00
Antoine Pitrou
715f3cd10d
Issue #8685 : Speed up set difference `a - b` when source set `a` is
...
much larger than operand `b`. Patch by Andrew Bennetts.
2010-11-30 22:23:20 +00:00
Georg Brandl
e5b99f0fb3
Remove redundant includes of headers that are already included by Python.h.
2010-11-30 09:41:01 +00:00
Georg Brandl
71c23d4473
Include structseq.h in Python.h, and remove now-redundant includes in individual sources.
2010-11-30 09:30:54 +00:00
Stefan Krah
5d744a8855
Merged revisions 86791 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86791 | stefan.krah | 2010-11-26 11:54:09 +0100 (Fri, 26 Nov 2010) | 1 line
Indentation cleanup.
........
2010-11-26 11:07:04 +00:00
Stefan Krah
735bb12b01
Indentation cleanup.
2010-11-26 10:54:09 +00:00
Eric Smith
984bb58000
Issue #7094 : Add alternate ('#') flag to __format__ methods for float, complex and Decimal. Allows greater control over when decimal points appear. Added to make transitioning from %-formatting easier. '#g' still has a problem with Decimal which I'll fix soon.
2010-11-25 16:08:06 +00:00
Benjamin Peterson
a1864f3717
pep 7 actually wants the brace on a new line
2010-11-20 23:05:39 +00:00
Benjamin Peterson
155614b104
code style and simplification
2010-11-20 22:44:32 +00:00
Georg Brandl
7e5343b882
Add error handling in range_count.
2010-11-20 22:40:10 +00:00
Benjamin Peterson
0b458d52f9
count() should return integers #10474
2010-11-20 22:35:41 +00:00
Benjamin Peterson
72288d4f3c
code style
2010-11-20 17:21:08 +00:00
R. David Murray
6bb9989ae3
#1574217 : only swallow AttributeErrors in isinstance, not everything.
...
Patch and tests by Brian Harring, with improvements by Ralf Schmitt.
2010-11-20 16:33:30 +00:00
Benjamin Peterson
f609654b0e
handle dict subclasses gracefully in PyArg_ValidateKeywordArguments
2010-11-17 22:33:12 +00:00
Victor Stinner
3e2b7171bf
Issue #10359 : Remove ";" after function definition, invalid in ISO C
2010-11-09 09:32:19 +00:00
Victor Stinner
d5af0a5df0
PyUnicode_DecodeFSDefaultAndSize() raises MemoryError if _Py_char2wchar() fails
2010-11-08 23:34:29 +00:00
Victor Stinner
2f02a51135
PyUnicode_EncodeFS() raises an exception if _Py_wchar2char() fails
...
* Add error_pos optional argument to _Py_wchar2char()
* PyUnicode_EncodeFS() raises a UnicodeEncodeError or MemoryError if
_Py_wchar2char() fails
2010-11-08 22:43:46 +00:00
Victor Stinner
c911bbfd5d
str, bytes, bytearray docstring: remove unnecessary [...]
2010-11-07 19:04:46 +00:00
Victor Stinner
e14e212221
Fix encode/decode method doc of str, bytes, bytearray types
...
* Specify the default encoding: write 'utf-8' instead of
sys.getdefaultencoding(), because the default encoding is now constant
* Specify the default errors value
2010-11-07 18:41:46 +00:00
Eric Smith
16562f41b0
Merged revisions 86277 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86277 | eric.smith | 2010-11-06 15:27:37 -0400 (Sat, 06 Nov 2010) | 1 line
Added more to docstrings for str.format, format_map, and __format__.
........
2010-11-06 19:29:45 +00:00
Eric Smith
51d2fd983b
Added more to docstrings for str.format, format_map, and __format__.
2010-11-06 19:27:37 +00:00
David Malcolm
9696088b6d
Issue #10288 : The deprecated family of "char"-handling macros
...
(ISLOWER()/ISUPPER()/etc) have now been removed: use Py_ISLOWER() etc
instead.
2010-11-05 17:23:41 +00:00
Antoine Pitrou
a277ec4ad9
Followup to r86170: fix reference leak in str.format
2010-11-05 12:23:55 +00:00
Antoine Pitrou
aeb6ceead7
Issue #10293 : Remove obsolete field in the PyMemoryView structure,
...
unused undocumented value PyBUF_SHADOW, and strangely-looking code in
PyMemoryView_GetContiguous.
2010-11-04 20:30:33 +00:00
Eric Smith
27bbca6f79
Issue #6081 : Add str.format_map. str.format_map(mapping) is similar to str.format(**mapping), except mapping does not get converted to a dict.
2010-11-04 17:06:58 +00:00
Benjamin Peterson
83473288a8
deuglify
2010-11-03 23:11:10 +00:00
Raymond Hettinger
7529afce3c
Issue 10221: Improve error message for dict.pop().
2010-10-30 08:14:53 +00:00
Raymond Hettinger
dd4215483f
Issue 10221: Improve error message for dict.pop().
2010-10-30 08:10:29 +00:00
Antoine Pitrou
98e2b45297
Merged revisions 85896 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85896 | antoine.pitrou | 2010-10-29 00:56:58 +0200 (ven., 29 oct. 2010) | 4 lines
Issue #5437 : A preallocated MemoryError instance should not hold traceback
data (including local variables caught in the stack trace) alive infinitely.
........
2010-10-28 23:06:57 +00:00
Antoine Pitrou
07e20ef50b
Issue #5437 : A preallocated MemoryError instance should not hold traceback
...
data (including local variables caught in the stack trace) alive infinitely.
2010-10-28 22:56:58 +00:00
Victor Stinner
ad15872854
Simplify PyUnicode_Encode/DecodeFSDefault on Windows/Mac OS X
...
* Windows always uses mbcs
* Mac OS X always uses utf-8
2010-10-27 00:25:46 +00:00
Georg Brandl
08be72d0aa
Add a new warning gategory, ResourceWarning, as discussed on python-dev. It is silent by default,
...
except when configured --with-pydebug.
Emit this warning from the GC shutdown procedure, rather than just printing to stderr.
2010-10-24 15:11:22 +00:00
Antoine Pitrou
fbb1c6191c
Follow up to #9778 : fix regressions on 64-bit Windows builds
2010-10-23 17:37:54 +00:00
Benjamin Peterson
8035bc5c04
follow up to #9778 : define and use an unsigned hash type
2010-10-23 16:20:50 +00:00
Antoine Pitrou
ff150f2921
Revert r85797 (and r85798): it broke the Windows buildbots because of
...
test_multiprocessing's misbehaviour.
2010-10-22 21:41:05 +00:00
Antoine Pitrou
7eecffd05d
Issue #9935 : Speed up pickling of instances of user-defined classes.
2010-10-22 19:43:59 +00:00
Victor Stinner
f933e1ab6f
Issue #4388 : On Mac OS X, decode command line arguments from UTF-8, instead of
...
the locale encoding. If the LANG (and LC_ALL and LC_CTYPE) environment variable
is not set, the locale encoding is ISO-8859-1, whereas most programs (including
Python) expect UTF-8. Python already uses UTF-8 for the filesystem encoding and
to encode command line arguments on this OS.
2010-10-20 22:58:25 +00:00
Victor Stinner
9a90900da5
PyUnicode_FromFormatV(): Fix %A format
...
It was not completly implemented. Add a test.
2010-10-18 20:59:24 +00:00
Georg Brandl
00da4e0b5a
Remove unneeded casts to hashfunc.
2010-10-18 07:32:48 +00:00
Benjamin Peterson
e7dfeeb889
-1 is reserved for errors
2010-10-17 21:27:01 +00:00
Benjamin Peterson
e6baa46aab
fix prototype
2010-10-17 21:20:58 +00:00
Benjamin Peterson
8f67d0893f
make hashes always the size of pointers; introduce Py_hash_t #9778
2010-10-17 20:54:53 +00:00
Benjamin Peterson
23d05c1d98
use helper hash unimplemented function
2010-10-17 20:13:05 +00:00
Georg Brandl
ded5acf34a
Merged revisions 81936 via svnmerge from
...
svn+ssh://svn.python.org/python/branches/py3k
........
r81936 | mark.dickinson | 2010-06-12 11:10:14 +0200 (Sa, 12 Jun 2010) | 2 lines
Silence 'unused variable' gcc warning. Patch by Éric Araujo.
........
2010-10-17 11:48:07 +00:00
Victor Stinner
168e117e0a
Add an optional size argument to _Py_char2wchar()
...
_Py_char2wchar() callers usually need the result size in characters. Since it's
trivial to compute it in _Py_char2wchar() (O(1) whereas wcslen() is O(n)), add
an option to get it.
2010-10-16 23:16:16 +00:00
Georg Brandl
6c6a4d0249
Remove unused label.
2010-10-15 16:23:54 +00:00
Victor Stinner
f3170ccef8
Use locale encoding if Py_FileSystemDefaultEncoding is not set
...
* PyUnicode_EncodeFSDefault(), PyUnicode_DecodeFSDefaultAndSize() and
PyUnicode_DecodeFSDefault() use the locale encoding instead of UTF-8 if
Py_FileSystemDefaultEncoding is NULL
* redecode_filenames() functions and _Py_code_object_list (issue #9630 )
are no more needed: remove them
2010-10-15 12:04:23 +00:00
Georg Brandl
66c221e993
#9418 : first step of moving private string methods to _string module.
2010-10-14 07:04:07 +00:00
Benjamin Peterson
582162e42b
Merged revisions 85392 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85392 | benjamin.peterson | 2010-10-12 17:57:59 -0500 (Tue, 12 Oct 2010) | 1 line
prefer clearing global objects to obscure module.__dict__ bugs #10068
........
2010-10-12 23:06:22 +00:00
Benjamin Peterson
5c4bfc4af0
prefer clearing global objects to obscure module.__dict__ bugs #10068
2010-10-12 22:57:59 +00:00
Martin v. Löwis
baecd7243a
Upgrade to Unicode 6.0.0.
...
makeunicodedata.py: download all data files from unicode.org,
switch to extracting Unihan data from zip file.
Read linebreakprops and derivednormalizationprops even for
old versions, even though they are not used in delta records.
test:unicode.py: U+11000 is now assigned, use U+14000 instead.
2010-10-11 22:42:28 +00:00
Victor Stinner
beb4135b8c
PyUnicode_AsWideCharString() takes a PyObject*, not a PyUnicodeObject*
...
All unicode functions uses PyObject* except PyUnicode_AsWideChar(). Fix the
prototype for the new function PyUnicode_AsWideCharString().
2010-10-07 01:02:42 +00:00
Benjamin Peterson
866c74e3d6
Merged revisions 85193 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85193 | benjamin.peterson | 2010-10-02 21:13:39 -0500 (Sat, 02 Oct 2010) | 1 line
typo
........
2010-10-03 02:19:18 +00:00
Benjamin Peterson
84060b81e3
typo
2010-10-03 02:13:39 +00:00
Benjamin Peterson
0ad44fa3f7
Merged revisions 85154,85182 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85154 | benjamin.peterson | 2010-10-01 19:03:31 -0500 (Fri, 01 Oct 2010) | 1 line
type.__abstractmethods__ should raise an AttributeError #10006
........
r85182 | benjamin.peterson | 2010-10-02 12:55:47 -0500 (Sat, 02 Oct 2010) | 1 line
add a test and a note about metaclasses now being abcs
........
2010-10-02 18:04:55 +00:00
Victor Stinner
5593d8aeb4
Issue #8670 : PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() replace
...
UTF-16 surrogate pairs by single non-BMP characters for 16 bits Py_UNICODE
and 32 bits wchar_t (eg. Linux in narrow build).
2010-10-02 11:11:27 +00:00
Victor Stinner
1c24bd0252
Issue #8870 : PyUnicode_AsWideCharString() doesn't count the trailing nul character
...
And write unit tests for PyUnicode_AsWideChar() and PyUnicode_AsWideCharString().
2010-10-02 11:03:13 +00:00
Benjamin Peterson
aec5fd1397
type.__abstractmethods__ should raise an AttributeError #10006
2010-10-02 00:03:31 +00:00
Victor Stinner
71e91a358b
Fix PyUnicode_AsWideCharString(): set *size if size is not NULL
2010-09-29 17:55:12 +00:00
Victor Stinner
c39211f51e
Issue #9630 : Redecode filenames when setting the filesystem encoding
...
Redecode the filenames of:
- all modules: __file__ and __path__ attributes
- all code objects: co_filename attribute
- sys.path
- sys.meta_path
- sys.executable
- sys.path_importer_cache (keys)
Keep weak references to all code objects until initfsencoding() is called, to
be able to redecode co_filename attribute of all code objects.
2010-09-29 16:35:47 +00:00
Victor Stinner
137c34c027
Issue #9979 : Create function PyUnicode_AsWideCharString().
2010-09-29 10:25:54 +00:00
Mark Dickinson
a67c70d4a9
Merged revisions 84984 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84984 | mark.dickinson | 2010-09-23 21:11:19 +0100 (Thu, 23 Sep 2010) | 5 lines
Issue #9930 : Remove an unnecessary type check in wrap_binaryfunc_r;
this was causing reversed method calls like float.__radd__(3.0, 1) to
return NotImplemented instead of the expected numeric value.
........
2010-09-23 20:16:03 +00:00
Mark Dickinson
b09a3d69a6
Issue #9930 : Remove an unnecessary type check in wrap_binaryfunc_r;
...
this was causing reversed method calls like float.__radd__(3.0, 1) to
return NotImplemented instead of the expected numeric value.
2010-09-23 20:11:19 +00:00
Daniel Stutzbach
9f0cbf1c72
Issue #9213 : Add index and count methods to range objects, needed to
...
meet the API of the collections.Sequence ABC.
2010-09-13 21:16:29 +00:00
Eric Smith
e4d6317c87
Issue 7994: Make object.__format__() raise a PendingDeprecationWarning
...
if the format string is not empty. Manually merge r79596 and r84772
from 2.x.
Also, apparently test_format() from test_builtin never made it into
3.x. I've added it as well. It tests the basic format()
infrastructure.
2010-09-13 20:48:43 +00:00
Amaury Forgeot d'Arc
feb7307db4
#9210 : remove --with-wctype-functions configure option.
...
The internal unicode database is now always used.
(after 5 years: see
http://mail.python.org/pipermail/python-dev/2004-December/050193.html
)
2010-09-12 22:42:57 +00:00
Benjamin Peterson
d4ac96a336
use return NULL; it's just as correct
2010-09-12 16:40:53 +00:00
Victor Stinner
4c7db315df
Issue #9738 , #9836 : Fix refleak introduced by r84704
2010-09-12 07:51:18 +00:00
Benjamin Peterson
9be0b2e312
detect non-ascii characters much earlier (plugs ref leak)
2010-09-12 03:40:54 +00:00
Benjamin Peterson
42bc69154f
Merged revisions 84717 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84717 | benjamin.peterson | 2010-09-11 11:39:57 -0500 (Sat, 11 Sep 2010) | 1 line
fix formatting
........
2010-09-11 16:40:47 +00:00
Benjamin Peterson
41ece39c21
fix formatting
2010-09-11 16:39:57 +00:00
Benjamin Peterson
8042f4af29
Merged revisions 84714 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84714 | benjamin.peterson | 2010-09-11 11:02:03 -0500 (Sat, 11 Sep 2010) | 1 line
check for NULL tp_as_mapping in PySequence_(Get/Set/Del)Slice #9834
........
2010-09-11 16:03:33 +00:00
Benjamin Peterson
568867a6f2
check for NULL tp_as_mapping in PySequence_(Get/Set/Del)Slice #9834
2010-09-11 16:02:03 +00:00
Victor Stinner
1205f2774e
Issue #9738 : PyUnicode_FromFormat() and PyErr_Format() raise an error on
...
a non-ASCII byte in the format string.
Document also the encoding.
2010-09-11 00:54:47 +00:00
Antoine Pitrou
6e6cc830c4
Issue #9757 : memoryview objects get a release() method to release the
...
underlying buffer (previously this was only done when deallocating the
memoryview), and gain support for the context management protocol.
2010-09-09 12:59:39 +00:00
Senthil Kumaran
f77342076e
Merged revisions 84629 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84629 | senthil.kumaran | 2010-09-08 18:20:29 +0530 (Wed, 08 Sep 2010) | 3 lines
Revert the doc change done in r83880. str.replace with negative count value is not a feature.
........
2010-09-08 13:00:07 +00:00
Senthil Kumaran
9a9dd1c140
Revert the doc change done in r83880. str.replace with negative count value is not a feature.
2010-09-08 12:50:29 +00:00
Victor Stinner
46408606d8
Rename PyUnicode_strdup() to PyUnicode_AsUnicodeCopy()
2010-09-03 16:18:00 +00:00
Georg Brandl
2d444496b3
Reindent.
2010-09-03 10:52:55 +00:00
Raymond Hettinger
faf7b7f4ec
Issue 8420: Fix obscure set crashers.
2010-09-03 10:00:50 +00:00
Daniel Stutzbach
045b3ba184
Issue #9212 : Added the missing isdisjoint method to the dict_keys and
...
dict_items views. The method is required by the collections.Set ABC,
which the views register as supporting.
2010-09-02 15:06:06 +00:00
Daniel Stutzbach
928d4eeee8
Removed an extraneous semicolon
2010-09-02 15:06:03 +00:00
Victor Stinner
71133ff368
Create PyUnicode_strdup() function
2010-09-01 23:43:53 +00:00
Victor Stinner
c4eb765fc1
Create Py_UNICODE_strcat() function
2010-09-01 23:43:50 +00:00
Antoine Pitrou
f43f65b69f
Merged revisions 84408-84409 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84408 | antoine.pitrou | 2010-09-01 23:14:16 +0200 (mer., 01 sept. 2010) | 4 lines
Issue #9737 : Fix a crash when trying to delete a slice or an item from
a memoryview object.
........
r84409 | antoine.pitrou | 2010-09-01 23:14:46 +0200 (mer., 01 sept. 2010) | 3 lines
Fix a compilation warning
........
2010-09-01 21:16:10 +00:00
Antoine Pitrou
c73b909a2b
Fix a compilation warning
2010-09-01 21:14:46 +00:00
Antoine Pitrou
e0793ba992
Issue #9737 : Fix a crash when trying to delete a slice or an item from
...
a memoryview object.
2010-09-01 21:14:16 +00:00
Victor Stinner
42cb462682
Remove unicode_default_encoding constant
...
Inline its value in PyUnicode_GetDefaultEncoding(). The comment is now outdated
(we will not change its value anymore).
2010-09-01 19:39:01 +00:00
Antoine Pitrou
fce7fd6426
Issue #9549 : sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding()
...
are now removed, since their effect was inexistent in 3.x (the default
encoding is hardcoded to utf-8 and cannot be changed).
2010-09-01 18:54:56 +00:00
Antoine Pitrou
a2983c6734
Merged revisions 84394 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84394 | antoine.pitrou | 2010-09-01 17:10:12 +0200 (mer., 01 sept. 2010) | 4 lines
Issue #7415 : PyUnicode_FromEncodedObject() now uses the new buffer API
properly. Patch by Stefan Behnel.
........
2010-09-01 15:16:41 +00:00
Antoine Pitrou
b0fa831d1e
Issue #7415 : PyUnicode_FromEncodedObject() now uses the new buffer API
...
properly. Patch by Stefan Behnel.
2010-09-01 15:10:12 +00:00
Antoine Pitrou
b83df8f1b7
Merged revisions 84391 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84391 | antoine.pitrou | 2010-09-01 14:58:21 +0200 (mer., 01 sept. 2010) | 5 lines
Issue #3101 : Helper functions _add_one_to_C() and _add_one_to_F() become
_Py_add_one_to_C() and _Py_add_one_to_F(), respectively.
........
2010-09-01 13:01:35 +00:00
Antoine Pitrou
f68c2a701b
Issue #3101 : Helper functions _add_one_to_C() and _add_one_to_F() become
...
_Py_add_one_to_C() and _Py_add_one_to_F(), respectively.
2010-09-01 12:58:21 +00:00
Antoine Pitrou
fcd2a7960c
Merged revisions 84344 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84344 | antoine.pitrou | 2010-08-28 20:17:03 +0200 (sam., 28 août 2010) | 4 lines
Issue #1868 : Eliminate subtle timing issues in thread-local objects by
getting rid of the cached copy of thread-local attribute dictionary.
........
2010-08-28 18:27:09 +00:00
Antoine Pitrou
1a9a9d5433
Issue #1868 : Eliminate subtle timing issues in thread-local objects by
...
getting rid of the cached copy of thread-local attribute dictionary.
2010-08-28 18:17:03 +00:00
Benjamin Peterson
039d0a00c8
Merged revisions 84320 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84320 | benjamin.peterson | 2010-08-25 18:13:17 -0500 (Wed, 25 Aug 2010) | 1 line
basicsize and itemsize are Py_ssize_t #9688
........
2010-08-25 23:19:30 +00:00
Benjamin Peterson
0e10206f2c
basicsize and itemsize are Py_ssize_t #9688
2010-08-25 23:13:17 +00:00
Daniel Stutzbach
8515eaefda
Issue 8781: On systems a signed 4-byte wchar_t and a 4-byte Py_UNICODE, use memcpy to convert between the two (as already done when wchar_t is unsigned)
2010-08-24 21:57:33 +00:00
Benjamin Peterson
0538064554
reorder and save a comparison
2010-08-23 19:35:39 +00:00
Victor Stinner
3119ed73aa
Fix PyUnicode_EncodeFSDefault() indentation
2010-08-18 22:26:50 +00:00
Amaury Forgeot d'Arc
324ac65ceb
#5127 : Even on narrow unicode builds, the C functions that access the Unicode
...
Database (Py_UNICODE_TOLOWER, Py_UNICODE_ISDECIMAL, and others) now accept
and return characters from the full Unicode range (Py_UCS4).
The differences from Python code are few:
- unicodedata.numeric(), unicodedata.decimal() and unicodedata.digit()
now return the correct value for large code points
- repr() may consider more characters as printable.
2010-08-18 20:44:58 +00:00
Victor Stinner
6c00c1464f
Issue #9425 : Create PyModule_GetFilenameObject() function
...
... to get the filename as a unicode object, instead of a byte string. Function
needed to support unencodable filenames. Deprecate PyModule_GetFilename() in
favor on the new function.
2010-08-17 23:37:11 +00:00
Antoine Pitrou
f72006f442
Merged revisions 84146-84147,84150 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84146 | antoine.pitrou | 2010-08-17 19:55:07 +0200 (mar., 17 août 2010) | 4 lines
Issue #9612 : The set object is now 64-bit clean under Windows.
........
r84147 | antoine.pitrou | 2010-08-17 20:30:06 +0200 (mar., 17 août 2010) | 3 lines
Fix <deque iterator>.__length_hint__() under 64-bit Windows.
........
r84150 | antoine.pitrou | 2010-08-17 21:33:30 +0200 (mar., 17 août 2010) | 3 lines
Clean some 64-bit issues. Also, always spell "ssize_t" "Py_ssize_t".
........
2010-08-17 19:39:39 +00:00
Antoine Pitrou
671b4d948e
Issue #9612 : The set object is now 64-bit clean under Windows.
2010-08-17 17:55:07 +00:00
Victor Stinner
ef8d95c498
Issue #9425 : Create Py_UNICODE_strncmp() function
...
The code is based on strncmp() of the libiberty library,
function in the public domain.
2010-08-16 22:03:11 +00:00
Alexander Belopolsky
102594f7ff
Merged revisions 84106 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84106 | alexander.belopolsky | 2010-08-16 16:17:07 -0400 (Mon, 16 Aug 2010) | 1 line
Issue #8983 : Corrected docstrings.
........
2010-08-16 20:26:04 +00:00
Alexander Belopolsky
977a684c94
Issue #8983 : Corrected docstrings.
2010-08-16 20:17:07 +00:00
Antoine Pitrou
bc760d9f45
Merged revisions 84070,84074 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84070 | antoine.pitrou | 2010-08-15 19:12:55 +0200 (dim., 15 août 2010) | 5 lines
Fix some compilation warnings under 64-bit Windows (issue #9566 ).
Some of these are genuine bugs with objects bigger than 2GB, but
my system doesn't allow me to write tests for it.
........
r84074 | antoine.pitrou | 2010-08-15 19:41:31 +0200 (dim., 15 août 2010) | 3 lines
Fix (harmless) warning with MSVC.
........
2010-08-15 17:46:50 +00:00
Antoine Pitrou
47019e500c
Fix (harmless) warning with MSVC.
2010-08-15 17:41:31 +00:00
Antoine Pitrou
00d5f35b85
Merged revisions 84072 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84072 | antoine.pitrou | 2010-08-15 19:38:46 +0200 (dim., 15 août 2010) | 3 lines
Fix indentation and remove dead code.
........
2010-08-15 17:40:03 +00:00
Antoine Pitrou
9b491923b8
Fix indentation and remove dead code.
2010-08-15 17:38:46 +00:00
Antoine Pitrou
0010d37a43
Fix some compilation warnings under 64-bit Windows (issue #9566 ).
...
Some of these are genuine bugs with objects bigger than 2GB, but
my system doesn't allow me to write tests for it.
2010-08-15 17:12:55 +00:00
Victor Stinner
47fcb5b4c3
Issue #9542 : Create PyUnicode_FSDecoder() function
...
It's a ParseTuple converter: decode bytes objects to unicode using
PyUnicode_DecodeFSDefaultAndSize(); str objects are output as-is.
* Don't specify surrogateescape error handler in the comments nor the
documentation, but PyUnicode_DecodeFSDefaultAndSize() and
PyUnicode_EncodeFSDefault() because these functions use strict error handler
for the mbcs encoding (on Windows).
* Remove PyUnicode_FSConverter() comment in unicodeobject.c to avoid
inconsistency with unicodeobject.h.
2010-08-13 23:59:58 +00:00
Victor Stinner
4a2b7a1b14
Issue #9425 : Create PyErr_WarnFormat() function
...
Similar to PyErr_WarnEx() but use PyUnicode_FromFormatV() to format the warning
message.
Strip also some trailing spaces.
2010-08-13 14:03:48 +00:00
Victor Stinner
3603cc5fdb
Issue #9425 : PyFile_FromFd() ignores the name argument
...
This function is only by imp.find_module() which does return the filename in a
separated variable.
2010-08-13 13:34:52 +00:00
Alexander Belopolsky
f0f45142d5
Issue #2443 : Added a new macro, Py_VA_COPY, which is equivalent to C99
...
va_copy, but available on all python platforms. Untabified a few
unrelated files.
2010-08-11 17:31:17 +00:00
Mark Dickinson
cf940c701f
Issue #9530 : Fix undefined-behaviour-inducing overflow checks in bytes and bytearray implementations.
2010-08-10 18:35:01 +00:00
Victor Stinner
331ea92ade
Issue #9425 : create Py_UNICODE_strrchr() function
2010-08-10 16:37:20 +00:00
Senthil Kumaran
c3ce882c75
Merged revisions 83882 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83882 | senthil.kumaran | 2010-08-09 14:33:57 +0530 (Mon, 09 Aug 2010) | 3 lines
spelling mistake.
........
2010-08-09 09:06:23 +00:00
Senthil Kumaran
f2de1ffc88
spelling mistake.
2010-08-09 09:03:57 +00:00
Senthil Kumaran
a3aee53776
Merged revisions 83880 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83880 | senthil.kumaran | 2010-08-09 14:26:25 +0530 (Mon, 09 Aug 2010) | 3 lines
Fix Issue5416 - explain negative value for count in bytes object replace.
........
2010-08-09 09:02:18 +00:00
Senthil Kumaran
77210b4fa9
Fix Issue5416 - explain negative value for count in bytes object replace.
2010-08-09 08:56:25 +00:00
Florent Xicluna
eb6f3ead00
Fix #8530 : Prevent stringlib fastsearch from reading beyond the front of an array.
2010-08-08 22:07:16 +00:00
Raymond Hettinger
1b66996281
Fix nit (sentinel on lhs of comparison).
2010-08-07 05:54:08 +00:00
Mark Dickinson
7e3b948cfe
Issue #9530 : Fix a couple of places where undefined behaviour can
...
occur, as a result of signed integer overflow.
2010-08-06 21:33:18 +00:00
Mark Dickinson
e6fc7401a9
In PySlice_IndicesEx, clip the step to [-PY_SSIZE_T_MAX, PY_SSIZE_T_MAX] rather than [PY_SSIZE_T_MIN, PY_SSIZE_T_MAX].
2010-08-06 18:55:26 +00:00
Raymond Hettinger
51ced7afe7
Issue8757: Implicit set-to-frozenset conversion not thread-safe.
2010-08-06 09:57:49 +00:00
Raymond Hettinger
38bf2ccf4c
Issue8757: Implicit set-to-frozenset conversion not thread-safe.
2010-08-06 09:52:17 +00:00
Mark Dickinson
388122d43b
Issue #9337 : Make float.__str__ identical to float.__repr__.
...
(And similarly for complex numbers.)
2010-08-04 20:56:28 +00:00
Georg Brandl
1fa11af7aa
Merged revisions 83226-83227,83229-83232 via svnmerge from
...
svn+ssh://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.
........
r83231 | georg.brandl | 2010-07-29 16:46:07 +0200 (Do, 29 Jul 2010) | 1 line
#9397 : remove mention of dbm.bsd which does not exist anymore.
........
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:03:01 +00:00
Georg Brandl
0f1470960c
Recorded merge of revisions 83444 via svnmerge from
...
svn+ssh://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:22 +00:00
Georg Brandl
78eef3de88
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:51:02 +00:00
Georg Brandl
a70070c9e5
Merged revisions 83395,83417 via svnmerge from
...
svn+ssh://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.
........
r83417 | georg.brandl | 2010-08-01 20:38:26 +0200 (So, 01 Aug 2010) | 1 line
#5776 : fix mistakes in python specfile. (Nobody probably uses it anyway.)
........
2010-08-01 18:59:44 +00:00
Mark Dickinson
fc070313dd
Merged revisions 83400 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83400 | mark.dickinson | 2010-08-01 11:41:49 +0100 (Sun, 01 Aug 2010) | 7 lines
Issue #9416 : Fix some issues with complex formatting where the
output with no type specifier failed to match the str output:
- format(complex(-0.0, 2.0), '-') omitted the real part from the output,
- format(complex(0.0, 2.0), '-') included a sign and parentheses.
........
2010-08-01 10:43:42 +00:00