STINNER Victor added the comment:
Ok, fixed in r88228. Not backport needed, SSLContext was introduced in Python
3.2.
--
resolution: accepted -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
STINNER Victor added the comment:
+if isinstance(message, io.TextIOWrapper):
+# Backward compatibility hack.
+message = message.buffer
Is it a good thing to parse a mailbox using a text file? If not, we should emit
a warning and maybe remove this
STINNER Victor added the comment:
> The last step is running the tests on Windows.
> Attached is the updated patch.
mailbox4.patch doesn't pass on Windows, Raymond is working on a patch.
--
___
Python tracker
<http://bugs.python
STINNER Victor added the comment:
As explained in issue #10828: Python 3.2 doesn't support non-ASCII module names
on Windows because module names are encoded to UTF-8 instead of the filesystem
encoding (the ANSI code page).
--
___
Python tr
STINNER Victor added the comment:
"Python’s import mechanism can now load modules installed in directories with
non-ASCII characters in the path name: import møøse.bites"
møøse is not a module *path*, but a module *name*... This example doesn't work
on Windows: see #3080. Modu
STINNER Victor added the comment:
Should we add imports in all examples? Eg. add import math in:
>>> repr(math.pi)
'3.141592653589793'
>>> str(math.pi)
'3.141592653589793'
At least, accumulate should be replaced by itertools.accumulate in the
following
STINNER Victor added the comment:
The import in the following example is wrong :
>>> import datetime
>>> datetime.now(timezone.utc)
...
It should be replaced by: from datetime import datetime, timezone.
--
___
Pyt
STINNER Victor added the comment:
ABCMeta should be replaced by abc.ABCMeta, or other "abc." prefixes should be
removed.
class Temperature(metaclass=ABCMeta):
@abc.abstractclassmethod
def from_fahrenheit(self, t):
...
@abc.abstractclassmethod
def from_celsi
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue7358>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
If you are still able to reproduce the bug, you may try the following module to
get a backtrace: https://github.com/haypo/faulthandler/
--
status: pending -> open
___
Python tracker
<http://bugs.pyth
STINNER Victor added the comment:
See also #6011.
--
___
Python tracker
<http://bugs.python.org/issue3080>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
title: ZipFile and CP932 encoding -> ZipFile: add a filename_encoding argument
___
Python tracker
<http://bugs.python.org/issu
STINNER Victor added the comment:
Attached patch replaces locale.getpreferredencoding() by
locale.getpreferredencoding(False) in _io.TextIOWrapper and _pyio.TextIOWrapper.
--
keywords: +patch
Added file: http://bugs.python.org/file20637/io_dont_set_locale.patch
STINNER Victor added the comment:
I opened other tickets related to PyUnicode_FromFormatV:
* #10833 :Replace %.100s by %s in PyErr_Format(): the arbitrary limit of 500
bytes is outdated
* #10831: PyUnicode_FromFormatV() doesn't support %li, %lli, %zi
* #10830: PyUnicode_FromFormat
STINNER Victor added the comment:
You can add it to MANIFEST.in.
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue11092>
___
___
Python-bugs-list m
STINNER Victor added the comment:
Since r70638, the http client encodes unicode to ISO-8859-1:
<< RFC 2616 says that iso-8859-1 is the default charset for HTTP entity
bodies, but we encoded strings using ascii. See
http://bugs.python.org/issue5314. Changed docs and code to use
iso-
STINNER Victor added the comment:
Since r7409 (14 years ago), Python does set the binary binary mode on stdin and
stdout (not stderr) if the -u flag is used:
if (unbuffered) {
#if defined(MS_WINDOWS) || defined(__CYGWIN__)
_setmode(fileno(stdin), O_BINARY);
_setmode
STINNER Victor added the comment:
> Since 2.x is closed for new features, this has to be rejected.
We can explain in ElementTree documentation how to pass non-ASCII unicode
strings: using explicit encoding to UTF-8.
--
nosy: +haypo
status: pending ->
STINNER Victor added the comment:
gcc 4.6 bug has been fixed (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47271).
So setup.py can compile extensions using gcc 4.6, and here are new warnings:
---
building dbm using bdb
/home/haypo/prog/GIT/py3k/Modules/_pickle.c: In function 'load':
/
STINNER Victor added the comment:
Can you try to get a backtrace? Use make install SHELL="bash -x" to display
executed shell commands. And then rerun the last command in gdb: after the
crash, the "where" command will give you a backtrace.
---
Changes by STINNER Victor :
--
nosy: +r.david.murray
___
Python tracker
<http://bugs.python.org/issue6>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +brett.cannon
___
Python tracker
<http://bugs.python.org/issue10971>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
You should maybe add a test into _testcapi for this issue.
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue11
STINNER Victor added the comment:
Ah, there is already a test for that: ok, it's fine and enough.
--
___
Python tracker
<http://bugs.python.org/is
New submission from STINNER Victor :
If the script filename is not decodable from the filesystem encoding, Python
fails with a UnicodeEncodeError when we reach the recursion limit. The problem
doesn't come from the user script, but from Python internals. It is difficult
to understand an
New submission from STINNER Victor :
The compileall uses print("bla", filename, "bla") to write messages to the
console. But the print fails if the filename cannot be encoded to the console
encoding. It occurs if the filename is an undecodable filename encoded by the
PEP
STINNER Victor added the comment:
> PyErr_WarnFormat
is already documented in Doc/c-api/exceptions.rst
> PyImport_ExecCodeModuleWithPathnames
is already documented in Doc/c-api/import.rst
> PyModule_GetFilenameObject
is already documented in Doc/c-api/m
STINNER Victor added the comment:
> Py_UNICODE_strcat, Py_UNICODE_strncmp, Py_UNICODE_strrchr
See issue #10435 (with a patch) for these functions.
--
___
Python tracker
<http://bugs.python.org/issu
STINNER Victor added the comment:
Georg Brandl: can this fix go into Python 3.2? It changes the API.
I like any patch rejecting unicode where unicode is irrevelant (where we don't
know how to choose the right encoding).
About the patch: you should maybe add a test to ensure that s
STINNER Victor added the comment:
Le jeudi 10 février 2011 à 16:41 +, Ross Lagerwall a écrit :
> Ross Lagerwall added the comment:
>
> 32-bit computers can address up to 4GiB of memory
... at least 4 GB. With PAE (Physical Address Extension), we can address
up to 2^36 bytes.
STINNER Victor added the comment:
Another remark. In the "poplib" section, there is a paragraph about asyncore: I
don't see how both are related.
--
___
Python tracker
<http://bugs.pyt
STINNER Victor added the comment:
In the What's new in 3.2: there is no mention of the PEP 3003 (Python Language
Moratorium). May we add a section "What is not new in 3.2"? :-) This PEP is
something specific to Python 3.2.
--
___
STINNER Victor added the comment:
It looks like your patch fixes #10829: you should add tests for that, you can
just reuse the tests of my patch (attached to #10829).
---
unicode_format() looks suboptimal.
+memset(buffer, ' ', width);
+width_unicode = PyUnicode_FromStr
New submission from STINNER Victor :
If you have an undecodable filenames on UNIX, Python 3 escapes undecodable
bytes using surrogates. pydoc: HTMLDoc.index() uses indirectly os.listdir()
which does such operation, and later filenames are encoded to UTF-8 (the whole
HTML content is encoded to
STINNER Victor added the comment:
Oops, my isUndecodableFilename() example is wrong. PEP 383 only uses
U+DC80..U+DCFF range:
def isUndecodableFilename(filename):
return any((0xDC80 <= ord(ch) <= 0xDCFF) for ch in filename)
Example of undecodable filename: b'bla\xe9\xff.py&
New submission from STINNER Victor :
Since version 3.2, Python uses the locale encoding in
PyUnicode_EncodeFSDefault() using _Py_wchar2char() and _Py_char2wchar() until
the codec registry is initialized and the locale codec is loaded (until
initfsencoding() is done).
Before Python 3.2
Changes by STINNER Victor :
--
components: +Unicode
___
Python tracker
<http://bugs.python.org/issue11187>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
test_undecodable_code() in test_cmd_line had a similar issue: on FreeBSD,
Solaris and Mac OS X, even if the locale is C (and nl_langinfo(CODESET)
announces ASCII), _Py_char2wchar() (mbstowcs) decoded b'\xff' as '\xff' (use
ISO-8859-1 e
STINNER Victor added the comment:
See also issue #11193 (another locale issue on AIX).
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue11
STINNER Victor added the comment:
> can we use str.encode() function to convert string into bytes ?
Can you try different ZIP archivers to check which encoding is expected?
WinZip, WinRAR, 7-zip, "zip" command line program on Linux, etc.
And do you have any reference into a ZIP
New submission from STINNER Victor :
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilenameObject(int, const
char *); has a strange prototype: "FilenameObject" usually indicates a
PyObject* argument, not a char* argument. The function doesn't exist in
Python/errors.c,
STINNER Victor added the comment:
> File ".../Lib/test/test_time.py", line 351, in test_mktime
>self.assertEqual(time.mktime(tt), t)
> OverflowError: mktime argument out of range
I don't know which values are "out of range". But I guess that the test f
STINNER Victor added the comment:
> I don't understand why the test pass on FreeBSD, Solaris and
> Mac OS X, but not on AIX.
Oh, the command line and the filesystem encodings may be different.
test_undecodable_env() of test_subprocess.py uses os.environ which uses
sys.getfilesys
STINNER Victor added the comment:
>>> sys.getfilesystemencoding()
'iso8859-1'
Ok, I expected this result.
Can you also try:
$ LC_ALL=C ./python -c "import sys; print(ascii(sys.argv))" $(echo -ne
"abc\xff")
['-c', 'abc\udcff']
$ LC_A
STINNER Victor added the comment:
test.jml is a ZIP archive, not a gzip archive.
"gzip -d" is kind enough to unpack it even if it is ZIP file and not a gzip
file.
So it's not a Python bug at all.
--
nosy: +haypo
resolution: -> invalid
stat
STINNER Victor added the comment:
> So test_negative is now OK
Ok, I converted your comment to a patch: strftime_aix.patch.
--
keywords: +patch
Added file: http://bugs.python.org/file20762/strftime_aix.patch
___
Python tracker
&l
STINNER Victor added the comment:
> but tm_wday = 42 did not solve the problem it seems.
Can you try with tm_yday=-1 or tm_isdst=-2?
--
___
Python tracker
<http://bugs.python.org/issu
STINNER Victor added the comment:
> http://code.google.com/p/y2038/wiki/AmazingDiscoveries
<<< AIX again
Merijn informs me that before year 0 AIX gets very, very slow. >>>
--
___
Python tracker
<http://bu
STINNER Victor added the comment:
Can you please attach your Makefile file?
In Makefile.pre.in, I see:
libpython$(VERSION).dylib: $(LIBRARY_OBJS)
VERSION should be 3.2, only LDVERSION is the VERSION + the ABI flags (eg.
3.2dm). And I don't see any usage of libpython$(LDVERSION).dyl
STINNER Victor added the comment:
Ah, there is also Mac/Makefile.in: attach also Mac/Makefile.
(and there is also Mac/PythonLauncher/Makefile.in, but I don't think that the
issue comes from this file)
((can it be related to python*-config pr
Changes by STINNER Victor :
--
nosy: +georg.brandl
___
Python tracker
<http://bugs.python.org/issue11222>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
@Georg: Is this issue a release blocker?
--
___
Python tracker
<http://bugs.python.org/issue11222>
___
___
Python-bugs-list m
STINNER Victor added the comment:
Ah ok, the issue comes from configure.in near line 779:
Darwin*)
LDLIBRARY='libpython$(LDVERSION).dylib'
BLDLIBRARY='-L. -lpython$(LDVERSION)'
RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue11223>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
> I will try with pdb or something.
You can also try to attach gdb to the running process: with
python-gdb.py, you have nice py-* commands.
Or if you don't have gdb7, you may try my faulthandler module: you will
have to modify the source code (eg.
New submission from STINNER Victor :
len(ur'\u') == len(u'\u') == 1
len(ur'\U0010') == len(u'\U0010') == 1
but
>>> len(ur'\n'), len(u'\n')
(2, 1)
>>> len(ur'\x00'), len(u'\x00'
STINNER Victor added the comment:
> Python 2.x could not be changed, for compatibility reasons.
Well, it is not a bug because it is documented!
<< When an 'r' or 'R' prefix is used in conjunction with a 'u' or 'U' prefix,
then the \u an
STINNER Victor added the comment:
> Here is what faulthandler reports when I trigger it as Python
> is locked in test_socket:
> ...
> File ".../Lib/test/fork_wait.py", line 30 in f
faulthandler doesn't print the source code line (yet?). Here is the code:
class
STINNER Victor added the comment:
Short answer:
In Python 3.2, « import héhé » doesn't work on Windows, but you can have
non-ASCII paths in sys.path.
Longer answer:
I fixed the import machinery to handle correctly non-ASCII characters in module
*paths*. But the import machinery is u
New submission from STINNER Victor :
There are 5 different usages of the bytes() constructor:
1) bytes(iterable_of_ints) -> bytes
2) bytes(string, encoding[, errors]) -> bytes
3) bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer
4) bytes(memory_view) -> bytes
5) bytes(i
STINNER Victor added the comment:
> These are AFAIR the same.
So the docstring should also maybe be updated too:
$ python
>>> help(bytes)
Help on class bytes in module builtins:
class bytes(object)
| bytes(iterable_of_ints) -> bytes
| bytes(string, encoding[, errors]) -&g
STINNER Victor added the comment:
The problem occurs on import (import bla reads bla.py), when Python tries to
create bla.pyc. The problem is that Python stores the timestamp as 4 bytes in
.pyc files, whereas time_t is 64 bits on Windows (at least on Windows XP with
Visual Studio).
To
STINNER Victor added the comment:
> To support bigger timestamps, we have to change the file format
> of .pyc files.
write_compiled_module(), check_compiled_module() and other functions use the
marshal module to read/write binary file, but marshal has no function for
int64_t, only fo
STINNER Victor added the comment:
Oh, this issue was already fixed by r87666 to fix the duplicate issue #8278.
--
nosy: +haypo
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
STINNER Victor added the comment:
> Oh, this issue was already fixed by r87666
... in py3k, and then merged into release31-maint (r87668) and release27-maint
(r87669).
--
___
Python tracker
<http://bugs.python.org/iss
STINNER Victor added the comment:
> Shouldn't module time be changed to use a cross-platform implementation
> that uses a 64 bit time_t-like type? Apparently Perl 6 has made the
> equivalent change.
The error occurs on time.gmtime(t): even if we use 64 bits time_t type, we have
STINNER Victor added the comment:
> > It looks like your patch fixes #10829: you should add tests for that, you
> > can just reuse the tests of my patch (attached to #10829).
>
> Sorry, but I think my patch doesn't fix #10829.
Ah ok, so don't add failing tests :-
New submission from STINNER Victor :
Issue #9003 added cafile and capath arguments to url_open(), but it is not
possible to reuse a SSLContext object (which would avoid to reload
certificates, CRL, etc.).
--
components: Library (Lib)
messages: 128779
nosy: haypo, pitrou
priority
STINNER Victor added the comment:
Oh, my patch is incomplete: time2netscape() has the same issue.
--
___
Python tracker
<http://bugs.python.org/issue5
STINNER Victor added the comment:
> Oh, what if the trunked char* cannot be decoded correctly?
> e.g. a tow-bytes character is divided in the middle?
Yes, but PyUnicode_FromFormatV() uses UTF-8 decoder with replace error handler,
and so the incomplete byte sequence will be replaced by
STINNER Victor added the comment:
No, I forgot to upload it...
--
keywords: +patch
Added file: http://bugs.python.org/file20785/cookiejar_datetime.patch
___
Python tracker
<http://bugs.python.org/issue5
STINNER Victor added the comment:
If datetime.strftime() is not reliable, we should maybe fix it instead of using
a workaround?
--
___
Python tracker
<http://bugs.python.org/issue5
New submission from STINNER Victor :
While testing a patch fixing issue #7330, I found a bug in
PyUnicode_FromFormat() in the %V format: it decodes the byte string from
ISO-8859-1, whereas I would expect that the string is decodes from UTF-8, as
the "%s" format.
--
messag
Changes by STINNER Victor :
--
components: +Library (Lib)
___
Python tracker
<http://bugs.python.org/issue11246>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
Removed message: http://bugs.python.org/msg128975
___
Python tracker
<http://bugs.python.org/issue8650>
___
___
Python-bugs-list m
Changes by STINNER Victor :
--
Removed message: http://bugs.python.org/msg128976
___
Python tracker
<http://bugs.python.org/issue8651>
___
___
Python-bugs-list m
STINNER Victor added the comment:
I removed Antoine's message because it was related to issue #8650.
--
___
Python tracker
<http://bugs.python.org/i
STINNER Victor added the comment:
Woops, I removed a duplicate message of Antoine. in this issue instead of
#8651. Removed message:
-
> Fixed by r87729.
This only addresses the compress() and decompress() functions, but e.g. crc32()
and adler32() are also touched by this is
STINNER Victor added the comment:
> Confirmed on Python 3.2 (winxp).
> The problem doesn't seem to exist on 3.1.3.
Can you try Python 3.1 with -u command line flag?
I changed Python 3.2 to always open all files in binary module, not only if -u
flag is used. I had also to fix th
STINNER Victor added the comment:
+text = PyUnicode_FromFormat(b'repr=%V', 'abcdef', b'abcdef')
+self.assertEqual(text, 'repr=abcdef')
How do you know which argument is used? For example, you should use instead
'abc' and b
STINNER Victor added the comment:
Fixed by r88476. I prefer to only change it in Python 3.3, so no backport.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
STINNER Victor added the comment:
Fixed by r88478.
> Not sure this can make it into stable branches.
I agree, I prefer to not touch stable releases.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bug
STINNER Victor added the comment:
r88480 removes the filename variable: use gdb7+python-gdb.py or the
faulthandler module to get a Python backtrace.
--
___
Python tracker
<http://bugs.python.org/issue11
Changes by STINNER Victor :
--
resolution: -> fixed
status: open -> closed
versions: -Python 3.2
___
Python tracker
<http://bugs.python.org/issue11168>
___
__
STINNER Victor added the comment:
Fixed in 3.3 (r88481).
Keep it open to backport it maybe to 3.2 later.
--
status: open -> pending
___
Python tracker
<http://bugs.python.org/issu
STINNER Victor added the comment:
Do adler32() and crc32() support length up to UINT32_MAX? Or should we maybe
limit the length to INT32_MAX?
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue11
STINNER Victor added the comment:
Well, the main problem is that there are 3 different codes to parse the format
string, and each code is different... Attached patch factorizes the code:
create one subfunction parse_format_flags(). It fixes also this issue and
prepares the work to fix #10831
New submission from STINNER Victor <[EMAIL PROTECTED]>:
"import re: re.finditer("a", {})" crash on Python 2.x (tested with svn
trunk) because of an invalid use of PyObject_NEW/PyObject_DEL. The
error is in pattern_scanner(), in block "if (!string) { ... }".
New submission from STINNER Victor <[EMAIL PROTECTED]>:
"import bisect; bisect.insort(range(4), -1, -1)" goes into an
unlimited loop. Workaround: replace negative lo value by zero. The
function may raise an exception.
--
components: Library (Lib)
files: bisect_l
New submission from STINNER Victor <[EMAIL PROTECTED]>:
msgid of gettext(), dgettext(), dcgettext() C functions can not be
NULL (domainname can be NULL): "import locale; locale.gettext(None)"
generates a segfault.
domainname argument of bindtextdomain() have to be a n
New submission from STINNER Victor <[EMAIL PROTECTED]>:
If locale.strcoll(a, b) fails because PyUnicode_FromObject(b) fails,
refcount of a is wrong. Attached patch fixes the problem.
--
components: Library (Lib)
files: locale_strcoll_rel1.patch
keywords: patch
messages: 6933
STINNER Victor <[EMAIL PROTECTED]> added the comment:
Example to reproduce the bug:
import locale; locale.strcoll(u"a", None)
___
Python tracker <[EMAIL PROTECTED]>
<http://
New submission from STINNER Victor <[EMAIL PROTECTED]>:
fileio_init() calls PyMem_Free(name); whereas name comes from
PyArg_ParseTupleAndKeywords().
Attached patch removes this invalid call.
The bug may also affect Python3.0.
--
components: Library (Lib)
STINNER Victor <[EMAIL PROTECTED]> added the comment:
@georg.brandl: The error is an Heisenbug. Yes, sometimes it doesn't
crash, but recheck in Valgrind ;-)
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.
New submission from STINNER Victor <[EMAIL PROTECTED]>:
Functions mbstreamwriter_dealloc() and mbstreamreader_dealloc() of
Modules/cjkcodecs/multibytecodec.c uses Py_DECREF() to free stream
attribute memory, but this attribute may be NULL if MultibyteCodec or
MultibyteStreamReader const
New submission from STINNER Victor <[EMAIL PROTECTED]>:
Example:
>>> import audioop
>>> audioop.findmax(''.join( chr(x) for x in xrange(256)), -2392392)
Erreur de segmentation (core dumped)
The problem is that audioop_findmax() doesn't check le
STINNER Victor <[EMAIL PROTECTED]> added the comment:
Hum, the bug is maybe specific to Python build with --with-pydebug. I
don't know exactly the behaviour changes of the PYDEBUG option.
@effbot: in my patch, I replaced PyObject_DEL (PyObject_FREE) and not
PyObject_Del
New submission from STINNER Victor <[EMAIL PROTECTED]>:
newDBObject(), called by DB_construct(), doesn't check correctly the
result of all to the external function db_create(). It checks if
self->db is NULL, but db_create() doesn't change self->db value on
er
STINNER Victor <[EMAIL PROTECTED]> added the comment:
The bug occurs on db_create() failure. Dummy example to reproduce it:
"import _bsddb; _bsddb.DB(None, 29.515)"
___
Python tracker <[EMAIL PROTECTED]>
<http://
New submission from STINNER Victor <[EMAIL PROTECTED]>:
Call BZ2File_iternext() on closed file doesn't release the lock.
Example:
---
import bz2
obj = bz2.BZ2File('/etc/issue')
obj.close()
try:
# acquire the lock
obj.next()
except ValueError, err:
#
3601 - 3700 of 35284 matches
Mail list logo