Benjamin Peterson
7b1668735a
don't use a slot wrapper from a different special method ( closes #14658 )
This also alters the fix to #11603 . Specifically, setting __repr__ to
object.__str__ now raises a recursion RuntimeError when str() or repr() is
called instead of silently bypassing the recursion. I believe this behavior is
more correct.
14 years ago
Mark Dickinson
bcc17eefd2
Issue #14630 : Fix an incorrect access of ob_digit[0] for a zero instance of an int subclass.
14 years ago
Benjamin Peterson
e42fb307ed
SETUP_WITH acts like SETUP_FINALLY for the purposes of setting f_lineno ( closes #14612 )
14 years ago
Benjamin Peterson
f6622c8a3e
fix build without Py_DEBUG and DNDEBUG ( closes #14509 )
14 years ago
Benjamin Peterson
b6af60c2a9
adjust formatting
14 years ago
Benjamin Peterson
3471bb67e7
remove extraneous condition
14 years ago
Benjamin Peterson
ab3c1c1994
be consistent with rest of function
14 years ago
Antoine Pitrou
58bb82e7b4
Issue #13019 : Fix potential reference leaks in bytearray.extend().
Patch by Suman Saha.
14 years ago
Benjamin Peterson
a8755c586e
kill this terribly outdated comment
14 years ago
Antoine Pitrou
0197ff97d0
Issue #14387 : Do not include accu.h from Python.h.
14 years ago
Benjamin Peterson
16d84ac355
check to make sure the attribute is a string ( #14334 )
14 years ago
Benjamin Peterson
52c424343d
allow cycles throught the __dict__ slot to be cleared ( closes #1469629 )
Patch from Armin, test from me.
14 years ago
Antoine Pitrou
e965d97ed1
Issue #13521 : dict.setdefault() now does only one lookup for the given key, making it "atomic" for many purposes.
Patch by Filip Gruszczyński.
14 years ago
Benjamin Peterson
69e9727657
ensure no one tries to hash things before the random seed is found
14 years ago
Georg Brandl
2daf6ae249
Issue #13703 : add a way to randomize the hash values of basic types (str, bytes, datetime)
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
14 years ago
Benjamin Peterson
496c53d83e
use Py_CLEAR
14 years ago
Antoine Pitrou
4b3c7846c9
Fix indentation
14 years ago
Antoine Pitrou
37784ba5c0
Issue #13020 : Fix a reference leak when allocating a structsequence object fails.
Patch by Suman Saha.
14 years ago
Victor Stinner
cbe01342bc
Issue #13913 : normalize utf-8 codec name in UTF-8 decoder
14 years ago
Benjamin Peterson
efe7c9d4d7
this is only a borrowed ref in Brett's branch
14 years ago
Benjamin Peterson
2f9c71bbba
bltinmod is borrowed, so it shouldn't be decrefed
14 years ago
Benjamin Peterson
90b13583bc
put returns on their own lines
14 years ago
Benjamin Peterson
2652d2570e
ready types returned from PyType_FromSpec
14 years ago
Benjamin Peterson
e28108cbd7
adjust declaration
14 years ago
Antoine Pitrou
1334884ff2
Issue #13848 : open() and the FileIO constructor now check for NUL characters in the file name.
Patch by Hynek Schlawack.
14 years ago
Mark Dickinson
261896b559
Issue #13889 : Add missing _Py_SET_53BIT_PRECISION_* calls around uses of dtoa.c functions in float round.
14 years ago
Georg Brandl
beca27a394
Fix #13834 : strip() strips leading and trailing whitespace.
14 years ago
Antoine Pitrou
55f217f22d
Fix refleaks in test_capi
(this was easier than I thought!)
14 years ago
Antoine Pitrou
1c7ade5284
Fix leaking a RuntimeError objects when creating sub-interpreters
14 years ago
Gregory P. Smith
63e6c3222f
Consolidate the occurrances of the prime used as the multiplier when hashing
to a single #define instead of having several copies in several files.
This excludes the Modules/ tree (datetime and expat both have a copy
for their own purposes with no need for it to be the same).
14 years ago
Benjamin Peterson
53aa1d7c57
fix possible if unlikely leak
14 years ago
Georg Brandl
ac0675cc01
Small clarification in docstring of dict.update(): the positional argument is not required.
14 years ago
Victor Stinner
bb2e9c477d
Issue #11231 : Fix bytes and bytearray docstrings
Patch written by Brice Berna.
14 years ago
Antoine Pitrou
2e872082f6
Fix the fix for issue #12149 : it was incorrect, although it had the side
effect of appearing to resolve the issue. Thanks to Mark Shannon for
noticing.
14 years ago
Victor Stinner
ab1d16b456
Issue #13093 : Fix error handling on PyUnicode_EncodeDecimal()
* Add tests for PyUnicode_EncodeDecimal() and PyUnicode_TransformDecimalToASCII()
* Remove the unused "e" variable in replace()
14 years ago
Antoine Pitrou
5418ee0b9a
Issue #13333 : The UTF-7 decoder now accepts lone surrogates
(the encoder already accepts them).
14 years ago
Eli Bendersky
d3baae73be
Issue #13161 : fix doc strings of __i*__ operators
14 years ago
Petri Lehtinen
ebfaabd663
Revert "Accept None as start and stop parameters for list.index() and tuple.index()"
Issue #13340 .
15 years ago
Petri Lehtinen
c2f0a46111
Accept None as start and stop parameters for list.index() and tuple.index()
Closes #13340 .
15 years ago
Benjamin Peterson
2b50a01d11
remove unused variable
15 years ago
Petri Lehtinen
e0aa803714
Fix the return value of set_discard (issue #10519 )
15 years ago
Petri Lehtinen
5acc27ebe4
Avoid unnecessary recursive function calls ( closes #10519 )
15 years ago
Petri Lehtinen
a94200e6ce
Issue #13018 : Fix reference leaks in error paths in dictobject.c.
Patch by Suman Saha.
15 years ago
Nick Coghlan
de31b191e5
Issue 1294232: Fix errors in metaclass calculation affecting some cases of metaclass inheritance. Patch by Daniel Urban.
15 years ago
Benjamin Peterson
9d9141f5db
adjust braces a bit
15 years ago
Antoine Pitrou
551ba20e8e
Issue #13188 : When called without an explicit traceback argument,
generator.throw() now gets the traceback from the passed exception's
`__traceback__` attribute. Patch by Petri Lehtinen.
15 years ago
Benjamin Peterson
2963fe0711
plug possible refleak ( closes #13199 )
15 years ago
Antoine Pitrou
eeb7eea1f9
Issue #12911 : Fix memory consumption when calculating the repr() of huge tuples or lists.
This introduces a small private API for this common pattern.
The issue has been discovered thanks to Martin's huge-mem buildbot.
15 years ago
Mark Dickinson
c0420fd42a
Issue #12973 : Fix undefined-behaviour-inducing overflow check in list_repeat.
15 years ago
Stefan Krah
b77c6c65c0
Issue #12963 : PyLong_AsSize_t() now returns (size_t)-1 in all error cases.
15 years ago