Antoine Pitrou
7aec401966
Optimize string slicing to use the new API
2011-10-04 19:08:01 +02:00
Antoine Pitrou
b7591d4780
Also fix pickletester
2011-10-04 16:18:15 +02:00
Antoine Pitrou
382e8b515c
An embarassing litle typo
2011-10-04 16:07:27 +02:00
Antoine Pitrou
e19aa388e8
When expandtabs() would be a no-op, don't create a duplicate string
2011-10-04 16:04:01 +02:00
Antoine Pitrou
87a484caf5
Migrate test_bigmem to PEP 393-compliant size calculations (hopefully)
2011-10-04 15:55:44 +02:00
Antoine Pitrou
e71d574a39
Migrate str.expandtabs to the new API
2011-10-04 15:55:09 +02:00
Antoine Pitrou
310638ea81
Try to fix linking failures under Windows
2011-10-04 14:44:35 +02:00
Antoine Pitrou
36225c6a99
Try to fix linking failures under Windows
2011-10-04 14:43:47 +02:00
Antoine Pitrou
061fe34262
Remove all other uses of the C tolower()/toupper() which could break with a Turkish locale.
2011-10-04 13:53:01 +02:00
Antoine Pitrou
ed8ba14441
Remove all other uses of the C tolower()/toupper() which could break with a Turkish locale.
2011-10-04 13:50:21 +02:00
Antoine Pitrou
8e4dd08f23
Issue #13099 : Fix sqlite3.Cursor.lastrowid under a Turkish locale.
...
Reported and diagnosed by Thomas Kluyver.
2011-10-04 13:37:06 +02:00
Antoine Pitrou
1665d2c75f
Issue #13099 : Fix sqlite3.Cursor.lastrowid under a Turkish locale.
...
Reported and diagnosed by Thomas Kluyver.
2011-10-04 13:35:28 +02:00
Antoine Pitrou
b244d075fb
Fix compilation error under Windows
2011-10-04 13:00:02 +02:00
Antoine Pitrou
bf009f0bce
Issue #13087 : BufferedReader.seek() now always raises UnsupportedOperation
...
if the underlying raw stream is unseekable, even if the seek could be
satisfied using the internal buffer. Patch by John OConnor.
2011-10-04 12:28:52 +02:00
Antoine Pitrou
0fc80c0d5a
Add John to ACKS
2011-10-04 12:26:34 +02:00
Antoine Pitrou
1e44fecc52
Issue #13087 : BufferedReader.seek() now always raises UnsupportedOperation
...
if the underlying raw stream is unseekable, even if the seek could be
satisfied using the internal buffer. Patch by John O'Connor.
2011-10-04 12:26:20 +02:00
Antoine Pitrou
5b99df68b0
Collect stats a bit more often
2011-10-04 12:06:06 +02:00
Antoine Pitrou
75e78b6c77
Use the faulthandler module's infrastructure to write a GIL-less
...
memory watchdog for timely stats collection.
2011-10-04 11:51:23 +02:00
Antoine Pitrou
031487eb3b
Fix test failure
2011-10-04 10:39:54 +02:00
Antoine Pitrou
1a3ff48c55
Start fixing test_bigmem:
...
- bigmemtest is replaced by precisionbigmemtest
- add a poor man's watchdog thread to print memory consumption
2011-10-04 10:28:37 +02:00
Antoine Pitrou
94190bb6e7
Start fixing test_bigmem:
...
- bigmemtest is replaced by precisionbigmemtest
- add a poor man's watchdog thread to print memory consumption
2011-10-04 10:22:36 +02:00
Antoine Pitrou
5a688dbf97
Issue #7689 : Allow pickling of dynamically created classes when their
...
metaclass is registered with copyreg. Patch by Nicolas M. Thiéry and
Craig Citro.
2011-10-04 09:25:28 +02:00
Antoine Pitrou
ffd41d9f10
Issue #7689 : Allow pickling of dynamically created classes when their
...
metaclass is registered with copyreg. Patch by Nicolas M. Thiéry and
Craig Citro.
2011-10-04 09:23:04 +02:00
Meador Inge
29f43f7368
Issue #12881 : ctypes: Fix segfault with large structure field names.
2011-10-03 21:48:30 -05:00
Meador Inge
1efb33a682
Issue #12881 : ctypes: Fix segfault with large structure field names.
2011-10-03 21:44:22 -05:00
Benjamin Peterson
7f3140ef80
fix parens
2011-10-03 19:37:29 -04:00
Benjamin Peterson
4bfce8f81f
fix formatting
2011-10-03 19:35:07 -04:00
Benjamin Peterson
ccc51c1fc6
fix compiler warnings
2011-10-03 19:34:12 -04:00
Victor Stinner
30134f53fc
Complete documentation of compact ASCII strings
2011-10-04 01:32:45 +02:00
Victor Stinner
b092365cc6
Move in-place Unicode append to its own subfunction
2011-10-04 01:17:31 +02:00
Victor Stinner
a5f9163501
Reindent internal Unicode macros
2011-10-04 01:07:11 +02:00
Victor Stinner
a41463c203
Document utf8_length and wstr_length states
...
Ensure these states with assertions in _PyUnicode_CheckConsistency().
2011-10-04 01:05:08 +02:00
Victor Stinner
9566311014
resize_inplace() sets utf8_length to zero if the utf8 is not shared8
...
Cleanup also the code.
2011-10-04 01:03:50 +02:00
Victor Stinner
9e9d689d85
PyUnicode_New() sets utf8_length to zero for latin1
2011-10-04 01:02:02 +02:00
Victor Stinner
016980454e
Unicode: raise SystemError instead of ValueError or RuntimeError on invalid
...
state
2011-10-04 00:04:26 +02:00
Victor Stinner
7f11ad4594
Unicode: document when the wstr pointer is shared with data
...
Add also related assertions to _PyUnicode_CheckConsistency().
2011-10-04 00:00:20 +02:00
Victor Stinner
03490918b7
Add _PyUnicode_HAS_WSTR_MEMORY() macro
2011-10-03 23:45:12 +02:00
Victor Stinner
9ce5a835bb
PyUnicode_Join() checks output length in debug mode
...
PyUnicode_CopyCharacters() may copies less character than requested size, if
the input string is smaller than the argument. (This is very unlikely, but who
knows!?)
Avoid also calling PyUnicode_CopyCharacters() if the string is empty.
2011-10-03 23:36:02 +02:00
Victor Stinner
b803895355
Fix a compiler warning in PyUnicode_Append()
...
Don't check PyUnicode_CopyCharacters() in release mode. Rename also some
variables.
2011-10-03 23:27:56 +02:00
Victor Stinner
8cfcbed4e3
Improve string forms and PyUnicode_Resize() documentation
...
Remove also the FIXME for resize_copy(): as discussed with Martin, copy the
string on resize if the string is not resizable is just fine.
2011-10-03 23:19:21 +02:00
Victor Stinner
77bb47b312
Simplify unicode_resizable(): singletons reference count is at least 2
2011-10-03 20:06:05 +02:00
Charles-François Natali
8619cd7376
Issue #13001 : Fix test_socket.testRecvmsgTrunc failure on FreeBSD < 8, which
...
doesn't always set the MSG_TRUNC flag when a truncated datagram is received.
2011-10-03 19:43:15 +02:00
Charles-François Natali
87b3c92b5b
Introduce support.requires_freebsd_version decorator.
2011-10-03 19:40:37 +02:00
Victor Stinner
85041a54bd
_PyUnicode_CheckConsistency() checks utf8 field consistency
2011-10-03 14:42:39 +02:00
Victor Stinner
3cf4637e4e
unicode_subtype_new() copies also the ascii flag
2011-10-03 14:42:15 +02:00
Victor Stinner
42dfd71333
unicode_kind_name() doesn't check consistency anymore
...
It is is called from _PyUnicode_Dump() and so must not fail.
2011-10-03 14:41:45 +02:00
Victor Stinner
a3b334da6d
PyUnicode_Ready() now sets ascii=1 if maxchar < 128
...
ascii=1 is no more reserved to PyASCIIObject. Use
PyUnicode_IS_COMPACT_ASCII(obj) to check if obj is a PyASCIIObject (as before).
2011-10-03 13:53:37 +02:00
Victor Stinner
1b4f9ceca7
Create _PyUnicode_READY_REPLACE() to reuse singleton
...
Only use _PyUnicode_READY_REPLACE() on just created strings.
2011-10-03 13:28:14 +02:00
Victor Stinner
c379ead9af
Fix resize_compact() and resize_inplace(); reenable full resize optimizations
...
* resize_compact() updates also wstr_len for non-ascii strings sharing wstr
* resize_inplace() updates also utf8_len/wstr_len for strings sharing
utf8/wstr
2011-10-03 12:52:27 +02:00
Victor Stinner
34411e17b0
resize_inplace() has been fixed: reenable this optimization
2011-10-03 12:21:33 +02:00