Martin v. Löwis
10a60b3ec0
Change Py_BuildValue to generate Unicode objects for
...
's' and 'c' codes.
Change pickle to dump bytes objects using the 'S'
code, and to load the 'S' code as byte objects.
Change datetime and array to generate and expect
bytes objects in reduce/unreduce.
2007-07-18 02:28:27 +00:00
Guido van Rossum
a8c360ee76
SF patch# 1755229 by Amaury Forgeot d'Arc: fix _winreg module and tests.
...
Untested.
2007-07-17 20:50:43 +00:00
Guido van Rossum
52b8976a03
Minimal changes to make ftplib work. Basically, this opens the stream in
...
text mode and encodes commands being sent. The default encoding is ASCII,
there's a class/instance variable 'encoding' you could set to change it.
2007-07-17 20:45:57 +00:00
Guido van Rossum
93adc5dfaf
(1) SF patch# 1755214 by Amaury Forgeot d'Arc which makes some tests
...
pass on Windows.
(2) Fix a typo in makefile() where using a text mode would attempt to set
self.mode instead of text.mode.
2007-07-17 20:41:19 +00:00
Collin Winter
dc40ae6b24
Fix two bugs from the map->itertools.imap switch.
2007-07-17 00:39:32 +00:00
Collin Winter
2c8fef07f6
Fix a bug in distutils.core's error handling.
2007-07-17 00:38:21 +00:00
Guido van Rossum
e63bae6b09
Make the test of chr() overflow pass.
...
(Sigh. There are so many redundant tests.)
2007-07-17 00:34:25 +00:00
Collin Winter
72e110c1cd
Fix a bug from the map->itertools.imap conversion.
2007-07-17 00:27:30 +00:00
Guido van Rossum
2698631d57
Make test_pickletools.py pass.
2007-07-17 00:19:46 +00:00
Guido van Rossum
1c5a98a360
Fix for cProfile.
...
SF patch# 1755176 by Amaury Forgeot d'Arc.
2007-07-16 23:36:05 +00:00
Guido van Rossum
d77d6992a5
Change a bunch of file encodings from Latin-1 to UTF-8.
...
Remove the encoding from Tix.py (it doesn't seem to need one).
Note: we still have to keep the "coding: utf-8" declaration
for files that aren't pure ASCII, as the default per PEP 3120
hasn't been implemented yet.
2007-07-16 23:10:57 +00:00
Guido van Rossum
6a2ccd0273
Fix for one particular test (test_file). There are still four errors.
...
(This is not the fix suggested by Hasan Diwan in SF patch# 1753889.)
2007-07-16 20:51:57 +00:00
Guido van Rossum
27ae52362c
Fix test_uu.py by inserting an explicit conversion from bytes to str
...
into uu.py. (This is *not* SF patch 1754339, which I rejected.)
2007-07-16 19:50:03 +00:00
Guido van Rossum
456fe5d3ca
Fix a weird use of try/finally to close a file.
...
(There are more places that don't close 'f' at all if an error occurs,
but none have a bogus try/finally pattern.)
2007-07-16 19:42:05 +00:00
Guido van Rossum
b358a2c423
SF patch# 1752647 by Joe Gregorio.
...
Fixes to make test_mmap.py pass unit tests.
Moves the interface from being string based to being bytes based.
2007-07-16 19:29:02 +00:00
Guido van Rossum
88079f472e
Use the encoding specification when reading the source file.
2007-07-15 14:02:52 +00:00
Guido van Rossum
b7d3e65b3b
Improve error handling; don't die from unicode errors or syntax errors.
2007-07-15 13:01:48 +00:00
Guido van Rossum
8ac004e698
Make chr() and ord() return/accept surrogate pairs in narrow builds.
...
The domain of chr() and the range of ord() are now always [0 ... 0x10FFFF].
2007-07-15 13:00:05 +00:00
Thomas Heller
49c12ac04e
Fix ctypes tests on OS X.
2007-07-14 18:51:36 +00:00
Thomas Heller
19b52545df
c_char, c_char_p objects and c_char array structure fields return
...
their value now as str, no longer str8.
2007-07-13 12:52:51 +00:00
Thomas Heller
27384da6e8
Do not accept str8 type in function calls any longer.
...
Accept bytes instead of str8 in the (unexposed in ctypes) BSTR type.
2007-07-13 12:07:59 +00:00
Thomas Heller
84d66a0843
Remove all the Python 2.3 compatibility markers (the Python 3 ctypes
...
version is not compatible with Python 2.x anymore).
Remove backwards compatibility code.
2007-07-13 11:49:15 +00:00
Thomas Heller
e5095e187b
Structure fields of type c_char array or c_wchar array accept bytes or
...
(unicode) string.
2007-07-13 11:19:35 +00:00
Thomas Heller
745f5e2de7
No crashes on Linux in the ctypes test suite any longer, so we can
...
remove the 'crash-protection'.
2007-07-12 20:10:18 +00:00
Thomas Heller
f4f771fe0f
Fix segfault on Linux.
2007-07-12 20:06:41 +00:00
Thomas Heller
8750384dbc
More easy fixes. The ctypes unittests pass now (on Windows).
2007-07-12 19:58:41 +00:00
Thomas Heller
d660fabd24
binascii.hexlify returns a bytes object; we must convert it to str
...
before we can pass it to re.sub.
2007-07-12 19:56:28 +00:00
Thomas Heller
0d8a1fd78d
Simple fixes.
2007-07-12 19:54:27 +00:00
Thomas Heller
d68d131d29
Simple fixes.
2007-07-12 19:45:20 +00:00
Thomas Heller
f0d8b6eee9
Simple fixes.
2007-07-12 19:42:59 +00:00
Thomas Heller
3821e31d19
c_void_p.from_param accepts bytes. Fix test_prototypes.
2007-07-12 19:38:33 +00:00
Thomas Heller
3d79dd9edf
c_char_p.from_param accepts bytes. Fix test_parameters.
2007-07-12 19:33:24 +00:00
Thomas Heller
7a76e8f67c
Fix another test.
2007-07-12 19:24:59 +00:00
Thomas Heller
9ccf468323
test_slicing does not segfault under linux anymore, so we can run this
...
test by default.
2007-07-12 19:22:10 +00:00
Thomas Heller
7775c716fc
Accept bytes as parameter to foreign functions without prototype.
...
These are passed as byte strings (unicode strings are passed as wide
character strings).
2007-07-12 19:19:43 +00:00
Thomas Heller
60831316df
Accept bytes for c_wchar_p instances and c_wchar array instances.
...
ctypes.create_unicode_buffer also accepts bytes now.
Revert some tests in test_unicode: Since string literals are unicode
now, conversion takes place when byte literals are passed as unicode
parameters.
2007-07-12 19:06:25 +00:00
Thomas Heller
2c5e96465f
Accept bytes in c_char_p and c_wchar_p types.
2007-07-12 15:41:51 +00:00
Thomas Heller
3af4266d07
ctypes.c_char and ctypes.c_wchar now accept initialization from byte objects.
2007-07-12 14:58:32 +00:00
Thomas Heller
f7c6d86832
Use a unicode string as unique_key instead of 8-bit string.
2007-07-12 13:55:37 +00:00
Thomas Heller
7c1ebe33b8
Fix a ctypes test.
2007-07-12 12:05:40 +00:00
Thomas Heller
1f498ef63d
Fix a ctypes test.
2007-07-12 11:59:52 +00:00
Thomas Heller
b0f48abd87
Skip testing the special file "/dev/tty" on Windows. This test does
...
weird things if someone has a "\dev" directory on the current drive.
2007-07-12 11:29:02 +00:00
Guido van Rossum
e409b97950
Make this a pure-ASCII file. This used to have a Latin-1 coding and
...
contain several string literals using non-ASCII characters. Because
of the pain of displaying those characters, it's better to use \xXX
escapes for these instead of typing the accented characters.
Apologies if I missed something; it didn't look like there was anything
that depended on this file being encoded in Latin-1 or containing non-ASCII
characters.
2007-07-12 09:25:21 +00:00
Guido van Rossum
fc0ffb7243
Merged revisions 56265-56300 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/branches/p3yk
........
r56274 | georg.brandl | 2007-07-11 08:10:46 -0700 (Wed, 11 Jul 2007) | 2 lines
Fix #1751965 , typo in isinstance.
........
2007-07-12 08:55:44 +00:00
Guido van Rossum
a5d0c260ac
Fix for tet_bigmem.py (the failure was caused by a spurious reference
...
to 'file', which no longer exists).
Fix inspired by Christian Heimes, SF# 1752195.
2007-07-12 08:11:23 +00:00
Guido van Rossum
652f446d42
Fixes for str/uni/bytes for gettext.py. test_gettext.py passes.
...
Fix by Christian Heimes, SF# 1751958, who writes:
I tested the fixes with the Zope3 zope.app.locales packages.
The mo files are loaded and parsed w/o any problem.
The translation with gettext.gettext is working as expected.
2007-07-12 08:04:06 +00:00
Guido van Rossum
076da0957b
Fix asynchat to use bytes instead of strings.
...
Fix by Alexandre Vassalotti, SF# 1752173.
2007-07-12 07:58:54 +00:00
Guido van Rossum
bdab7d3cb6
Fix test_poll.py. By Christian Heimes.
2007-07-11 20:43:16 +00:00
Thomas Heller
acb470c05f
Fix the test; solution found by Christian Heimes. Thanks!
2007-07-11 19:34:54 +00:00
Thomas Heller
f5af466d3a
Fix one more ctypes test, and disable the tests that were segfaulting.
...
Thanks to Christian Heimes for finding these tests.
2007-07-11 14:51:58 +00:00