Raymond Hettinger
67b97b8f8d
Move the initial start-search out of the main loop so it can be factored-out later.
2015-11-01 23:57:37 -05:00
Martin Panter
e56a919100
Issue #25523 : Merge a-to-an corrections from 3.5
2015-11-02 04:27:17 +00:00
Martin Panter
d2ad5718ad
Issue #25523 : Further a-to-an corrections new in 3.5
2015-11-02 04:20:33 +00:00
Raymond Hettinger
db41fd43cf
Removed unused parameter
2015-10-22 22:48:16 -07:00
Raymond Hettinger
0f43bb160e
Only update the state variable once per iteration.
2015-10-20 00:03:33 -07:00
Raymond Hettinger
20151f50f6
Issue #25414 : Remove unnecessary tests that can never succeed.
2015-10-16 22:47:29 -07:00
Raymond Hettinger
1eca237c2f
Remove old Todo entry that isn't going to happen.
2015-10-15 23:25:53 -07:00
Raymond Hettinger
a4b13d0020
Rewrap comment.
2015-10-15 08:05:31 -07:00
Raymond Hettinger
bc00341105
Use unsigned division
2015-10-14 23:33:23 -07:00
Raymond Hettinger
1286d14500
Improve variable names and constant expressions
2015-10-14 23:16:57 -07:00
Raymond Hettinger
965362e92d
Minor fixup. maxlen is already known.
2015-10-11 22:52:54 -07:00
Raymond Hettinger
d96db09b57
Refactor the deque trim logic to eliminate the two separate trim functions.
2015-10-11 22:34:48 -07:00
Raymond Hettinger
6b1e113f9f
Hoist the deque->maxlen lookup out of the inner-loop.
2015-10-11 09:43:50 -07:00
Raymond Hettinger
a7f63009d6
Minor tweak. Make the maxlen comparisons a little more clear and consistent.
2015-10-10 23:56:02 -04:00
Raymond Hettinger
848f2b595d
Backport early-out 91259f061cfb to reduce the cost of bb1a2944bcb6
2015-10-06 23:06:17 -04:00
Raymond Hettinger
0443ac2860
Eliminate unnecessary test
2015-10-05 22:52:37 -04:00
Raymond Hettinger
fd265f4a18
Factor out common iterator finalization code
2015-10-02 23:17:33 -07:00
Raymond Hettinger
0d30940dd2
Add fast paths to deque_init() for the common cases
2015-09-30 23:15:02 -07:00
Raymond Hettinger
38031143fb
Add an early-out for deque_clear()
2015-09-29 22:45:05 -07:00
Raymond Hettinger
8299e9b59e
Move the copy and clear functions upwards to eliminate unnecessary forward references.
2015-09-26 21:31:23 -07:00
Raymond Hettinger
7c0b70f419
Minor tweak to the order of variable updates.
2015-09-26 21:11:05 -07:00
Raymond Hettinger
f2b02ced7e
Bump up the maximum number of freeblocks
2015-09-26 17:47:02 -07:00
Raymond Hettinger
c22eee6b59
Precomputing the number iterations allows the inner-loop to be vectorizable.
2015-09-26 02:14:50 -07:00
Raymond Hettinger
7a84552c84
Hoist constant expression out of an inner loop.
2015-09-26 01:30:51 -07:00
Raymond Hettinger
e055b88937
merge
2015-09-26 00:15:46 -07:00
Raymond Hettinger
bf49fee125
Issue #25135 : Avoid possible reentrancy issues in deque_clear.
2015-09-26 00:14:59 -07:00
Raymond Hettinger
2b0d646b75
Replace an unpredictable branch with a simple addition.
2015-09-23 19:15:44 -07:00
Raymond Hettinger
3a1a8d0424
Eliminate unnecessary variables
2015-09-23 02:42:02 -07:00
Raymond Hettinger
7a237230d1
Eliminate unnecessary variable
2015-09-22 01:20:36 -07:00
Raymond Hettinger
d3d2b2c50c
Minor consistency improvements to negative value comparisons.
2015-09-21 23:41:56 -07:00
Raymond Hettinger
aed8830af3
Add a fast path (no iterator creation) for a common case for repeating deques of size 1
2015-09-19 09:05:42 -07:00
Raymond Hettinger
0e14e6610b
Hoist constant expression out of an inner loop
2015-09-19 00:21:33 -06:00
Raymond Hettinger
ad26225e1a
Tighten inner-loop for deque_inplace_repeat().
2015-09-14 01:03:04 -04:00
Raymond Hettinger
e4f3467df1
Add an exact type match fast path for deque_copy().
2015-09-13 19:27:01 -04:00
Raymond Hettinger
95e2cc5d12
Fix refcount.
2015-09-13 02:41:18 -04:00
Raymond Hettinger
67c78b5421
In-line the append operations inside deque_inplace_repeat().
2015-09-12 11:00:20 -04:00
Raymond Hettinger
f5d72f35e8
Simply deque repeat by reusing code in in-line repeat. Avoid unnecessary division.
2015-09-09 22:39:44 -04:00
Raymond Hettinger
318c5aef0e
merge
2015-09-05 17:06:18 -07:00
Raymond Hettinger
2b2b75374e
Prevent reentrant badness by deferring the decrefs as long as possible.
2015-09-05 17:05:52 -07:00
Raymond Hettinger
7a1a0bbbf1
merge
2015-08-26 08:09:50 -07:00
Raymond Hettinger
87674ec7d5
Issue #24913 : Fix overrun error in deque.index().
2015-08-26 08:08:38 -07:00
Raymond Hettinger
28c995d03b
Minor cleanup.
2015-08-14 02:07:41 -07:00
Raymond Hettinger
12f896c521
Fix minor typo in a comment
2015-07-31 12:03:20 -07:00
Raymond Hettinger
aa23fa2e21
merge
2015-07-20 03:11:16 -04:00
Raymond Hettinger
043e800860
merge
2015-07-20 03:10:48 -04:00
Raymond Hettinger
239aba7874
Issue #19663 : Improve error message for defaultdict.
2015-07-20 03:09:22 -04:00
Raymond Hettinger
cfe5b6ca04
Divisions-by-two for a positive Py_ssize_t compile more cleanly with >>1 than /2.
2015-07-20 00:25:50 -04:00
Eric Snow
96c6af9b20
Issue #16991 : Add a C implementation of collections.OrderedDict.
2015-05-29 22:21:39 -06:00
Eric Snow
47db71756d
Issue #16991 : Add a C implementation of collections.OrderedDict.
2015-05-29 22:21:39 -06:00
Raymond Hettinger
c6249a6268
Defer deleted item decref until after the deque is restored to a consistent state.
2015-05-02 10:44:17 -07:00
Benjamin Peterson
1a6292194b
fix refleak in deque_concat
2015-04-04 10:52:36 -04:00
Raymond Hettinger
41290a68ba
Issue 23793: Add deque support for __add__(), __mul__(), and __imul__().
2015-03-31 08:12:23 -07:00
Raymond Hettinger
fef9c1b368
Fix typo
2015-03-24 21:12:57 -07:00
Raymond Hettinger
8dbbae2e52
Minor code and comment cleanups.
2015-03-24 21:01:50 -07:00
Raymond Hettinger
551350a79f
Improve and fix-up comments.
2015-03-24 00:19:53 -07:00
Raymond Hettinger
0f1451c8c0
Issue 23744: Minor speed-up for deque.__bool__().
2015-03-23 23:23:55 -07:00
Raymond Hettinger
6921c13bbb
Minor nit. Make the rotate() success/fail tests consistent.
2015-03-21 02:03:40 -07:00
Raymond Hettinger
ac13ad6a32
For safety, wait to decref deleted values until the deque state has been restored.
2015-03-21 01:53:16 -07:00
Raymond Hettinger
0f6f94778a
Fix minor formatting nits and remove unnecessary comment.
2015-03-21 01:42:10 -07:00
Raymond Hettinger
32ea16577d
Issue 23704: Add index(), copy(), and insert() to deques. Register deques as a MutableSequence.
2015-03-21 01:37:37 -07:00
Raymond Hettinger
39dadf7abf
Issue 23705: Improve the performance of __contains__ checks for deques.
2015-03-20 16:38:56 -07:00
Raymond Hettinger
87e691240b
Minor neatening-up. Make assignments in same order a struct fields. Line-up comments.
2015-03-02 23:32:02 -08:00
Raymond Hettinger
f9d9c79aa8
Switch the state variable to unsigned for defined wrap-around behavior.
2015-03-02 22:47:46 -08:00
Raymond Hettinger
30c9074b96
Minor beautification. Move struct definitions to the top. Fix-up a comment.
2015-03-02 22:31:35 -08:00
Raymond Hettinger
f30f5b9ba6
Minor code beautification. Replace macro with in-lineable functions.
2015-03-02 22:23:37 -08:00
Raymond Hettinger
3c186ba441
Beautify and better document the use of the size_t cast for bounds checking.
2015-03-02 21:45:02 -08:00
Raymond Hettinger
7f9ea7543e
Issue #23553 : Use an unsigned cast to tighten-up the bounds checking logic.
2015-03-01 00:38:00 -08:00
Raymond Hettinger
c20830804d
Need a (size_t) cast instead of (unsigned) to be big enough for a Py_ssize_t.
2015-02-28 23:29:16 -08:00
Raymond Hettinger
a473b9da15
Use unsigned division and modulo for item assignment as well.
2015-02-28 17:49:47 -08:00
Raymond Hettinger
63d1ff2a0b
Convert one more division to unsigned arithmetic to speed-up deque_item().
2015-02-28 07:41:30 -08:00
Raymond Hettinger
7e8c7956a7
Line missed in last checkin
2015-02-27 16:59:29 -08:00
Raymond Hettinger
da2850f932
Since the index is always non-negative, use faster unsigned division and modulo.
2015-02-27 12:42:54 -08:00
Raymond Hettinger
daf57f25e5
Bump the blocksize up from 62 to 64 to speed up the modulo calculation.
...
Remove the old comment suggesting that it was desireable to have
blocksize+2 as a multiple of the cache line length. That would
have made sense only if the block structure start point was always
aligned to a cache line boundary. However, the memory allocations
are 16 byte aligned, so we don't really have control over whether
the struct spills across cache line boundaries.
2015-02-26 23:21:29 -08:00
Raymond Hettinger
eb6b554fbc
Update copyright.
2015-02-10 22:37:22 -06:00
Raymond Hettinger
0e259f18f7
Optimization guides suggest copying memory in an ascending direction when possible.
2015-02-01 22:53:41 -08:00
Raymond Hettinger
507d997714
Add comment and make minor code clean-up to improve clarity.
2014-05-18 21:32:40 +01:00
Raymond Hettinger
4b0b1accb5
Issue #21101 : Eliminate double hashing in the C code for collections.Counter().
2014-05-03 16:41:19 -07:00
Raymond Hettinger
5402315626
Add implementation notes
2014-04-23 00:58:48 -07:00
Benjamin Peterson
e19d9d1467
merge 3.3 ( #20250 )
2014-01-13 23:56:30 -05:00
Benjamin Peterson
9cb33b7d03
correct defaultdict signature in docstring ( closes #20250 )
...
Patch from Andrew Barnert.
2014-01-13 23:56:05 -05:00
Victor Stinner
e7f516cbb8
Issue #19512 : _count_elements() of _collections reuses PyId_get identifier
...
instead of literal "get" string
2013-11-06 23:52:55 +01:00
Raymond Hettinger
07573d7b24
merge
2013-10-04 16:52:39 -07:00
Raymond Hettinger
cb1d96f782
Issue #18594 : Make the C code more closely match the pure python code.
2013-10-04 16:51:02 -07:00
Raymond Hettinger
75f65e368e
merge
2013-10-01 21:38:37 -07:00
Raymond Hettinger
224c87d60c
Issue #18594 : Fix the fallback path in collections.Counter().
2013-10-01 21:36:09 -07:00
Raymond Hettinger
c13516b0a0
merge
2013-10-01 01:00:59 -07:00
Raymond Hettinger
2ff2190b62
Issue #18594 : Fix the fast path for collections.Counter().
...
The path wasn't being taken due to an over-restrictive type check.
2013-10-01 00:55:43 -07:00
Raymond Hettinger
77578204d6
Restore the data block size to 62.
...
The former block size traded away good fit within cache lines in
order to gain faster division in deque_item(). However, compilers
are getting smarter and can now replace the slow division operation
with a fast integer multiply and right shift. Accordingly, it makes
sense to go back to a size that lets blocks neatly fill entire
cache-lines.
GCC-4.8 and CLANG 4.0 both compute "x // 62" with something
roughly equivalent to "x * 9520900167075897609 >> 69".
2013-07-28 02:39:49 -07:00
Raymond Hettinger
3223dd5c22
Assertions key off NDEBUG
2013-07-26 23:14:22 -07:00
Raymond Hettinger
b97cc49c3a
Minor code simplification by eliminating an unnecessary temporary variable.
2013-07-21 01:51:07 -07:00
Raymond Hettinger
90dea4ce43
Tweak the deque struct by moving the least used fields (maxlen and weakref) to the end.
2013-07-13 22:30:25 -07:00
Raymond Hettinger
840533bf1c
Use a do-while loop in the inner loop for rotate (m is always greater than zero).
2013-07-13 17:03:58 -07:00
Raymond Hettinger
3959af9b2a
Move the freeblock() call outside the main loop to speed-up and simplify the block re-use logic.
2013-07-13 02:34:08 -07:00
Raymond Hettinger
d9c116ca40
Add a spacing saving heuristic to deque's extend methods
2013-07-09 00:13:21 -07:00
Raymond Hettinger
b385529ddf
Fix #ifdef
2013-07-07 02:07:23 -10:00
Raymond Hettinger
82df925451
Use macros for marking and checking endpoints in the doubly-linked list of blocks.
...
* Add comment explaining the endpoint checks
* Only do the checks in a debug build
* Simplify newblock() to only require a length argument
and leave the link updates to the calling code.
* Also add comment for the freelisting logic.
2013-07-07 01:43:42 -10:00
Raymond Hettinger
f3a67b7e57
Improve variable names in deque_count()
2013-07-06 17:49:06 -10:00
Raymond Hettinger
df715ba54d
Apply the PyObject_VAR_HEAD and Py_SIZE macros
...
to be consistent with practices in other modules.
2013-07-06 13:01:13 -10:00
Raymond Hettinger
5bfa8671bc
Refactor deque_traverse().
...
Hoist conditional expression out of the loop.
Use rightblock as the guard instead of checking for NULL.
2013-07-06 11:58:09 -10:00
Raymond Hettinger
98054b4c1b
Remove unnecessary branches from count() and reverse().
2013-07-06 09:07:06 -10:00
Raymond Hettinger
de68e0cf0e
Speed-up deque indexing by changing the deque block length to a power of two.
...
The division and modulo calculation in deque_item() can be compiled
to fast bitwise operations when the BLOCKLEN is a power of two.
Timing before:
~/cpython $ py -m timeit -r7 -s 'from collections import deque' -s 'd=deque(range(10))' 'd[5]'
10000000 loops, best of 7: 0.0627 usec per loop
Timing after:
~/cpython $ py -m timeit -r7 -s 'from collections import deque' -s 'd=deque(range(10))' 'd[5]'
10000000 loops, best of 7: 0.0581 usec per loop
2013-07-05 18:05:29 -10:00
Raymond Hettinger
20b0f87e1d
Misc improvements to collections.deque()
...
* Clarified comment on the impact of BLOCKLEN on deque_index
(with a power-of-two, the division and modulo
computations are done with a right-shift and bitwise-and).
* Clarified comment on the overflow check to note that
it is general and not just applicable the 64-bit builds.
* In deque._rotate(), the "deque->" indirections are
factored-out of the loop (loop invariant code motion),
leaving the code cleaner looking and slightly faster.
* In deque._rotate(), replaced the memcpy() with an
equivalent loop. That saved the memcpy setup time
and allowed the pointers to move in their natural
leftward and rightward directions.
See comparative timings at: http://pastebin.com/p0RJnT5N
2013-06-23 15:44:33 -07:00
Raymond Hettinger
986bbfc079
Backport deque.rotate() improvements.
2013-02-09 20:00:55 -05:00
Raymond Hettinger
59cf23ab07
Minor tweaks to varnames, declarations, and comments.
2013-02-07 00:57:19 -05:00
Raymond Hettinger
1f0044c473
Minor variable access clean-ups for deque.rotate().
2013-02-05 01:30:46 -05:00
Raymond Hettinger
a4409c18eb
Minor edits: Tighten-up the halflen logic and touch-up the assertions and comments.
2013-02-04 00:08:12 -05:00
Raymond Hettinger
3a9ae7fd98
Issue 16398: One more assertion for good measure.
2013-02-02 12:26:37 -08:00
Raymond Hettinger
231ee4dc9d
Issue 16398: Add assertions to show why memcmp is safe.
2013-02-02 11:24:43 -08:00
Raymond Hettinger
21777acd68
Issue 16398: Use memcpy() in deque.rotate().
2013-02-02 09:56:08 -08:00
Benjamin Peterson
fa3965ab76
merge 3.3
2013-01-12 21:22:33 -05:00
Benjamin Peterson
0e5c48a917
make deque_clear void, since it's infallible
2013-01-12 21:22:18 -05:00
Raymond Hettinger
464d89b3ce
Issue #16398 : Optimize deque.rotate()
2013-01-11 22:29:50 -08:00
Andrew Svetlov
796c443f3d
Merge: fix docstring for deque ctor to mark iterable parameter optional
2012-10-31 11:51:13 +02:00
Andrew Svetlov
6a5c7c341a
Fix docstring for deque ctor to mark iterable parameter optional
2012-10-31 11:50:40 +02:00
Jesus Cea
1659b75189
MERGE: Closes #15469 : Correct __sizeof__ support for deque
2012-08-03 14:52:12 +02:00
Jesus Cea
16e2fca47e
Closes #15469 : Correct __sizeof__ support for deque
2012-08-03 14:49:42 +02:00
Kristján Valur Jónsson
31668b8f7a
Issue #14288 : Serialization support for builtin iterators.
2012-04-03 10:49:41 +00:00
Antoine Pitrou
15af7b4a4f
Issue #13015 : Fix a possible reference leak in defaultdict.__repr__.
...
Patch by Suman Saha.
2012-02-15 02:43:47 +01:00
Antoine Pitrou
f5f1fe0cb5
Issue #13015 : Fix a possible reference leak in defaultdict.__repr__.
...
Patch by Suman Saha.
2012-02-15 02:42:46 +01:00
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
2011-10-14 10:20:37 +02:00
Martin v. Löwis
1ee1b6fe0d
Use identifier API for PyObject_GetAttrString.
2011-10-10 18:11:30 +02:00
Martin v. Löwis
afe55bba33
Add API for static strings, primarily good for identifiers.
...
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
2011-10-09 10:38:36 +02:00
Brian Curtin
dfc80e3d97
Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
...
The macro was introduced in #12724 .
2011-08-10 20:28:54 -05:00
Victor Stinner
a154b5cea4
Simplify _count_elements() in _collections
...
PyIter_Next() cannot return a PyExc_StopIteration: it clears this exception.
2011-04-20 23:23:52 +02:00
Raymond Hettinger
4974705a02
Issue 11713: clarify docstring for collections.deque()
2011-03-29 17:36:31 -07:00
Raymond Hettinger
512d2cc643
Issue #11004 : Repair edge case in deque.count().
...
(Reviewed by Georg Brandl.)
Also made similar changes to deque.reverse() though this wasn't
strictly necessary (the edge case cannot occur with two pointers
moving to meet in the middle). Making the change in reverse()
was more a matter of future-proofing.
2011-01-25 21:32:39 +00:00
Raymond Hettinger
426e052a4f
Make C helper function more closely match the pure python version, and add tests.
2011-01-03 02:12:02 +00:00
Raymond Hettinger
96f3410ebe
Issue 10667: Fast path for collections.Counter
2010-12-15 16:30:37 +00:00
Georg Brandl
f038b32d0b
Remove more unneeded casts to hashfunc.
2010-10-18 07:35:09 +00:00
Antoine Pitrou
554f33407c
Fix <deque iterator>.__length_hint__() under 64-bit Windows.
2010-08-17 18:30:06 +00:00
Antoine Pitrou
f95a1b3c53
Recorded merge of revisions 81029 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
2010-05-09 15:52:27 +00:00
Raymond Hettinger
44459debc6
Add count() method to collections.deque().
2010-04-03 23:20:46 +00:00
Raymond Hettinger
3f9afd816d
Fix variants of deque.extend: d.extend(d) d+=d d.extendleft(d)
2009-12-10 03:03:02 +00:00
Raymond Hettinger
e5fdedbeda
Add a reverse() method to collections.deque().
2009-12-10 00:47:21 +00:00
Raymond Hettinger
54628fa7c0
Issue 6637: defaultdict.copy() failed with an empty factory.
2009-08-04 19:16:39 +00:00
Raymond Hettinger
5bb0f0e072
For collections.deque() objects, expose the maxlen parameter as a read-only attribute.
2009-03-10 12:56:32 +00:00
Raymond Hettinger
060c7f6bba
Small optimization for corner case where maxlen==0.
2009-03-10 09:36:07 +00:00
Mark Dickinson
e94c679df0
Issue #1717 : rename tp_compare to tp_reserved. I'll change the
...
type of tp_compare in a separate commit, for ease of reversion
should things go wrong.
2009-02-02 20:36:42 +00:00
Georg Brandl
b1441c7e47
Merged revisions 68112,68115,68120,68133,68141-68142,68145-68146,68148-68149 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68112 | benjamin.peterson | 2009-01-01 00:48:39 +0100 (Thu, 01 Jan 2009) | 1 line
#4795 inspect.isgeneratorfunction() should return False instead of None
........
r68115 | benjamin.peterson | 2009-01-01 05:04:41 +0100 (Thu, 01 Jan 2009) | 1 line
simplfy code
........
r68120 | georg.brandl | 2009-01-01 13:15:31 +0100 (Thu, 01 Jan 2009) | 4 lines
#4228 : Pack negative values the same way as 2.4
in struct's L format.
........
r68133 | antoine.pitrou | 2009-01-01 16:38:03 +0100 (Thu, 01 Jan 2009) | 1 line
fill in actual issue number in tests
........
r68141 | benjamin.peterson | 2009-01-01 17:43:12 +0100 (Thu, 01 Jan 2009) | 1 line
fix highlighting
........
r68142 | benjamin.peterson | 2009-01-01 18:29:49 +0100 (Thu, 01 Jan 2009) | 2 lines
welcome to 2009, Python!
........
r68145 | amaury.forgeotdarc | 2009-01-02 01:03:54 +0100 (Fri, 02 Jan 2009) | 5 lines
#4801 _collections module fails to build on cygwin.
_PyObject_GC_TRACK is the macro version of PyObject_GC_Track,
and according to documentation it should not be used for extension modules.
........
r68146 | ronald.oussoren | 2009-01-02 11:44:46 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue4472: "configure --enable-shared doesn't work on OSX"
........
r68148 | ronald.oussoren | 2009-01-02 11:48:31 +0100 (Fri, 02 Jan 2009) | 2 lines
Forgot to add a NEWS item in my previous checkin
........
r68149 | ronald.oussoren | 2009-01-02 11:50:48 +0100 (Fri, 02 Jan 2009) | 2 lines
Fix for issue4780
........
2009-01-03 22:33:39 +00:00
Antoine Pitrou
7ddda7830c
Merged revisions 68128 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r68128 | antoine.pitrou | 2009-01-01 15:11:22 +0100 (jeu., 01 janv. 2009) | 3 lines
Issue #3680 : Reference cycles created through a dict, set or deque iterator did not get collected.
........
2009-01-01 15:35:33 +00:00
Amaury Forgeot d'Arc
f43ee81ef2
#4170 : Fix segfault when pickling a defauldict object.
...
The 2.x dict.iteritems() returns an iterator,
whereas the 3.0 dict.items() returns a "view",
which is iterable, but not an iterator with its __next__ method.
Patch by Hirokazu Yamamoto.
2008-10-30 20:58:42 +00:00
Amaury Forgeot d'Arc
245c70b12c
Merged revisions 66377 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r66377 | amaury.forgeotdarc | 2008-09-11 00:04:45 +0200 (jeu., 11 sept. 2008) | 8 lines
#3743 : PY_FORMAT_SIZE_T is designed for the OS "printf" functions, not for
PyString_FromFormat which has an independent implementation, and uses "%zd".
This makes a difference on win64, where printf needs "%Id" to display
64bit values. For example, queue.__repr__ was incorrect.
Reviewed by Martin von Loewis.
........
2008-09-10 22:24:24 +00:00
Benjamin Peterson
a786b026c9
Merged revisions 65910,65977,65980,65984,65986,66000,66011-66012,66014,66017,66020 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r65910 | benjamin.peterson | 2008-08-20 09:07:59 -0500 (Wed, 20 Aug 2008) | 1 line
fix up the multiprocessing docs a little
........
r65977 | christian.heimes | 2008-08-22 14:47:25 -0500 (Fri, 22 Aug 2008) | 3 lines
Silenced compiler warning
Objects/stringlib/find.h:97: warning: 'stringlib_contains_obj' defined but not used
Reviewed by Benjamin Peterson
........
r65980 | christian.heimes | 2008-08-22 15:10:27 -0500 (Fri, 22 Aug 2008) | 3 lines
Fixed two format strings in the _collections module. For example
Modules/_collectionsmodule.c:674: warning: format '%i' expects type 'int', but argument 2 has type 'Py_ssize_t'
Reviewed by Benjamin Peterson
........
r65984 | christian.heimes | 2008-08-22 16:23:47 -0500 (Fri, 22 Aug 2008) | 1 line
d is the correct format string
........
r65986 | mark.hammond | 2008-08-22 19:59:14 -0500 (Fri, 22 Aug 2008) | 2 lines
Fix bug 3625: test issues on 64bit windows. r=pitrou
........
r66000 | benjamin.peterson | 2008-08-23 15:27:43 -0500 (Sat, 23 Aug 2008) | 5 lines
#3643 add a few more checks to _testcapi to prevent segfaults
Author: Victor Stinner
Reviewer: Benjamin Peterson
........
r66011 | neal.norwitz | 2008-08-24 12:27:43 -0500 (Sun, 24 Aug 2008) | 1 line
Ignore a couple more tests that report leaks inconsistently.
........
r66012 | neal.norwitz | 2008-08-24 12:29:53 -0500 (Sun, 24 Aug 2008) | 1 line
Use the actual blacklist of leaky tests
........
r66014 | georg.brandl | 2008-08-24 13:11:07 -0500 (Sun, 24 Aug 2008) | 2 lines
#3654 : fix duplicate test method name. Review by Benjamin P.
........
r66017 | benjamin.peterson | 2008-08-24 16:55:03 -0500 (Sun, 24 Aug 2008) | 1 line
remove note about unimplemented feature
........
r66020 | brett.cannon | 2008-08-24 18:15:19 -0500 (Sun, 24 Aug 2008) | 1 line
Clarify that some attributes/methods are listed somewhat separately because they are not part of the threading API.
........
2008-08-25 21:05:21 +00:00
Benjamin Peterson
d63137159b
Merged revisions 65209-65216,65225-65226,65233,65239,65246-65247,65255-65256 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r65209 | raymond.hettinger | 2008-07-23 19:08:18 -0500 (Wed, 23 Jul 2008) | 1 line
Finish-up the partial conversion from int to Py_ssize_t for deque indices and length.
........
r65210 | raymond.hettinger | 2008-07-23 19:53:49 -0500 (Wed, 23 Jul 2008) | 1 line
Parse to the correct datatype.
........
r65211 | benjamin.peterson | 2008-07-23 21:27:46 -0500 (Wed, 23 Jul 2008) | 1 line
fix spacing
........
r65212 | benjamin.peterson | 2008-07-23 21:31:28 -0500 (Wed, 23 Jul 2008) | 1 line
fix markup
........
r65213 | benjamin.peterson | 2008-07-23 21:45:37 -0500 (Wed, 23 Jul 2008) | 1 line
add some documentation for 2to3
........
r65214 | raymond.hettinger | 2008-07-24 00:38:48 -0500 (Thu, 24 Jul 2008) | 1 line
Finish conversion from int to Py_ssize_t.
........
r65215 | raymond.hettinger | 2008-07-24 02:04:55 -0500 (Thu, 24 Jul 2008) | 1 line
Convert from long to Py_ssize_t.
........
r65216 | georg.brandl | 2008-07-24 02:09:21 -0500 (Thu, 24 Jul 2008) | 2 lines
Fix indentation.
........
r65225 | benjamin.peterson | 2008-07-25 11:55:37 -0500 (Fri, 25 Jul 2008) | 1 line
teach .bzrignore about doc tools
........
r65226 | benjamin.peterson | 2008-07-25 12:02:11 -0500 (Fri, 25 Jul 2008) | 1 line
document default value for fillvalue
........
r65233 | raymond.hettinger | 2008-07-25 13:43:33 -0500 (Fri, 25 Jul 2008) | 1 line
Issue 1592: Better error reporting for operations on closed shelves.
........
r65239 | benjamin.peterson | 2008-07-25 16:59:53 -0500 (Fri, 25 Jul 2008) | 1 line
fix indentation
........
r65246 | andrew.kuchling | 2008-07-26 08:08:19 -0500 (Sat, 26 Jul 2008) | 1 line
This sentence continues to bug me; rewrite it for the second time
........
r65247 | andrew.kuchling | 2008-07-26 08:09:06 -0500 (Sat, 26 Jul 2008) | 1 line
Remove extra words
........
r65255 | skip.montanaro | 2008-07-26 19:49:02 -0500 (Sat, 26 Jul 2008) | 3 lines
Close issue 3437 - missing state change when Allow lines are processed.
Adds test cases which use Allow: as well.
........
r65256 | skip.montanaro | 2008-07-26 19:50:41 -0500 (Sat, 26 Jul 2008) | 2 lines
note robotparser bug fix.
........
2008-07-31 16:23:04 +00:00
Nick Coghlan
d1abd25ed8
Manual forward port of 64962 - use PyObject_HashNotImplemented as a tp_hash level indicator that the default hash implementation has not been inherited
2008-07-15 15:46:38 +00:00
Martin v. Löwis
59683e8529
Merged revisions 64226 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r64226 | martin.v.loewis | 2008-06-13 09:47:47 +0200 (Fr, 13 Jun 2008) | 2 lines
Make more symbols static.
........
2008-06-13 07:50:45 +00:00
Martin v. Löwis
1a21451b1d
Implement PEP 3121: new module initialization and finalization API.
2008-06-11 05:26:20 +00:00
Christian Heimes
0bd4e11887
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,60735-60751 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r60735 | raymond.hettinger | 2008-02-11 23:53:01 +0100 (Mon, 11 Feb 2008) | 1 line
Add notes on how decimal fits into the model.
........
r60737 | raymond.hettinger | 2008-02-12 00:34:56 +0100 (Tue, 12 Feb 2008) | 1 line
Fix markup
........
r60738 | raymond.hettinger | 2008-02-12 00:38:00 +0100 (Tue, 12 Feb 2008) | 1 line
Backport ABC docs
........
r60739 | raymond.hettinger | 2008-02-12 01:15:32 +0100 (Tue, 12 Feb 2008) | 1 line
Restore fractions.rst to the document tree.
........
r60740 | raymond.hettinger | 2008-02-12 01:48:20 +0100 (Tue, 12 Feb 2008) | 1 line
Fix typo in comments
........
r60741 | raymond.hettinger | 2008-02-12 02:18:03 +0100 (Tue, 12 Feb 2008) | 1 line
Bring decimal a bit closer to the spec for Reals.
........
r60743 | martin.v.loewis | 2008-02-12 14:47:26 +0100 (Tue, 12 Feb 2008) | 2 lines
Patch #1736 : Fix file name handling of _msi.FCICreate.
........
r60745 | kurt.kaiser | 2008-02-12 16:45:50 +0100 (Tue, 12 Feb 2008) | 2 lines
what??! Correct r60225.
........
r60747 | martin.v.loewis | 2008-02-12 19:47:34 +0100 (Tue, 12 Feb 2008) | 4 lines
Patch #1966 : Break infinite loop in httplib when the servers
implements the chunked encoding incorrectly.
Will backport to 2.5.
........
r60749 | raymond.hettinger | 2008-02-12 20:05:36 +0100 (Tue, 12 Feb 2008) | 1 line
dict.copy() rises from the ashes. Revert r60687.
........
2008-02-12 22:59:25 +00:00
Christian Heimes
3feef61742
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-60706,60708-60712,60714-60724 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r60701 | georg.brandl | 2008-02-09 22:36:15 +0100 (Sat, 09 Feb 2008) | 2 lines
Needs only 2.4 now.
........
r60702 | georg.brandl | 2008-02-09 22:38:54 +0100 (Sat, 09 Feb 2008) | 2 lines
Docs are rst now.
........
r60703 | georg.brandl | 2008-02-09 23:00:00 +0100 (Sat, 09 Feb 2008) | 2 lines
Fix link.
........
r60704 | georg.brandl | 2008-02-10 00:09:25 +0100 (Sun, 10 Feb 2008) | 2 lines
Fix for newest doctools.
........
r60709 | raymond.hettinger | 2008-02-10 08:21:09 +0100 (Sun, 10 Feb 2008) | 1 line
Clarify that decimal also supports fixed-point arithmetic.
........
r60710 | nick.coghlan | 2008-02-10 08:32:52 +0100 (Sun, 10 Feb 2008) | 1 line
Add missing NEWS entry for r60695
........
r60712 | mark.dickinson | 2008-02-10 15:58:38 +0100 (Sun, 10 Feb 2008) | 3 lines
Turn classmethods into staticmethods, and avoid calling the constructor
of subclasses of Rational. (See discussion in issue #1682.)
........
r60715 | mark.dickinson | 2008-02-10 16:19:58 +0100 (Sun, 10 Feb 2008) | 2 lines
Typos in decimal comment and documentation
........
r60716 | skip.montanaro | 2008-02-10 16:31:54 +0100 (Sun, 10 Feb 2008) | 2 lines
Get the saying right. ;-)
........
r60717 | skip.montanaro | 2008-02-10 16:32:16 +0100 (Sun, 10 Feb 2008) | 2 lines
whoops - revert
........
r60718 | mark.dickinson | 2008-02-10 20:23:36 +0100 (Sun, 10 Feb 2008) | 2 lines
Remove reference to Rational
........
r60719 | raymond.hettinger | 2008-02-10 21:35:16 +0100 (Sun, 10 Feb 2008) | 1 line
Complete an open todo on pickletools -- add a pickle optimizer.
........
r60721 | mark.dickinson | 2008-02-10 22:29:51 +0100 (Sun, 10 Feb 2008) | 3 lines
Rename rational.Rational to fractions.Fraction, to avoid name clash
with numbers.Rational. See issue #1682 for related discussion.
........
r60722 | christian.heimes | 2008-02-11 03:26:22 +0100 (Mon, 11 Feb 2008) | 1 line
The test requires the network resource
........
r60723 | mark.dickinson | 2008-02-11 04:11:55 +0100 (Mon, 11 Feb 2008) | 3 lines
Put an extra space into the repr of a Fraction:
Fraction(1, 2) instead of Fraction(1,2).
........
2008-02-11 06:19:17 +00:00
Christian Heimes
3ecfea71ff
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-60695 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk
........
r60679 | raymond.hettinger | 2008-02-09 02:18:42 +0100 (Sat, 09 Feb 2008) | 1 line
Make ABC containers inherit as documented.
........
r60684 | raymond.hettinger | 2008-02-09 04:34:52 +0100 (Sat, 09 Feb 2008) | 1 line
Merge with r60683.
........
r60687 | raymond.hettinger | 2008-02-09 05:37:49 +0100 (Sat, 09 Feb 2008) | 1 line
Add -3 warnings that set.copy(), dict.copy(), and defaultdict.copy() will go away in Py3.x
........
r60689 | raymond.hettinger | 2008-02-09 11:04:19 +0100 (Sat, 09 Feb 2008) | 1 line
Metaclass declaration is inherited
........
r60691 | raymond.hettinger | 2008-02-09 11:06:20 +0100 (Sat, 09 Feb 2008) | 1 line
Temporarily disable this test. It's been broken for a week.
........
r60695 | nick.coghlan | 2008-02-09 16:28:09 +0100 (Sat, 09 Feb 2008) | 1 line
Issue 2021: Allow NamedTemporaryFile and SpooledTemporaryFile to be used as context managers. (The NamedTemporaryFile fix should be considered for backporting to 2.5)
........
2008-02-09 20:51:34 +00:00