[issue10451] memoryview can be used to write into readonly buffer

2011-01-20 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue10451> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10952] Don't normalize module names to NFKC?

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: > There is also issue c) what if the filesystem encoding can only > represent a compatibility character, say U+00B5, but not its NFKC > equivalent, U+03BC? It is the same problem than not being able to write U+03BC with a keyboard: in this setup, do

[issue3080] Full unicode import system

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: > Victor, could you please create a Reitveld review for this? Yes, but not yet. I have first to cleanup the patch. -- ___ Python tracker <http://bugs.python.org/iss

[issue10923] Deadlock because of the import lock when loading the utf8 codec

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: > If the import lock is changed to raise an exception, > heaps of multi-threaded software will be broken. You are right. It has done so for 12 years already (10011), so it's a bit late to do anything about it. And backward compatibility is very im

[issue10923] Deadlock because of the import lock when loading the utf8 codec

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: > for 12 years already (10011) Oops, it's r10011 (to get a nice URL on the commit). -- ___ Python tracker <http://bugs.python.org

[issue10923] Deadlock because of the import lock when loading the utf8 codec

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: See also issue #9260 for a possible improvment. -- ___ Python tracker <http://bugs.python.org/issue10923> ___ ___ Python-bug

[issue9260] A finer grained import lock

2011-01-20 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue9260> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3080] Full unicode import system

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: > Use "U" format to parse a module name, and "%R" to format a module name > (to escape surrogates characters and add quotes, instead of > "... '%.200s' ..."). See also #8754: repr() is better than str() for o

[issue10955] Possible regression with stdlib in zipfile

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: It should be a regression introduced by #8611 or #9425. -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue10

[issue10955] Possible regression with stdlib in zipfile

2011-01-20 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +georg.brandl priority: normal -> release blocker ___ Python tracker <http://bugs.python.org/issue10955> ___ ___ Python-

[issue10955] Possible regression with stdlib in zipfile

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: zipimport decodes filenames of the archive from cp437 or UTF-8 (depending on a flag in each file entry). Python has a builtin UTF-8 codec, but no cp437 builtin codec. You should try to add encodings/cp437.py to your python3.2/ directory, or to build a ZIP

[issue10955] Possible regression with stdlib in zipfile

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: Restore priority to normal: this is a workaround, and a better fix cannot be done before 3.2 final. -- priority: release blocker -> normal ___ Python tracker <http://bugs.python.org/issu

[issue10955] Possible regression with stdlib in zipfile

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: The regression was introduced in r85690: use the correct encoding to decode the filename from the ZIP file. Attached patch fixes the bootstrap issue. -- keywords: +patch Added file: http://bugs.python.org/file20465/issue10955.patch

[issue10955] Possible regression with stdlib in zipfile

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: Le jeudi 20 janvier 2011 à 18:15 +, Amaury Forgeot d'Arc a écrit : > But if the zip file contains the stdlib *and* some other custom > modules with cp437 names, the whole operation will fail; it can be the > case with py2exe applicatio

[issue10952] Don't normalize module names to NFKC?

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: > A packaging mechanism that prepares code developed on a Latin-1 > filesystem for distribution, would have to NFKC-normalize > filenames before encoding them using UTF-8. It causes portability issues: if you copy a non-ASCII module on a new host, th

[issue3080] Full unicode import system

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: Version 4 of the patch. -- Added file: http://bugs.python.org/file20474/issue3080-4.patch ___ Python tracker <http://bugs.python.org/issue3

[issue3080] Full unicode import system

2011-01-20 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file20448/issue3080-3.patch ___ Python tracker <http://bugs.python.org/issue3080> ___ ___ Python-bug

[issue3080] Full unicode import system

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: Same patch (version 4) generated by svn. -- Added file: http://bugs.python.org/file20475/issue3080-4-svn.patch ___ Python tracker <http://bugs.python.org/issue3

[issue3080] Full unicode import system

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: You can review the patch with Rietveld: http://codereview.appspot.com/3972045 -- ___ Python tracker <http://bugs.python.org/issue3

[issue3080] Full unicode import system

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: Oops, there is a dummy typo in imp_init_builtin() that makes test_importlib to crash (which proves that importlib has a good coverage :-)): replace "s:" by "U:" in if (!PyArg_ParseTuple(args, &qu

[issue3080] Full unicode import system

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: test_reprlib fails on Windows, because '\' in quoted '\\' in the filename on repr(module). Workaround: *** index b0dc4d7..e476941 100644 --- a/Lib/test/test_reprlib.py +++ b/Lib/test/test_reprlib.py @@ -234,7 +234,7 @@ class LongReprTe

[issue3080] Full unicode import system

2011-01-20 Thread STINNER Victor
STINNER Victor added the comment: test_runpy fails on Windows on make_legacy_pyc() (of test.support), I don't know why. -- ___ Python tracker <http://bugs.python.org/i

[issue3080] Full unicode import system

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: > except for the segfault in test_importlib. Yes, as reported in my previous comment :-) Let's update the patch for practical reasons. But I don't want to touch http://codereview.appspot.com/1874048 (based on patch version 4). -- Add

[issue3080] Full unicode import system

2011-01-21 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file20474/issue3080-4.patch ___ Python tracker <http://bugs.python.org/issue3080> ___ ___ Python-bug

[issue3080] Full unicode import system

2011-01-21 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file20475/issue3080-4-svn.patch ___ Python tracker <http://bugs.python.org/issue3080> ___ ___ Python-bug

[issue10955] Possible regression with stdlib in zipfile

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: > No, your change is in the read_directory() function, > which reads the whole archive the first time it's used. Oh, I though that read_directory() only reads files one by one. -- ___ Python tra

[issue10955] Possible regression with stdlib in zipfile

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: Ronald Oussoren and Amaury Forgeot d'Arc: do you think that it is an acceptable limitation to only accept ASCII filenames in python32.zip? (not in all ZIP files, just in the file loaded at startup) All possible solutions: a) Only accept ASCII filenam

[issue10971] python Lib/test/regrtest.py -R 3:3: test_zipimport_support fails

2011-01-21 Thread STINNER Victor
New submission from STINNER Victor : "./python Lib/test/regrtest.py test_zipimport_support" pass, but not with the -R option. $ ./python Lib/test/regrtest.py -R 3:3: test_zipimport_support [1/1] test_zipimport_support beginning 6 repetitions 123456 test test_zipimport_supp

[issue10955] Possible regression with stdlib in zipfile

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: Oh, py2app is implemented in Python and use the zipfile module. So if we can control how the filename is encoded, we can fix py2app to workaround this limitation :-) 7zip and WinRAR uses the same algorithm than ZipFile._encodeFilename(): try cp437 or use

[issue10972] zipfile: add unicode option to the choose filename encoding

2011-01-21 Thread STINNER Victor
New submission from STINNER Victor : ZipInfo._encodeFilename() tries cp437 encoding or use UTF-8. It is not possible to decide the encoding. To workaround #10955 (bootstrap issue with python32.zip), it would be nice to be able to create a ZIP file using only UTF-8 filenames. Attached patch

[issue10972] zipfile: add unicode option to the choose filename encoding

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: Oh, this patch fixes also a bug: ZipFile._RealGetContents() doesn't keep the unicode flag, so open a ZIP file and then write it somewhere else may change the unicode flag if unicode flag was set but the filename is also encodable to UTF-8 (eg. ASCII fil

[issue10955] Possible regression with stdlib in zipfile

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: #10972 has a patch for zipfile to set the filename encoding if a ZipInfo object (to force the encoding to UTF-8). -- ___ Python tracker <http://bugs.python.org/issue10

[issue10972] zipfile: add unicode option to the choose filename encoding

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: 7zip and WinRAR uses the same algorithm than ZipFile._encodeFilename(): try cp437 or use UTF-8. Eg. if a filename contains ∞ (U+221E), it is encoded to UTF-8. WinZIP encodes all filenames to cp437: ∞ (U+221E) is replaced by 8 (U+0038), ☺ (U+263A) is

[issue10972] zipfile: add "unicode" option to the force the filename encoding to UTF-8

2011-01-21 Thread STINNER Victor
Changes by STINNER Victor : -- title: zipfile: add unicode option to the choose filename encoding -> zipfile: add "unicode" option to the force the filename encoding to UTF-8 ___ Python tracker <http://bugs.pytho

[issue10955] Possible regression with stdlib in zipfile

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: On Linux, the "zip" command line program (InfoZIP zip program) only sets the unicode flag if it is able to set the locale to "en_US.UTF-8". It can do better: check if the locale encoding is UTF-8, and only "en_US.UTF-8" locale

[issue10972] zipfile: add "unicode" option to the force the filename encoding to UTF-8

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: > What kind of problem are you trying to solve? Support non-ASCII filenames in python32.zip (#10955): at bootstrap, Python 3.2 can only use UTF-8 codec (not cp437). But I suppose also that forcing the encoding to UTF-8 gives a better Unicode support (w

[issue10955] Possible regression with stdlib in zipfile

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: Patch version 2: display a more useful error message: $ python Fatal Python error: Py_Initialize: Unable to get the locale encoding NotImplementedError: bootstrap issue: python32.zip contains non-ASCII filenames without the unicode flag Aborted Instead of

[issue10973] 'ñ' not working with IDLE 3.2rc1 - OSX 10.6.6

2011-01-21 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue10973> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10955] Possible regression with stdlib in zipfile

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: > I cannot avoid haveing non-ascii filenames when a python package > contains data files that have such names. Are "data files" Python modules (.py files)? Or can it be anything? -- ___ Pytho

[issue10972] zipfile: add "unicode" option to the force the filename encoding to UTF-8

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: > The question is, rather, why you need an external flag for that. Because I don't want to change the default encoding. I am not sure that all applications support UTF-8 encodings. But if you control your environment, force UTF-8 encoding should impr

[issue10973] 'ñ' not working with IDLE 3.2rc1 - OSX 10.6.6

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: No problem on Linux (Debian Sid): I tried "ŁñØ=1" in IDLE interpreter (written using the compose key). It looks like the bug is specific to Mac OS X and comes from Tk directly: http://sourceforge.net/tracker/index.php?func=detail&aid=2907388&

[issue10973] 'ñ' not working with IDLE 3.2rc1 - OSX 10.6.6

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: > I cannot start IDLE by double-clicking its icon in the Finder. You may open a new issue for this proble. -- ___ Python tracker <http://bugs.python.org/issu

[issue3080] Full unicode import system

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: > but I'm going to have trouble diagnosing things that don't fail > on my development machine. On Windows, try any character not encodable into your ANSI code page (eg. Ł with cp1252) in the module path and non-ASCII characters in the module

[issue3080] Full unicode import system

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: I tried issue3080-5.patch. The whole test suite pass on Windows. It pass also on Linux with "-Wd -Werror -R 3:3:" (except #10971 which is unrelated to this issue). I should maybe add some unit tests for non-ASCII module paths and non-ASCII mo

[issue8754] ImportError: quote bad module name in message

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: My patch for #3080 uses repr() to format module name in all error messages. -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue8

[issue10614] ZipFile and CP932 encoding

2011-01-21 Thread STINNER Victor
STINNER Victor added the comment: In #10972, I propose to add an option for the filename encoding to UTF-8. But I would like to force UTF-8 to create a ZIP file, it doesn't concern the decompression of a ZIP file. Proposal of a specification to fix both issues at the same

[issue10955] Possible regression with stdlib in zipfile

2011-01-22 Thread STINNER Victor
STINNER Victor added the comment: georg.brandl> Patch #2 looks innocent enough to me, georg.brandl> and is clearly an improvement. Ok, issue fixed by r88140 (+r88141): Issue #10955: zipimport uses ASCII encoding instead of cp497 to decode filenames, at bootstrap, if the codec registry

[issue10980] http.server Header Unicode Bug

2011-01-22 Thread STINNER Victor
STINNER Victor added the comment: Extract of PEP : << Note also that strings passed to start_response() as a status or as response headers must follow RFC 2616 with respect to encoding. That is, they must either be ISO-8859-1 characters, or use RFC 2047 MIME encoding. >>

[issue10980] http.server Header Unicode Bug

2011-01-22 Thread STINNER Victor
STINNER Victor added the comment: RFC 5987 (Character Set and Language Encoding for Hypertext Transfer Protocol (HTTP) Header Field Parameters), August 2010: http://greenbytes.de/tech/webdav/rfc5987.html#language.specification.in.encoded.words << 3.3 Language Specification in Encoded

[issue10989] ssl.SSLContext(True).load_verify_locations(None, True) segfault

2011-01-23 Thread STINNER Victor
New submission from STINNER Victor : ssl.SSLContext(True).load_verify_locations(None, True) does segfault. Py_DECREF(cafile_bytes) in Modules/_ssl.c:1686 should be replaced by Py_XDECREF(cafile_bytes). -- components: Library (Lib) messages: 126901 nosy: haypo, pitrou priority: normal

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-24 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue9124> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11004] AssertionError on collections.deque().count(1)

2011-01-25 Thread STINNER Victor
New submission from STINNER Victor : Attached script, bug.py, ends with: $ python3.2 source2.py deque.remove(x): x not in deque python: ./Modules/_collectionsmodule.c:536: deque_count: Assertion `leftblock->rightlink != ((void *)0)' failed. Abandon (core dumped) -- co

[issue11005] Assertion error on RLock._acquire_restore

2011-01-25 Thread STINNER Victor
New submission from STINNER Victor : Attached script (bug2.py) ends with: $ ~/prog/SVN/py3k/python bug2.py python: ./Modules/_threadmodule.c:399: rlock_acquire_restore: Assertion `self

[issue11004] AssertionError on collections.deque().count(1)

2011-01-25 Thread STINNER Victor
Changes by STINNER Victor : -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue11004> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11004] AssertionError on collections.deque().count(1)

2011-01-25 Thread STINNER Victor
STINNER Victor added the comment: deque.patch: I'm unable to say if the patch is correct or not, but it is always a good thing to remove asser(...) :-) -- ___ Python tracker <http://bugs.python.org/is

[issue10973] OS X 10.6 IDLE, tkinter: Cocoa Tk 8.5 crash when composite character typed in text field

2011-01-25 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker <http://bugs.python.org/issue10973> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11010] Unicode BOM left in loaded text

2011-01-25 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue11010> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-25 Thread STINNER Victor
STINNER Victor added the comment: mailbox.patch: - open files in binary mode not as text - parse as bytes not as Unicode - replace email.generator.Generator() by email.generator.BytesGenerator() - use .message_from_bytes() instead of .message_from_str() - use .message_from_binary_file

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-25 Thread STINNER Victor
STINNER Victor added the comment: While working on this issue, I found and fixed two bugs in the email binary parser: r88196 and r88197. -- ___ Python tracker <http://bugs.python.org/issue9

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-26 Thread STINNER Victor
STINNER Victor added the comment: > I reverted r88197 because it was incorrect and caused an email test > to fail. Once I come up with a test for it I'll fix it correctly. test_mailbox is a good (indirect) test suite for this change. The problem of r88197 is that it replaces msg.

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-26 Thread STINNER Victor
STINNER Victor added the comment: All test_email and test_mailbox pass with mailbox.patch+BytesGenerator_handle_text.patch on Windows except one test: == ERROR: test_set_item (test.test_mailbox.TestBabyl

[issue11019] BytesGenerator fails if the Message body is None

2011-01-26 Thread STINNER Victor
STINNER Victor added the comment: (Patch without patch from #9124) -- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file20535/BytesGenerator_handle_text.patch ___ Python tracker <http://bugs.python.org/issue11

[issue11019] BytesGenerator fails if the Message body is None

2011-01-26 Thread STINNER Victor
STINNER Victor added the comment: The new test fails without the fix, and it pass with the fix. The fix itself looks correct because I wrote a similar patch :-) Go on. -- ___ Python tracker <http://bugs.python.org/issue11

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-26 Thread STINNER Victor
STINNER Victor added the comment: pitrou> There's a missing conversion in mailbox.patch. pitrou> Running with -bb shows the issue. pitrou> Here is an updated patch. Good catch: test_mailbox now pass on Windows. -- Some remarks on mailbox2.patch. get_string() returns a b

[issue11022] locale.setlocale() doesn't change I/O codec, os.environ[] does

2011-01-27 Thread STINNER Victor
STINNER Victor added the comment: > - Using locale.setlocale(..., ...) > - Re-open causes same error, I/O layer codec has not been changed! Yes, this is the expected behaviour with the current code. TextIOWrapper uses indirectly locale.getpreferredencoding() to choose your file encodi

[issue11022] locale.setlocale() doesn't change I/O codec, os.environ[] does

2011-01-27 Thread STINNER Victor
STINNER Victor added the comment: > This bug may be based on same problem as Issue 6203. Nope, both issues are different. Here you want that TextIOWrapper reads your current locale, and not your environment variables. Issue #6203 asks why LC_CTYPE is not C by default, but the user loc

[issue6203] 3.x locale does not default to C, contrary to the documentation and to 2.x behavior

2011-01-27 Thread STINNER Victor
STINNER Victor added the comment: > To add a little bit more analysis: posix.device_encoding requires that > the LC_CTYPE is set. Setting it just in this function would not be > possible, as setlocale is not thread-safe. open() does indirectly (locale.getpreferredencoding()) change

[issue4177] Crash in MIMEText on FreeBSD

2011-01-27 Thread STINNER Victor
STINNER Victor added the comment: > Something is very wrong with our code too. I have dumped the text > that's cousing the "freeze" and run it using the test case scripts. > It worked slow, but worked. I retried test_MIMEText.tar.bz2 on FreeBSD 8.0 with 640 MB of memor

[issue10952] Don't normalize module names to NFKC?

2011-01-27 Thread STINNER Victor
STINNER Victor added the comment: It looks like there is nothing interesting to do here, so I close the issue (which is not a bug :-)). -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue11022] locale.setlocale() doesn't change I/O codec, os.environ

2011-01-27 Thread STINNER Victor
STINNER Victor added the comment: Set version to 3.3, I think that it is too late to change such critical code in Python 3.2. -- versions: +Python 3.3 -Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/issue11

[issue11022] locale.setlocale() doesn't change I/O codec, os.environ

2011-01-27 Thread STINNER Victor
STINNER Victor added the comment: > upon program startup, init LibC environment: setlocale(LC_ALL, ""); Python 3 does something like that: Py_InitializeEx() calls setlocale(LC_CTYPE, ""). But I (and others) consider that as a bug (see #6203 discussion): Python shou

[issue11032] _string: formatter_field_name_split() and formatter_parser doesn't check input type

2011-01-27 Thread STINNER Victor
New submission from STINNER Victor : $ ./python Python 3.2rc1+ (unknown, Jan 18 2011, 00:55:20) >>> import _string >>> _string.formatter_field_name_split(1) python: Objects/stringlib/string_format.h:1347: formatter_field_name_split: Assertion `((PyObject*)(self))-&g

[issue10989] ssl.SSLContext(True).load_verify_locations(None, True) segfault

2011-01-27 Thread STINNER Victor
STINNER Victor added the comment: Here is a patch including a test. The test pass on regrtest with -R 3:3: (no reference leak). -- keywords: +patch Added file: http://bugs.python.org/file20563/ssl.patch ___ Python tracker <http://bugs.python.

[issue10989] ssl.SSLContext(True).load_verify_locations(None, True) segfault

2011-01-28 Thread STINNER Victor
STINNER Victor added the comment: Should it be fixed in Python 3.2 or not? (load_verify_locations was introduced with SSLContext in Python 3.2) -- priority: high -> release blocker ___ Python tracker <http://bugs.python.org/issu

[issue10989] ssl.SSLContext(True).load_verify_locations(None, True) segfault

2011-01-29 Thread STINNER Victor
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

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-29 Thread STINNER Victor
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

[issue9124] Mailbox module should use binary I/O, not text I/O

2011-01-29 Thread STINNER Victor
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

[issue3080] Full unicode import system

2011-01-31 Thread STINNER Victor
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

[issue11071] What's New review comments

2011-01-31 Thread STINNER Victor
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

[issue11071] What's New review comments

2011-01-31 Thread STINNER Victor
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

[issue11071] What's New review comments

2011-01-31 Thread STINNER Victor
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

[issue11071] What's New review comments

2011-01-31 Thread STINNER Victor
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

[issue7358] cPickle crash on failed assertion

2011-01-31 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue7358> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8176] Interpreter crash with "double free or corruption" message

2011-01-31 Thread STINNER Victor
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

[issue3080] Full unicode import system

2011-01-31 Thread STINNER Victor
STINNER Victor added the comment: See also #6011. -- ___ Python tracker <http://bugs.python.org/issue3080> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10614] ZipFile: add a filename_encoding argument

2011-01-31 Thread STINNER Victor
Changes by STINNER Victor : -- title: ZipFile and CP932 encoding -> ZipFile: add a filename_encoding argument ___ Python tracker <http://bugs.python.org/issu

[issue11022] locale.setlocale() doesn't change I/O codec, os.environ does

2011-01-31 Thread STINNER Victor
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

[issue7330] PyUnicode_FromFormat segfault

2011-02-01 Thread STINNER Victor
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

[issue11092] Setup.cfg isn't packaged when running sdist

2011-02-01 Thread STINNER Victor
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

[issue11082] ValueError: Content-Length should be specified

2011-02-02 Thread STINNER Victor
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-

[issue11098] syntax error at end of line in interactive python -u

2011-02-02 Thread STINNER Victor
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

[issue11033] ElementTree.fromstring doesn't work with Unicode

2011-02-02 Thread STINNER Victor
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 ->

[issue10951] gcc 4.6 warnings

2011-02-02 Thread STINNER Victor
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': /

[issue11106] python 2.6.6 and python 2.7.1 cannot be built successfully because of an segment fault on NetBSD-5.1-sparc

2011-02-03 Thread STINNER Victor
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. ---

[issue11116] (mailbox and) email (errors) -> patch

2011-02-04 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +r.david.murray ___ Python tracker <http://bugs.python.org/issue6> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10971] python Lib/test/regrtest.py -R 3:3: test_zipimport_support fails

2011-02-06 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue10971> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11149] [PATCH] Configure should enable -fwrapv for clang

2011-02-08 Thread STINNER Victor
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

[issue11149] [PATCH] Configure should enable -fwrapv for clang

2011-02-08 Thread STINNER Victor
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

[issue11168] UnicodeEncodeError on recusion limit if the script filename is undecodable

2011-02-10 Thread STINNER Victor
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

[issue11169] compileall doesn't support the PEP 383 (undecodable paths/filenames)

2011-02-10 Thread STINNER Victor
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

<    31   32   33   34   35   36   37   38   39   40   >