Martin v. Löwis
87da872c69
Drop extra semicolon.
2011-10-09 11:54:42 +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
Martin v. Löwis
c47adb04b3
Change PyUnicode_KIND to 1,2,4. Drop _KIND_SIZE and _CHARACTER_SIZE.
2011-10-07 20:55:35 +02:00
Georg Brandl
db6c7f5c33
Update C API docs for PEP 393.
2011-10-07 11:19:11 +02:00
Antoine Pitrou
c61c8d7a5e
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.
2011-10-06 19:04:12 +02:00
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.
2011-10-06 18:57:27 +02:00
Victor Stinner
b066cc6aba
Fix PyUnicode_CHARACTER_SIZE and PyUnicode_KIND_SIZE
2011-10-06 15:54:53 +02:00
Antoine Pitrou
dbf697ae5c
Fix compilation warnings under 64-bit Windows
2011-10-06 15:34:41 +02:00
Éric Araujo
0f4ee93b06
Branch merge
2011-10-06 13:22:21 +02:00
Victor Stinner
1d4b35f4e5
rephrase PyUnicode_1BYTE_KIND documentation
2011-10-06 01:51:19 +02:00
Victor Stinner
fb9ea8c57e
Don't check for the maximum character when copying from unicodeobject.c
...
* Create copy_characters() function which doesn't check for the maximum
character in release mode
* _PyUnicode_CheckConsistency() is no more static to be able to use it
in _PyUnicode_FormatAdvanced() (in formatter_unicode.c)
* _PyUnicode_CheckConsistency() checks the string hash
2011-10-06 01:45:57 +02:00
Éric Araujo
80a348c0a0
Fix typo
2011-10-05 01:11:12 +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
Victor Stinner
30134f53fc
Complete documentation of compact ASCII strings
2011-10-04 01:32:45 +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
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
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
c3cec7868b
Add asciilib: similar to ucs1, ucs2 and ucs4 library, but specialized to ASCII
...
ucs1, ucs2 and ucs4 libraries have to scan created substring to find the
maximum character, whereas it is not need to ASCII strings. Because ASCII
strings are common, it is useful to optimize ASCII.
2011-10-05 21:24:08 +02:00
Victor Stinner
4d0d54bcba
Document requierements of Unicode kinds
2011-10-05 01:31:05 +02:00
Georg Brandl
07de325672
More fixes.
2011-10-05 16:47:38 +02:00
Georg Brandl
c6bc4c6897
Fix a few typos in the unicode header.
2011-10-05 16:23:09 +02:00
Georg Brandl
4975a9b44d
Fix grammar.
2011-10-05 16:12:21 +02:00
Victor Stinner
b9275c104e
Speedup str[a:b] and PyUnicode_FromKindAndData
...
* str[a:b] doesn't scan the string for the maximum character if the string
is ascii only
* PyUnicode_FromKindAndData() stops if we are sure that we cannot use a
shorter character type. For example, _PyUnicode_FromUCS1() stops if we
have at least one character in range U+0080-U+00FF
2011-10-05 14:01:42 +02:00
Victor Stinner
85041a54bd
_PyUnicode_CheckConsistency() checks utf8 field consistency
2011-10-03 14:42:39 +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
910337b42e
Add _PyUnicode_CheckConsistency() macro to help debugging
...
* Document Unicode string states
* Use _PyUnicode_CheckConsistency() to ensure that objects are always
consistent.
2011-10-03 03:20:16 +02:00
Victor Stinner
37943769ef
PyUnicode_READ_CHAR() ensures that the string is ready
2011-10-02 20:33:18 +02:00
Victor Stinner
7a48ff7e06
Use Py_UCS1 instead of unsigned char in unicodeobject.h
2011-10-02 00:55:25 +02:00
Victor Stinner
cd9950fd09
PyUnicode_WriteChar() raises IndexError on invalid index
...
PyUnicode_WriteChar() raises also a ValueError if the string has more than 1
reference.
2011-10-02 00:34:53 +02:00
Victor Stinner
9f789e7f63
_PyUnicode_AsKind() is *not* part of the stable ABI
2011-10-01 03:57:28 +02:00
Victor Stinner
4584a5ba1a
PyUnicode_CHARACTER_SIZE(): add a reference to PyUnicode_KIND_SIZE()
2011-10-01 02:39:37 +02:00
Victor Stinner
034f6cf10c
Add PyUnicode_Copy() function, include it to the public API
2011-09-30 02:26:44 +02:00
Victor Stinner
d8f6510acc
_PyUnicode_Ready() cannot be used on ready strings anymore
...
* Change its prototype: PyObject* instead of PyUnicodeoObject*.
* Remove an old assertion, the result of PyUnicode_READY (_PyUnicode_Ready)
must be checked instead
2011-09-29 19:43:17 +02:00
Victor Stinner
bc8b81bc4e
Move _PyUnicode_UTF8() and _PyUnicode_UTF8_LENGTH() outside unicodeobject.h
...
Move these macros to unicodeobject.c
2011-09-29 19:31:34 +02:00
Victor Stinner
a0702ab1fe
Add a note in PyUnicode_CopyCharacters() doc: it doesn't write null character
...
Cleanup also the code (avoid the goto).
2011-09-29 14:14:38 +02:00
Victor Stinner
f0ddadcf2e
Rename Py_BUILD_ASSERT to Py_BUILD_ASSERT_EXPR
...
To make it clearer that Py_BUILD_ASSERT_EXPR(cond) cannot be used as
assert(cond).
2011-09-29 12:43:18 +02:00
Victor Stinner
573696a9ca
pymacro.h: Inline _Py_ARRAY_LENGTH_CHECK() and add http://ccodearchive.net/
2011-09-29 12:12:39 +02:00
Victor Stinner
dfb866d127
Enhance Py_ARRAY_LENGTH(): fail at build time if the argument is not an array
...
Move other various macros to pymcacro.h
Thanks Rusty Russell for having written these amazing C macros!
2011-09-29 01:12:24 +02:00
Victor Stinner
2bdc7f591b
Move code related to compile from Python.h to compile.h
2011-09-29 01:04:08 +02:00
Victor Stinner
f5ca1a21a5
PyUnicode_CopyCharacters() fails if 'to' has more than 1 reference
2011-09-28 23:54:59 +02:00
Ezio Melotti
2aa2b3b4d5
Clean up a few tabs that went in with PEP393.
2011-09-29 00:58:57 +03:00
Victor Stinner
17222160e7
Mark _PyUnicode_FindMaxCharAndNumSurrogatePairs() as private
2011-09-28 22:15:37 +02:00
Victor Stinner
157f83fcfc
Strip trailing spaces in unicodeobject.[ch]
2011-09-28 21:41:31 +02:00
Victor Stinner
be78eaf2de
PyUnicode_CopyCharacters() checks for buffer and character overflow
...
It now returns the number of written characters on success.
2011-09-28 21:37:03 +02:00
Victor Stinner
fb5f5f2420
Mark PyUnicode_CONVERT_BYTES as private
2011-09-28 21:39:49 +02:00
Georg Brandl
4cb0de246c
Rename new macros to conform to naming rules (function macros have "Py" prefix, not "PY").
2011-09-28 21:49:49 +02:00
Victor Stinner
5ce1b0dbc0
Set Py_UNICODE_REPLACEMENT_CHARACTER type to Py_UCS4, instead of Py_UNICODE
2011-09-28 20:29:27 +02:00
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
2011-09-28 07:41:54 +02:00
Mark Dickinson
0390151100
Fix typo in comment: _PyHash_Double -> _Py_HashDouble.
2011-09-24 16:24:56 +01:00
Victor Stinner
f955eb210f
Merge 3.2: Fix PyUnicode_AsWideCharString() doc
...
- Fix PyUnicode_AsWideCharString() doc: size doesn't contain the null
character
- Fix spelling of the null character
2011-09-06 02:01:29 +02:00
Victor Stinner
d88d9836c5
Fix PyUnicode_AsWideCharString() doc: size doesn't contain the null character
...
Fix also spelling of the null character.
2011-09-06 02:00:05 +02:00
Georg Brandl
06ee020961
Post-release version bump.
2011-09-04 08:36:22 +02:00
Georg Brandl
3484a8771c
Merge with release clone.
2011-09-04 08:35:54 +02:00
Benjamin Peterson
e35dc5110f
merge 3.2
2011-09-01 16:33:56 -04:00
Benjamin Peterson
eff61f6927
make sure to initialize the method wrapper type
2011-09-01 16:32:31 -04:00
Charles-François Natali
ac7e9e058d
Issue #12287 : Fix a stack corruption in ossaudiodev module when the FD is
...
greater than FD_SETSIZE.
2011-08-28 18:10:27 +02:00
Charles-François Natali
aa26b27503
Issue #12287 : Fix a stack corruption in ossaudiodev module when the FD is
...
greater than FD_SETSIZE.
2011-08-28 17:51:43 +02:00
Georg Brandl
b0993bc78d
Bump to 3.2.2.
2011-09-03 11:17:55 +02:00
Ezio Melotti
8c9375bb59
#10542 : Add 4 macros to work with surrogates: Py_UNICODE_IS_SURROGATE, Py_UNICODE_IS_HIGH_SURROGATE, Py_UNICODE_IS_LOW_SURROGATE, Py_UNICODE_JOIN_SURROGATES.
2011-08-22 20:03:25 +03:00
Georg Brandl
666ed0b84d
Post-release steps.
2011-08-13 20:19:09 +02:00
Georg Brandl
b3f0ce4d1e
Bump version to 3.2.2rc1.
2011-08-13 11:34:58 +02:00
Brian Curtin
7d2f9e1342
Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724 .
2011-08-10 20:05:21 -05:00
Benjamin Peterson
832bfe2ebd
add a AST validator ( closes #12575 )
2011-08-09 16:15:04 -05:00
Benjamin Peterson
450bb594c8
forgotten in f578ca44193d
2011-08-09 16:14:45 -05:00
Benjamin Peterson
e249841903
add a asdl bytes type, so Bytes.s be properly typechecked
2011-08-09 16:08:39 -05:00
Sandro Tosi
1e8d8fd01d
#10741 : merge with 3.2
2011-08-08 00:17:43 +02:00
Sandro Tosi
61baee0ee7
#10741 : add documentation for PyGILState_GetThisThreadState()
2011-08-08 00:16:54 +02:00
Benjamin Peterson
76f7f4d979
excise the remains of STOP_CODE, which hasn't done anything useful for years
2011-07-17 22:49:50 -05:00
Georg Brandl
bb9c7d0b91
Post-release steps for 3.2.1.
2011-07-09 10:56:06 +02:00
Georg Brandl
cd0dc16fdc
Bump version to 3.2.1.
2011-07-09 08:56:21 +02:00
Antoine Pitrou
370092071b
Issue #11863 : Remove support for legacy systems deprecated in Python 3.2
...
(following PEP 11). These systems are systems using Mach C Threads,
SunOS lightweight processes, GNU pth threads and IRIX threads.
2011-07-08 23:47:50 +02:00
Benjamin Peterson
ae10c0653e
add patchlevel to version string
2011-07-08 13:39:35 -05:00
Victor Stinner
99b9538636
Issue #9642 : Uniformize the tests on the availability of the mbcs codec
...
Add a new HAVE_MBCS define.
2011-07-04 14:23:54 +02:00
Georg Brandl
7d10a2d88a
Post-release steps.
2011-07-04 08:20:48 +02:00
Georg Brandl
d4fa7ed8db
Bump to 3.2.1rc2.
2011-07-03 09:41:27 +02:00
Benjamin Peterson
9003760991
map cells to arg slots at code creation time ( closes #12399 )
...
This removes nested loops in PyEval_EvalCodeEx.
2011-06-25 22:54:45 -05:00
Benjamin Peterson
acde6a0a40
onto 3.1.5
2011-06-11 11:33:01 -05:00
Benjamin Peterson
d858df20d0
bump to 3.1.4
2011-06-11 09:58:58 -05:00
Benjamin Peterson
9a63745273
bump to 3.1.4rc1
2011-05-29 16:06:00 -05:00
Benjamin Peterson
43af12b0b4
unify TryExcept and TryFinally ( closes #12199 )
2011-05-29 11:43:10 -05:00
Benjamin Peterson
bf1bbc1452
reflect with statements with multiple items in the AST ( closes #12106 )
2011-05-27 13:58:08 -05:00
Benjamin Peterson
04778a8150
make PyImport_ImportModuleLevel's first arg const like similiar functions ( closes #12173 )
2011-05-25 09:29:00 -05:00
Georg Brandl
d079367044
Set up branch to be rc2 next.
2011-05-21 17:36:20 +02:00
Georg Brandl
5673e27e72
Bump to 3.2.1rc1.
2011-05-15 17:52:42 +02:00
Georg Brandl
cd79cdc5e6
Bump to 3.2.1b1.
2011-05-08 09:03:36 +02:00
Antoine Pitrou
fc20b0c65c
Issue #1856 : Avoid crashes and lockups when daemon threads run while the
...
interpreter is shutting down; instead, these threads are now killed when
they try to take the GIL.
2011-05-04 20:04:29 +02:00
Antoine Pitrou
0d5e52d346
Issue #1856 : Avoid crashes and lockups when daemon threads run while the
...
interpreter is shutting down; instead, these threads are now killed when
they try to take the GIL.
2011-05-04 20:02:30 +02:00
Victor Stinner
d5c355ccc7
Issue #11223 : Replace threading._info() by sys.thread_info
2011-04-30 14:53:09 +02:00
Antoine Pitrou
9ea1c8d7d7
Issue #10517 : After fork(), reinitialize the TLS used by the PyGILState_*
...
APIs, to avoid a crash with the pthread implementation in RHEL 5. Patch
by Charles-François Natali.
2011-04-27 19:30:16 +02:00
Antoine Pitrou
0c759febb6
Issue #10517 : After fork(), reinitialize the TLS used by the PyGILState_*
...
APIs, to avoid a crash with the pthread implementation in RHEL 5. Patch
by Charles-François Natali.
2011-04-27 19:28:05 +02:00
Victor Stinner
3cbf14bfb1
Issue #10914 : Initialize correctly the filesystem codec when creating a new
...
subinterpreter to fix a bootstrap issue with codecs implemented in Python, as
the ISO-8859-15 codec.
Add fscodec_initialized attribute to the PyInterpreterState structure.
2011-04-27 00:24:21 +02:00
Victor Stinner
793b531756
Issue #10914 : Initialize correctly the filesystem codec when creating a new
...
subinterpreter to fix a bootstrap issue with codecs implemented in Python, as
the ISO-8859-15 codec.
Add fscodec_initialized attribute to the PyInterpreterState structure.
2011-04-27 00:24:21 +02:00
Victor Stinner
8e4d407818
PyGILState_Ensure(), PyGILState_Release(), PyGILState_GetThisThreadState() are
...
not available if Python is compiled without threads.
2011-04-26 23:34:58 +02:00
Jesus Cea
2fc8b87499
Port 5b607cd8c71b ( closes #11892 )
2011-04-20 22:26:57 +02:00
Victor Stinner
754851f456
Issue #11223 : Add threading._info() function providing informations about the
...
thread implementation.
Skip test_lock_acquire_interruption() and test_rlock_acquire_interruption() of
test_threadsignals if a thread lock is implemented using a POSIX mutex and a
POSIX condition variable. A POSIX condition variable cannot be interrupted by a
signal (e.g. on Linux, the futex system call is restarted).
2011-04-19 23:58:51 +02:00
Eli Bendersky
dd97fbb2dc
Issue #9904 : fix and clarify some comments + fix indentation in symtable code
2011-04-10 07:37:26 +03:00
Victor Stinner
7f2fee3640
Issue #10785 : Store the filename as Unicode in the Python parser.
2011-04-05 00:39:01 +02:00
Victor Stinner
fcb88c4503
Issue #11393 : _Py_DumpTraceback() writes the header even if there is no frame
2011-04-01 15:34:01 +02:00
Victor Stinner
024e37adcc
Issue #11393 : Add the new faulthandler module
2011-03-31 01:31:06 +02:00
Éric Araujo
be3bd57ba2
Remove traces of division_warning left over from Python 2 ( #10998 )
2011-03-26 01:55:15 +01:00
Victor Stinner
34ad2faf85
Closes #11210 : Remove PyErr_SetFromWindowsErrWithFilenameObject() of pyerrors.h
...
PyErr_SetFromWindowsErrWithFilenameObject() was never implemented.
2011-03-21 01:58:55 +01:00
Ezio Melotti
3b3499ba69
#11565 : Merge with 3.1.
2011-03-16 11:35:38 +02:00
Ezio Melotti
13925008dc
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
2011-03-16 11:05:33 +02:00
Benjamin Peterson
274f5fa501
merge 3.1
2011-03-15 15:04:06 -05:00
Benjamin Peterson
ec4b44b2da
make this subversion artifact empty
2011-03-15 15:03:13 -05:00
Victor Stinner
fe93faf98c
Issue #3080 : Add PyImport_ImportModuleLevelObject() function
...
Use it for the builtin __import__ function.
2011-03-14 15:54:52 -04:00
Victor Stinner
db536afee1
Issue #3080 : Document the name attribute of the _inittab structure
...
The name is an ASCII encoded string.
2011-03-07 18:34:59 +01:00
Victor Stinner
9587286f98
Issue #3080 : Import builtins using Unicode strings
...
- is_builtin(), init_builtin(), load_builtin() and other builtin related
functions use Unicode strings, instead of byte strings
- Rename _PyImport_FixupExtensionUnicode() to _PyImport_FixupExtensionObject()
- Rename _PyImport_FindExtensionUnicode() to _PyImport_FindExtensionObject()
2011-03-07 18:20:56 +01:00
Victor Stinner
53dc735168
Issue #3080 : Add PyImport_ImportFrozenModuleObject()
...
find_frozen(), get_frozen_object(), is_frozen_package() and other functions
related to frozen modules use Unicode strings instead of byte strings.
2011-03-20 01:50:21 +01:00
Ezio Melotti
b88ed1549e
#11565 : Merge with 3.2.
2011-03-16 11:38:59 +02:00
Benjamin Peterson
485119eb1e
kill PY_PATCHLEVEL_REVISION
2011-03-15 15:07:20 -05:00
Benjamin Peterson
bb375d66b8
merge 3.2
2011-03-15 15:05:22 -05:00
Jesus Cea
736e7fc0f6
Issue #11495 : OSF support is eliminated. It was deprecated in Python 3.2
2011-03-14 17:36:54 +01:00
Georg Brandl
776e586114
Remove sys.subversion and svn build identification leftovers.
2011-03-06 10:35:42 +01:00
Georg Brandl
fe09a54280
Merge build identification to default branch.
2011-03-06 10:26:32 +01:00
Georg Brandl
13039c87f1
Merge build identification to 3.2 branch.
2011-03-06 10:13:00 +01:00
Georg Brandl
1ca2e7965c
Commit the hg build identification patch from the pymigr repo.
2011-03-05 20:51:24 +01:00
Victor Stinner
27ee089c35
Issue #3080 : Add PyImport_AddModuleObject() and PyImport_ExecCodeModuleObject()
2011-03-04 12:57:09 +00:00
Victor Stinner
0639b56672
Issue #3080 : Add PyModule_NewObject() function
2011-03-04 12:57:07 +00:00
Victor Stinner
f3fd733f92
Remove useless argument of _PyUnicode_AsDefaultEncodedString()
2011-03-02 01:03:11 +00:00
Victor Stinner
bd475115c4
Issue #3080 : Add PyModule_GetNameObject()
...
repr(module) uses %R to format module name and filenames, instead of '%s' and
'%U', so surrogates from undecodable bytes in a filename (PEP 383) are escaped.
2011-02-23 00:21:43 +00:00
Victor Stinner
501c09a754
Issue #3080 : Mark _PyImport_FindBuiltin() argument as constant
...
And as a consequence, mark also name argument of
_PyImport_FindExtensionUnicode() constant too. But I plan to change this
argument type to PyObject* later.
2011-02-23 00:02:00 +00:00
Victor Stinner
eda71c9ef1
Merged revisions 88517 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88517 | victor.stinner | 2011-02-23 00:38:34 +0100 (mer., 23 févr. 2011) | 1 line
Issue #3080 : document encoding used by import functions
........
2011-02-22 23:43:57 +00:00
Victor Stinner
d7e76405c7
Issue #3080 : document encoding used by import functions
2011-02-22 23:38:34 +00:00
Brett Cannon
b94767ff44
Issue #8914 : fix various warnings from the Clang static analyzer v254.
2011-02-22 20:15:44 +00:00
Georg Brandl
0accdfa00b
Update in-development version.
2011-02-21 18:13:44 +00:00
Georg Brandl
3ebb6b3615
Bump trunk to 3.3 alpha 0.
2011-02-20 10:37:07 +00:00
Georg Brandl
260a788767
Version bump to 3.2 final.
2011-02-20 10:29:04 +00:00
Georg Brandl
d585218a75
Post-release updates.
2011-02-14 06:35:00 +00:00
Georg Brandl
a6d12ef048
Bump for 3.2rc3.
2011-02-13 10:00:57 +00:00
Martin v. Löwis
cc7e23ac15
Issue #11134 : Add missing fields to typeslots.h.
...
Reviewed by Georg Brandl.
2011-02-11 20:50:24 +00:00
Martin v. Löwis
6916806443
Issue #11135 : Remove redundant doc field from PyType_Spec.
...
Reviewed by Georg Brandl.
2011-02-11 20:47:49 +00:00
Martin v. Löwis
738236dbd6
Issue #11067 : Add PyType_GetFlags, to support PyUnicode_Check
...
in the limited ABI
2011-02-05 20:35:29 +00:00
Georg Brandl
6b449baa83
Post-release updates.
2011-01-31 10:39:57 +00:00
Georg Brandl
d6e19c3513
Bump version.
2011-01-30 14:03:33 +00:00
Georg Brandl
0c5036fdcd
Post-release updates.
2011-01-16 08:44:50 +00:00
Georg Brandl
3988ed8e6f
Bump to 3.2rc1.
2011-01-15 17:08:53 +00:00
Martin v. Löwis
189c091612
Drop bf_getbuffer/bf_releasebuffer from stable ABI,
...
see #10181 .
2011-01-06 19:28:31 +00:00
Martin v. Löwis
c83bc3c1fb
Remove buffer API from stable ABI for now, see #10181 .
2011-01-06 19:15:47 +00:00
Antoine Pitrou
23683ef26d
Issue #10333 : Remove ancient GC API, which has been deprecated since
...
Python 2.2.
2011-01-04 00:00:31 +00:00
Gregory P. Smith
60db46758f
post release bump
2011-01-01 21:18:46 +00:00
Georg Brandl
8aa7e999b5
Add sys.flags.quiet attribute for the new -q option, as noted missing by Eric in #1772833 .
2010-12-28 18:30:18 +00:00
Victor Stinner
b9cb21efc8
Issue #10780 : Remove commas at the end of the argument list
...
Forbidden in C, stupid language!
2010-12-28 00:59:03 +00:00
Victor Stinner
92be939695
Issue #10780 : PyErr_SetFromWindowsErrWithFilename() and
...
PyErr_SetExcFromWindowsErrWithFilename() decode the filename from the
filesystem encoding instead of UTF-8.
2010-12-28 00:28:21 +00:00
Victor Stinner
cb428f0162
Issue #10779 : PyErr_WarnExplicit() decodes the filename from the filesystem
...
encoding instead of UTF-8.
2010-12-27 20:10:36 +00:00
Victor Stinner
0d711169fa
Issue #9738 : Ooops, fix typos in my previous commit (r87506)
2010-12-27 02:39:20 +00:00
Victor Stinner
00676d1436
Issue #9738 : Document encodings of AST, compiler, parser and PyRun functions
2010-12-27 01:49:31 +00:00
Victor Stinner
dc2081f72b
Issue #9738 : document encodings of unicode functions
2010-12-27 01:49:29 +00:00
Victor Stinner
555a24f206
Issue #9738 : Document encodings of error and warning functions
2010-12-27 01:49:26 +00:00
Georg Brandl
8a60e94802
Bump to 3.2b2.
2010-12-19 10:30:28 +00:00
Antoine Pitrou
810023db3e
Issue #8844 : Regular and recursive lock acquisitions can now be interrupted
...
by signals on platforms using pthreads. Patch by Reid Kleckner.
2010-12-15 22:59:16 +00:00
Georg Brandl
b550308597
Take PyUnicode_TransformDecimalToASCII out of the limited API.
2010-12-05 11:40:48 +00:00
Georg Brandl
41ea8ae667
Bump to 3.2b1.
2010-12-04 19:09:24 +00:00
Martin v. Löwis
0d012f284b
Expose CompileString, not CompileStringFlags under the
...
limited API.
2010-12-04 12:00:49 +00:00
Georg Brandl
8334fd9285
Add an "optimize" parameter to compile() to control the optimization level, and provide an interface to it in py_compile, compileall and PyZipFile.
2010-12-04 10:26:46 +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
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
Benjamin Peterson
68eb3718d9
point in the general direction of 3.1.4
2010-11-28 04:50:12 +00:00
Benjamin Peterson
5757429130
3.1.3 final version bump
2010-11-27 14:46:13 +00:00
Georg Brandl
f65e25b626
Merged revisions 86134,86315-86316,86390,86424-86425,86428,86550,86561-86562,86564-86565,86705,86708,86713 via svnmerge from
...
svn+ssh://svn.python.org/python/branches/py3k
........
r86134 | georg.brandl | 2010-11-03 08:41:00 +0100 (Mi, 03 Nov 2010) | 1 line
A newline in lineno output breaks pyframe output.
........
r86315 | georg.brandl | 2010-11-08 12:05:18 +0100 (Mo, 08 Nov 2010) | 1 line
Fix latex conversion glitch in property/feature descriptions.
........
r86316 | georg.brandl | 2010-11-08 12:08:35 +0100 (Mo, 08 Nov 2010) | 1 line
Fix typo.
........
r86390 | georg.brandl | 2010-11-10 08:57:10 +0100 (Mi, 10 Nov 2010) | 1 line
Fix typo.
........
r86424 | georg.brandl | 2010-11-12 07:19:48 +0100 (Fr, 12 Nov 2010) | 1 line
Build a PDF of the FAQs too.
........
r86425 | georg.brandl | 2010-11-12 07:20:12 +0100 (Fr, 12 Nov 2010) | 1 line
#10008 : Fix duplicate index entry.
........
r86428 | georg.brandl | 2010-11-12 09:09:26 +0100 (Fr, 12 Nov 2010) | 1 line
Fix weird line block in table.
........
r86550 | georg.brandl | 2010-11-20 11:24:34 +0100 (Sa, 20 Nov 2010) | 1 line
Fix rst markup errors.
........
r86561 | georg.brandl | 2010-11-20 12:47:10 +0100 (Sa, 20 Nov 2010) | 1 line
#10460 : Update indent.pro to match PEP 7 better.
........
r86562 | georg.brandl | 2010-11-20 14:44:41 +0100 (Sa, 20 Nov 2010) | 1 line
#10439 : document PyCodec C APIs.
........
r86564 | georg.brandl | 2010-11-20 15:08:53 +0100 (Sa, 20 Nov 2010) | 1 line
#10460 : an even better indent.pro.
........
r86565 | georg.brandl | 2010-11-20 15:16:17 +0100 (Sa, 20 Nov 2010) | 1 line
socket.gethostbyname(socket.gethostname()) can fail when host name resolution is not set up correctly; do not fail test_socket if this is the case.
........
r86705 | georg.brandl | 2010-11-23 08:54:19 +0100 (Di, 23 Nov 2010) | 1 line
#10468 : document Unicode exception creation and access functions.
........
r86708 | georg.brandl | 2010-11-23 09:37:54 +0100 (Di, 23 Nov 2010) | 2 lines
#10511 : clarification of what heaps are; suggested by Johannes Hoff.
........
r86713 | georg.brandl | 2010-11-23 19:14:57 +0100 (Di, 23 Nov 2010) | 1 line
assert.h is also included. Thanks to Savio Sena.
........
2010-11-26 09:05:43 +00:00
Georg Brandl
bab3378f36
#10439 : document PyCodec C APIs.
2010-11-20 13:44:41 +00:00
Mark Dickinson
6646cd45be
Issue #10325 : Fix two issues in the fallback definitions of PY_LLONG_MAX and
...
PY_ULLONG_MAX in pyport.h. Thanks Hallvard B Furuseth for the patch.
2010-11-20 10:43:10 +00:00
David Malcolm
82e73cb951
Issue #9518 : Extend the PyModuleDef_HEAD_INIT macro to explicitly
...
zero-initialize all fields, fixing compiler warnings seen when building
extension modules with gcc with "-Wmissing-field-initializers" (implied
by "-W")
2010-11-17 21:20:18 +00:00
Alexander Belopolsky
9ec2c52817
Merged revisions 86478 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86478 | alexander.belopolsky | 2010-11-16 09:29:01 -0500 (Tue, 16 Nov 2010) | 1 line
Issue #10413 : Updated comments to reflect code changes
........
2010-11-16 16:10:44 +00:00
Georg Brandl
9b0034d040
Post-release bumps.
2010-11-16 15:15:56 +00:00
Alexander Belopolsky
83283c270a
Issue #10413 : Updated comments to reflect code changes
2010-11-16 14:29:01 +00:00
Benjamin Peterson
650db5bd68
prepare for final
2010-11-13 23:34:41 +00:00
Benjamin Peterson
5889129571
bump to 3.1.3rc1
2010-11-13 17:28:56 +00:00
Georg Brandl
24854cac99
Bump to 3.2a4.
2010-11-13 06:39:58 +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
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
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
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
09f24bb408
Issue #8761 : Mangle PyUnicode_CompareWithASCIIString function name for
...
narrow/wide unicode build.
2010-10-24 20:38:25 +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
Benjamin Peterson
8035bc5c04
follow up to #9778 : define and use an unsigned hash type
2010-10-23 16:20:50 +00:00
Antoine Pitrou
9583cac633
Issue #10089 : Add support for arbitrary -X options on the command-line.
...
They can be retrieved through a new attribute `sys._xoptions`.
2010-10-21 13:42:28 +00:00
R. David Murray
fd6a55ec41
Merged revisions 85675 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85675 | r.david.murray | 2010-10-17 20:15:31 -0400 (Sun, 17 Oct 2010) | 4 lines
#4499 : silence compiler warning on AIX.
Patch from ActiveState.
........
2010-10-18 00:18:46 +00:00
R. David Murray
051176fde8
#4499 : silence compiler warning on AIX.
...
Patch from ActiveState.
2010-10-18 00:15:31 +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
Victor Stinner
49d3f2514b
_PyImport_FixupExtension() and _PyImport_FindExtension() uses FS encoding
...
* Rename _PyImport_FindExtension() to _PyImport_FindExtensionUnicode():
the filename becomes a Unicode object instead of byte string
* Rename _PyImport_FixupExtension() to _PyImport_FixupExtensionUnicode():
the filename becomes a Unicode object instead of byte string
2010-10-17 01:24:53 +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
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
Victor Stinner
5d1e3438cd
Mark _Py_char2wchar() input argument as constant
2010-10-15 11:15:54 +00:00
Georg Brandl
8349031934
Post-release bumps.
2010-10-12 12:38:48 +00:00
Georg Brandl
002fa2de90
Bump to 3.2a3.
2010-10-10 09:40:34 +00:00
Victor Stinner
257d38ffdd
Issue #9738 : Document PyErr_SetString() and PyErr_SetFromErrnoWithFilename()
...
encodings
2010-10-09 10:12:11 +00:00
Victor Stinner
015f4d87ab
_Py_wrealpath() requires the size of the output buffer
2010-10-07 22:29:53 +00:00
Victor Stinner
a4a759515e
_Py_stat() and _Py_fopen(): avoid PyUnicode_AsWideCharString() on Windows
...
On Windows, Py_UNICODE is wchar_t, so we can avoid the expensive Py_UNICODE*
=> wchar_t* conversion.
2010-10-07 22:23:10 +00:00
Victor Stinner
b306d7594f
Fix fileutils for Windows
...
* Don't define _Py_wstat() on Windows, Windows has its own _wstat() function
with a different API (the stat buffer has another type)
* Include windows.h
2010-10-07 22:09:40 +00:00
Victor Stinner
4e31443c4d
Create fileutils.c/.h
...
* _Py_fopen() and _Py_stat() come from Python/import.c
* (_Py)_wrealpath() comes from Python/sysmodule.c
* _Py_char2wchar(), _Py_wchar2char() and _Py_wfopen() come from Modules/main.c
* (_Py)_wstat(), (_Py)_wgetcwd(), _Py_wreadlink() come from Modules/getpath.c
2010-10-07 21:45:39 +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
Georg Brandl
c7b6908bb1
Merged revisions 82262,82269,82434,82480-82481,82484-82485,82487-82488,82594,82599,82615 via svnmerge from
...
svn+ssh://svn.python.org/python/branches/py3k
................
r82262 | georg.brandl | 2010-06-27 12:17:12 +0200 (So, 27 Jun 2010) | 1 line
#9078 : fix some Unicode C API descriptions, in comments and docs.
................
r82269 | georg.brandl | 2010-06-27 12:59:19 +0200 (So, 27 Jun 2010) | 1 line
Wording fix.
................
r82434 | georg.brandl | 2010-07-02 09:41:51 +0200 (Fr, 02 Jul 2010) | 9 lines
Merged revisions 82433 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82433 | georg.brandl | 2010-07-02 09:33:50 +0200 (Fr, 02 Jul 2010) | 1 line
Grammar and markup fixes.
........
................
r82480 | georg.brandl | 2010-07-03 12:21:50 +0200 (Sa, 03 Jul 2010) | 1 line
Wrap and use the correct directive.
................
r82481 | georg.brandl | 2010-07-03 12:22:10 +0200 (Sa, 03 Jul 2010) | 1 line
Use the right role.
................
r82484 | georg.brandl | 2010-07-03 12:26:17 +0200 (Sa, 03 Jul 2010) | 9 lines
Recorded merge of revisions 82474 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82474 | georg.brandl | 2010-07-03 10:40:13 +0200 (Sa, 03 Jul 2010) | 1 line
Fix role name.
........
................
r82485 | georg.brandl | 2010-07-03 12:26:54 +0200 (Sa, 03 Jul 2010) | 9 lines
Merged revisions 82483 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r82483 | georg.brandl | 2010-07-03 12:25:54 +0200 (Sa, 03 Jul 2010) | 1 line
Add link to bytecode docs.
........
................
r82487 | georg.brandl | 2010-07-03 12:33:26 +0200 (Sa, 03 Jul 2010) | 1 line
Fix markup.
................
r82488 | georg.brandl | 2010-07-03 12:41:33 +0200 (Sa, 03 Jul 2010) | 1 line
Remove the need for a "()" empty argument list after opcodes.
................
r82594 | georg.brandl | 2010-07-05 22:13:41 +0200 (Mo, 05 Jul 2010) | 1 line
Update Vec class constructor, remove indirection via function, use operator module.
................
r82599 | alexander.belopolsky | 2010-07-05 23:44:05 +0200 (Mo, 05 Jul 2010) | 1 line
"Modernized" the demo a little.
................
r82615 | georg.brandl | 2010-07-07 00:58:50 +0200 (Mi, 07 Jul 2010) | 1 line
Fix typo.
................
2010-10-06 08:08:40 +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
Antoine Pitrou
3e1fd27b74
Issue #9090 : When a socket with a timeout fails with EWOULDBLOCK or EAGAIN,
...
retry the select() loop instead of bailing out. This is because select()
can incorrectly report a socket as ready for reading (for example, if it
received some data with an invalid checksum).
2010-09-28 21:23:11 +00:00
Kristján Valur Jónsson
3b69db27d7
issue 9910
...
Add a Py_SetPath api to override magic path computations when starting up python.
2010-09-27 05:32:54 +00:00
Benjamin Peterson
d4efd9eb15
add column offset to all syntax errors
2010-09-20 23:02:10 +00:00
Benjamin Peterson
2c53971b37
add PyErr_SyntaxLocationEx, to support adding a column offset
2010-09-20 22:42:10 +00:00
Daniel Stutzbach
bd63a9976d
Merged revisions 84810 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84810 | daniel.stutzbach | 2010-09-14 11:02:01 -0500 (Tue, 14 Sep 2010) | 1 line
Remove pointers to a FAQ entry that no longer exists. Incorporate some text from the old FAQ into the docs
........
2010-09-14 16:07:54 +00:00
Daniel Stutzbach
38615993b0
Remove pointers to a FAQ entry that no longer exists. Incorporate some text from the old FAQ into the docs
2010-09-14 16:02:01 +00:00
Antoine Pitrou
1df1536fb9
Issue #9828 : Destroy the GIL in Py_Finalize(), so that it gets properly
...
re-created on a subsequent call to Py_Initialize(). The problem (a crash)
wouldn't appear in 3.1 or 2.7 where the GIL's structure is more trivial.
2010-09-13 14:16:46 +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
Hirokazu Yamamoto
f13c6d8d34
Issue #9318 : Use Py_LL for old compiler.
2010-09-11 22:35:24 +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
Victor Stinner
5b519e0201
Issue #9632 : Remove sys.setfilesystemencoding() function: use PYTHONFSENCODING
...
environment variable to set the filesystem encoding at Python startup.
sys.setfilesystemencoding() creates inconsistencies because it is unable to
reencode all filenames in all objects.
2010-09-10 21:57:59 +00:00
Amaury Forgeot d'Arc
ba117ef7e9
#4617 : Previously it was illegal to delete a name from the local
...
namespace if it occurs as a free variable in a nested block. This limitation
of the compiler has been lifted, and a new opcode introduced (DELETE_DEREF).
This sample was valid in 2.6, but fails to compile in 3.x without this change::
>>> def f():
... def print_error():
... print(e)
... try:
... something
... except Exception as e:
... print_error()
... # implicit "del e" here
This sample has always been invalid in Python, and now works::
>>> def outer(x):
... def inner():
... return x
... inner()
... del x
There is no need to bump the PYC magic number: the new opcode is used
for code that did not compile before.
2010-09-10 21:39:53 +00:00
Georg Brandl
bad092556e
Post-release update.
2010-09-05 21:29:17 +00:00
Georg Brandl
58a7b46075
Bump to 3.2a2.
2010-09-05 08:30:40 +00:00
Antoine Pitrou
74a69fa662
Issue #9225 : Remove the ROT_FOUR and DUP_TOPX opcode, the latter replaced
...
by the new (and simpler) DUP_TOP_TWO. Performance isn't changed, but
our bytecode is a bit simplified. Patch by Demur Rumed.
2010-09-04 18:43:52 +00:00
Victor Stinner
46408606d8
Rename PyUnicode_strdup() to PyUnicode_AsUnicodeCopy()
2010-09-03 16:18:00 +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
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
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
Daniel Stutzbach
a606faa491
Issue 5553: Improved Py_LOCAL_INLINE to actually inline under compilers other than MSC
2010-08-31 19:51:07 +00:00
Antoine Pitrou
b440aec9f9
Merged revisions 84347 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r84347 | antoine.pitrou | 2010-08-28 22:42:55 +0200 (sam., 28 août 2010) | 5 lines
Issue #4835 : make PyLong_FromSocket_t() and PyLong_AsSocket_t() private
to the socket module, and fix the width of socket descriptors to be
correctly detected under 64-bit Windows.
........
2010-08-28 20:53:24 +00:00
Antoine Pitrou
67c7ce4bef
Issue #4835 : make PyLong_FromSocket_t() and PyLong_AsSocket_t() private
...
to the socket module, and fix the width of socket descriptors to be
correctly detected under 64-bit Windows.
2010-08-28 20:42:55 +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
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
Victor Stinner
6b06da5395
Remove unused functions _PyImport_FindModule and _PyImport_IsScript
2010-08-17 22:54:21 +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
Victor Stinner
79766636b6
Issue #9599 : Create PySys_FormatStdout() and PySys_FormatStderr()
...
Write a message formatted by PyUnicode_FromFormatV() to sys.stdout and
sys.stderr.
2010-08-16 17:36:42 +00:00
Victor Stinner
f52b705be4
Create _Py_fopen() for PyUnicodeObject path
...
Call _wfopen() on Windows, or fopen() otherwise. Return the new file object on
success, or NULL if the file cannot be open or (if PyErr_Occurred()) on unicode
error.
2010-08-14 17:06:04 +00:00
Victor Stinner
4f4402c4bb
Issue #9425 : Create private _Py_stat() function
...
Use stat() or _wstat() depending on the OS.
2010-08-14 14:50:26 +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
f2e08b34f1
Create _Py_wchar2char() function, reverse of _Py_char2wchar()
...
* Use _Py_wchar2char() in _wstat() and _Py_wfopen()
* Document _Py_char2wchar()
2010-08-13 23:29:08 +00:00
Antoine Pitrou
e9b428f997
Reimplement addbuilddir() in C inside getpath.c, so as to execute it
...
at interpreter startup before importing any non-builtin modules.
Should fix #9589 .
2010-08-13 22:25:01 +00:00
Antoine Pitrou
e81c806be7
De-duplicate contents of pytime.h
2010-08-13 15:25:56 +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
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
Victor Stinner
331ea92ade
Issue #9425 : create Py_UNICODE_strrchr() function
2010-08-10 16:37:20 +00:00
Benjamin Peterson
da3b5bf3d8
correct comment
2010-08-09 15:53:58 +00:00
Antoine Pitrou
696e03553b
Issue #477863 : Print a warning at shutdown if gc.garbage is not empty.
2010-08-08 22:18:46 +00:00
Alexander Belopolsky
6fc4ade2bb
Issue #9079 : Added _PyTime_gettimeofday(_PyTime_timeval *tp) to C API
...
exposed in Python.h. This function is similar to POSIX
gettimeofday(struct timeval *tp), but available on platforms without
gettimeofday().
2010-08-05 17:34:27 +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
ee449c41b4
Post-release updates.
2010-07-31 18:05:35 +00:00
Georg Brandl
62069d3ce7
Bump versions and review NEWS file.
2010-07-31 08:56:11 +00:00
Benjamin Peterson
20f9c3c50f
revert unintended changes
2010-07-20 22:39:34 +00:00
Benjamin Peterson
013783c529
move test_trace.py so as not to conflict with future tests for the trace module
2010-07-20 22:37:19 +00:00
Stefan Krah
5bf0664175
Merged revisions 82966 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82966 | stefan.krah | 2010-07-19 14:36:57 +0200 (Mon, 19 Jul 2010) | 13 lines
Issue #9036 : Throughout the code base, Py_CHARMASK is used on 8-bit wide
signed/unsigned chars or on integers directly derived from those. In all
cases, it could be replaced by a simple cast to (unsigned char). Reasons
for the change:
a) Make the comment more explicit.
b) If char is unsigned, the cast is optimized away.
c) If char is unsigned, gcc emits spurious "array subscript
has type 'char'" warnings.
........
2010-07-19 13:00:48 +00:00
Stefan Krah
36d2e67db9
Issue #9036 : Throughout the code base, Py_CHARMASK is used on 8-bit wide
...
signed/unsigned chars or on integers directly derived from those. In all
cases, it could be replaced by a simple cast to (unsigned char). Reasons
for the change:
a) Make the comment more explicit.
b) If char is unsigned, the cast is optimized away.
c) If char is unsigned, gcc emits spurious "array subscript
has type 'char'" warnings.
2010-07-19 12:36:57 +00:00