[issue16218] Python launcher does not support unicode characters

2012-11-05 Thread STINNER Victor
STINNER Victor added the comment: It tests nothing on utf-8 locale (test passed even when bug is not fixed). The issue is about Windows and UTF-8 is never used as filesystem encoding on Windows. -- ___ Python tracker rep...@bugs.python.org

[issue16218] Python launcher does not support unicode characters

2012-11-05 Thread STINNER Victor
STINNER Victor added the comment: The test is still failing on Mac OS X: == FAIL: test_non_ascii (test.test_cmd_line_script.CmdLineTest) -- Traceback (most

[issue9584] Allow curly brace expansion

2012-11-05 Thread Tim Golden
Tim Golden added the comment: I've got a patch for this which applies cleanly to the 3.4 tip. I still need to sort out the Windows issues (which I don't think will be difficult; it looks like a test issue, not a code issue) -- assignee: - tim.golden

[issue9584] Allow curly brace expansion

2012-11-05 Thread Mathieu Bridon
Mathieu Bridon added the comment: I have to apologize for not following up on this patch. At first I had no time to go on pushing for it, and then (after a change of job), I completely forgot about it. :( I guess rebasing the patch on the latest tip is not that useful if you already have

[issue16218] Python launcher does not support unicode characters

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The issue is about Windows and UTF-8 is never used as filesystem encoding on Windows. The issue exists on Linux as I reported in msg173373. -- ___ Python tracker rep...@bugs.python.org

[issue9584] Allow curly brace expansion

2012-11-05 Thread Tim Golden
Tim Golden added the comment: I'm planning to refactor the tests and the code very slightly. When I've got a reworked patch I'll ping it back to you to ensure it matches your intent. IIUC you're implementing comma-separated lists {abc,def} and nested braces {a{b,c}d,efg} but not ranges {a..z}.

[issue9584] Allow curly brace expansion

2012-11-05 Thread Mathieu Bridon
Mathieu Bridon added the comment: IIUC you're implementing comma-separated lists {abc,def} and nested braces {a{b,c}d,efg} but not ranges {a..z}. Exactly. Although that's just because at the time I sent the patch, I didn't know about ranges in shells. So I just implemented the part of

[issue16281] TODO in tailmatch(): it does not support backward in all cases

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, PyUnicode_Tailmatch() documentation doesn't mention that the function can fail. But it does. .. c:function:: int PyUnicode_Tailmatch(PyObject *str, PyObject *substr, \ Py_ssize_t start, Py_ssize_t end, int direction) Return

[issue16353] add function to os module for getting path to default shell

2012-11-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: Christian, Is there ``os.confstr`` supported by MaxOS X? Is there using of environ['PATH'] makes sense as good callback if former is not present? About COMSPEC. From my point of view it's useful if we need default path. Or if we have Win9x, where shell is

[issue16353] add function to os module for getting path to default shell

2012-11-05 Thread Chris Jerdonek
Chris Jerdonek added the comment: Any interest in doing like os.get_terminal_size/shutil.get_terminal_size If functions with two different behaviors are needed, I think the two functions should probably have different names (e.g. get_shell() and get_user_shell()). Otherwise, it may create

[issue10050] urllib.request still has old 2.x urllib primitives

2012-11-05 Thread anatoly techtonik
anatoly techtonik added the comment: Please note that changes to urlretrieve to return block size 0 in callback breaks existing PyPI apps, such as http://pypi.python.org/pypi/wget It would be nice if you revert this part from http://hg.python.org/cpython/rev/53715804dc71 Also if you change

[issue10050] urllib.request still has old 2.x urllib primitives

2012-11-05 Thread anatoly techtonik
Changes by anatoly techtonik techto...@gmail.com: -- versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10050 ___ ___

[issue2636] Adding a new regex module (compatible with re)

2012-11-05 Thread Nick Coghlan
Nick Coghlan added the comment: I've been working through the known crashers list in the stdlib. The recursive import one was fixed with the migration to importlib in 3.3, the compiler one will be fixed in 3.3.1 (with an enforced nesting limit). One of those remaining is actually a

[issue16411] zlib.Decompress.decompress() retains pointer to input buffer without acquiring reference to it

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The decompressor does not hold a reference to the data object, but it holds a reference to the data. It's the unconsumed_tail attribute. The patch is simple. -- keywords: +patch Added file: http://bugs.python.org/file27891/issue16411.patch

[issue16411] zlib.Decompress.decompress() retains pointer to input buffer without acquiring reference to it

2012-11-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16411 ___ ___

[issue16413] Non cross-platform behavior of os.path.split

2012-11-05 Thread anatoly techtonik
New submission from anatoly techtonik: os.path.split('c:foo') gives ('c:', 'foo') on Windows and ('', 'c:foo') on Linux, which is not documented. IIUC, the behavior change in os module is not possible, so a documentation note will be appreciated. -- assignee: docs@python components:

[issue16413] Non cross-platform behavior of os.path.split

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: .. note:: Since different operating systems have different path name conventions, there are several versions of this module in the standard library. The :mod:`os.path` module is always the path module suitable for the operating system Python is

[issue6717] Some problem with recursion handling

2012-11-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0dfa3b09a6fe by Nick Coghlan in branch '3.2': Record a known crasher from #6717 http://hg.python.org/cpython/rev/0dfa3b09a6fe New changeset 509f7a53f8cc by Nick Coghlan in branch '3.3': Merge #6717 crasher from 3.2

[issue16281] TODO in tailmatch(): it does not support backward in all cases

2012-11-05 Thread STINNER Victor
STINNER Victor added the comment: Oh, PyUnicode_Tailmatch() documentation doesn't mention that the function can fail. But it does. .. c:function:: int PyUnicode_Tailmatch(PyObject *str, PyObject *substr, \ Py_ssize_t start, Py_ssize_t end, int direction)

[issue9405] Test fix for past crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage

2012-11-05 Thread Nick Coghlan
Nick Coghlan added the comment: Changing the type, since the crash bug has been fixed for a long time. -- nosy: +ncoghlan stage: - test needed title: crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage - Test fix for past crash when calling

[issue3367] Uninitialized value read in parsetok.c

2012-11-05 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3367 ___ ___ Python-bugs-list mailing

[issue16413] Non cross-platform behavior of os.path.split

2012-11-05 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16413 ___

[issue16413] Non cross-platform behavior of os.path.split

2012-11-05 Thread anatoly techtonik
anatoly techtonik added the comment: Historically os.path.split() on Windows is able to grok UNIX paths easily. Don't you think that Python language reference for the os.path should include less vague definition of Windows, UNIX-style and old-style MacOS paths it works with? --

[issue16413] Non cross-platform behavior of os.path.split

2012-11-05 Thread anatoly techtonik
anatoly techtonik added the comment: User story: as a Python programmer working with different systems, I'd like to know how os.path module threats paths on these systems. -- ___ Python tracker rep...@bugs.python.org

[issue16414] Add support.NONASCII to test non-ASCII characters

2012-11-05 Thread STINNER Victor
New submission from STINNER Victor: Attached patch adds support.NONASCII to have a portable non-ASCII character that can be used to test non-ASCII strings. The patch uses it in some existing functions. I wrote the patch on the default branch, we may start to use it since Python 3.2.

[issue15001] segmentation fault with del sys.module['__main__']

2012-11-05 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15001 ___ ___ Python-bugs-list

[issue16218] Python launcher does not support unicode characters

2012-11-05 Thread STINNER Victor
STINNER Victor added the comment: It skipped on locales which does not support £ (cp1006, cp1250, cp1251, cp737, cp852, cp855, cp866, cp874, cp949, euc_kr, gb2312, gbk, hz, iso2022_kr, iso8859_10, iso8859_11, iso8859_16, iso8859_2, iso8859_4, iso8859_5, iso8859_6, johab, koi8_r, koi8_u,

[issue16218] Python launcher does not support unicode characters

2012-11-05 Thread STINNER Victor
STINNER Victor added the comment: It tests nothing on utf-8 locale (test passed even when bug is not fixed). The issue is about Windows and UTF-8 is never used as filesystem encoding on Windows. The issue exists on Linux as I reported in msg173373. I don't understand your problem.

[issue16414] Add support.NONASCII to test non-ASCII characters

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think you should ensure that os.fsdecode(os.fsencode(character)) == character. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16414 ___

[issue16218] Python launcher does not support unicode characters

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Non-ASCII filenames were already supported with UTF-8 locale encoding. Test the example in msg173373. It fails without fix. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16218

[issue8913] Document that datetime.__format__ is datetime.strftime

2012-11-05 Thread Eric V. Smith
Eric V. Smith added the comment: To Heikki Partanen excellent point in the review about date __format__ strings allowing you to combine date formatting with other types of formatting: This is a great point. It's the lack of this that (for example) requires the logging module to have a

[issue5364] documentation in epub format

2012-11-05 Thread Kristof Csillag
Kristof Csillag added the comment: I have prepared a patch to build the 2.7 docs in EPUB format, too. (Since this was already done on Python 3; this is only a very simple backport of a few lines in a Makefile, a readme and a HTML download page.) -- keywords: +patch nosy: +csillag Added

[issue14266] pyunit script as shorthand for python -m unittest

2012-11-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: Is it should be separate binary? Or problem can be solved by regular python script with executable bit? What's about Windows? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14266

[issue16339] Document exec(stmt, global_dict, local_dict) form in Python 2?

2012-11-05 Thread Mark Dickinson
Mark Dickinson added the comment: Thread on #python-dev: http://mail.python.org/pipermail/python-dev/2012-November/122543.html If this is documented, direct tests for this form of exec should also be added. -- ___ Python tracker

[issue14266] pyunit script as shorthand for python -m unittest

2012-11-05 Thread Michael Foord
Michael Foord added the comment: A python script should be fine - this is what unittest2 does and I haven't had any requests from Windows users for a binary. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14266

[issue8243] curses writing to window's bottom right position raises: `_curses.error: addstr() returned ERR'

2012-11-05 Thread Ramchandra Apte
Changes by Ramchandra Apte maniandra...@gmail.com: -- components: +Library (Lib) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8243 ___ ___

[issue8243] curses writing to window's bottom right position raises: `_curses.error: addstr() returned ERR'

2012-11-05 Thread Ramchandra Apte
New submission from Ramchandra Apte: AutoBump™. -- nosy: +ramchandra.apte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8243 ___ ___

[issue4887] environment inspection and manipulation API is buggy, inconsistent with Python philosophy for wrapping native APIs

2012-11-05 Thread Ramchandra Apte
Changes by Ramchandra Apte maniandra...@gmail.com: -- versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4887 ___

[issue7292] Multiprocessing Joinable race condition?

2012-11-05 Thread Ramchandra Apte
Ramchandra Apte added the comment: Buu..mp -- nosy: +ramchandra.apte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7292 ___ ___ Python-bugs-list

[issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: These were not idle questions. I wrote the patch, and I had to know what behavior is correct. Here's the patch. It fixes potential memory bug (unconsumed_tail sets to NULL in case of out of memory), resets the unconsumed_tail to b'' after EOF, updates

[issue8243] curses writing to window's bottom right position raises: `_curses.error: addstr() returned ERR'

2012-11-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Extension Modules -Library (Lib) versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8243

[issue14965] super() and property inheritance behavior

2012-11-05 Thread Andrew Svetlov
Andrew Svetlov added the comment: I would say @x.deleter def x(self): del super().x confuses me a bit. But I'm only -0, let's see other developers for their opinions. -- ___ Python tracker rep...@bugs.python.org

[issue15955] gzip, bz2, lzma: add option to limit output size

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: unconsumed_tail should be private hidden attribute, which automatically prepends any consumed data. This should not be very complicated. But benchmarks needed to show what kind of approach is more efficient. --

[issue16409] urlretrieve regression: first call returns block size as 0

2012-11-05 Thread akira
akira added the comment: The summary assumes that issue 10050 is valid i.e., urlretrieve is reimplemented using new urlopen and 2.x FancyURLopener is deprecated. It might not be so [1]. In this case the summary is incorrect. Old implementation is available as: opener = FancyURLopener()

[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Quite the contrary. The ZipExtFile closes the file descriptor if the ZipFile is constructed on a filename. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16408

[issue16415] eventlet.monkey_patch() breaks subprocess.Popen on Windows

2012-11-05 Thread Alessandro Pilotti
New submission from Alessandro Pilotti: eventlet.monkey_patch() breaks subprocess.Popen on Windows with error: NotImplementedError: set_nonblocking() on a file object with no setblocking() method (Windows pipes don't support non-blocking I/O) Here's the full stack trace:

[issue9584] Allow curly brace expansion

2012-11-05 Thread Tim Golden
Tim Golden added the comment: Attached is a refactored version of Mathieu's patch which, when applied to tip, passes all tests. -- Added file: http://bugs.python.org/file27894/0003-reworked-issue9584.patch ___ Python tracker rep...@bugs.python.org

[issue16415] eventlet.monkey_patch() breaks subprocess.Popen on Windows

2012-11-05 Thread R. David Murray
R. David Murray added the comment: eventlet is not a part of the Python standard library. Please report this bug to the project's bug tracker. -- nosy: +r.david.murray resolution: - invalid stage: - committed/rejected status: open - closed ___

[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2012-11-05 Thread Ezio Melotti
Ezio Melotti added the comment: Attached a proof of concept that removes the caching for re.compile, as suggested in msg174599. -- Added file: http://bugs.python.org/file27895/issue16389.diff ___ Python tracker rep...@bugs.python.org

[issue9584] Allow curly brace expansion

2012-11-05 Thread Tim Golden
Tim Golden added the comment: Something went wrong with that patch; it doesn't include all the changes to test_glob. I'll upload a newer patch later. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9584

[issue16385] evaluating literal dict with repeated keys gives no warnings/errors

2012-11-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I agree with this rejection. -- nosy: +rhettinger stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16385 ___

[issue16404] Uses of PyLong_FromLong that don't check for errors

2012-11-05 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16404 ___ ___ Python-bugs-list mailing list

[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-05 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I think this is a duplicate of issue #16183. Are you sure python 3 is affected?. -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16408 ___

[issue16414] Add support.NONASCII to test non-ASCII characters

2012-11-05 Thread Chris Jerdonek
Chris Jerdonek added the comment: +# NONASCII: non-ASCII character encodable by os.fsencode(), +# or None if there is no such character. +NONASCII = None Can you use a name that reflects that this is a specific type of non-ASCII character having a special property (e.g. FS_NONASCII)? I think

[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, this is not a duplicate. ZipExtFile.close() closes a file handle, but ZipExtFile.close() is not used here. I see also some possible FD leaks in ZipFile.open(). It will be good to fix all them in this issue. If no one will make a patch for this easy

[issue7292] Multiprocessing Joinable race condition?

2012-11-05 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7292 ___ ___ Python-bugs-list mailing

[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ezio, I agree with you, but I think this should be a separate issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16389 ___

[issue3754] cross-compilation support for python build

2012-11-05 Thread Ambroz Bizjak
Ambroz Bizjak added the comment: I've applied all patches from py3k-20121004-CROSS.tgz to Python 3.3.0 except 2, 4, and 9 (which didn't apply), but it's not working. After it builds the built in modules, it tries to run the parser generator which was cross-compiled. make Parser/pgen make[1]:

[issue3754] cross-compilation support for python build

2012-11-05 Thread Ambroz Bizjak
Ambroz Bizjak added the comment: Forgot to mention: I did run autoreconf after applying the patches. I'm attaching the full output. -- Added file: http://bugs.python.org/file27896/log ___ Python tracker rep...@bugs.python.org

[issue16389] re._compiled_typed's lru_cache causes significant degradation of the mako_v2 bench

2012-11-05 Thread Ezio Melotti
Ezio Melotti added the comment: I think the lru_cache should be kept if possible (i.e. I'm -0.5 on your patch). If this result in a slowdown (as the mako_v2 benchmark indicates), then there are two options: 1) optimize lru_cache; 2) avoid using it for regular expressions compiled with

[issue3754] cross-compilation support for python build

2012-11-05 Thread Ambroz Bizjak
Ambroz Bizjak added the comment: A minor issue: if only --host= is specified on command line but not --build=, then cross_compiling variable is only defined after AC_PROG_CC is called. However, configure.ac uses it before that (e.g. the part at the top which looks for a python interpreter).

[issue16353] add function to os module for getting path to default shell

2012-11-05 Thread Taras Lyapun
Taras Lyapun added the comment: Updated patch. Moved function to os and used Christian Heimes implementation. Updated doc, and test. Also renamed function to get_shell. Test passes on mac os and windows. -- Added file: http://bugs.python.org/file27897/issue16353.diff

[issue16353] add function to os module for getting path to default shell

2012-11-05 Thread Christian Heimes
Christian Heimes added the comment: I've tested confstr(CS_PATH) on Linux, Mac OS X, Solaris, HP-UX and BSD. It works and the path to `sh` is always included. Taras: You don't have to perform the platform inside the get_shell() function. I suggest that you define the function depending on the

[issue16413] Non cross-platform behavior of os.path.split

2012-11-05 Thread Georg Brandl
Georg Brandl added the comment: Please submit a patch. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16413 ___ ___

[issue16353] add function to os module for getting path to default shell

2012-11-05 Thread Taras Lyapun
Taras Lyapun added the comment: Updated patch in regards to Christian Heimes remark. -- Added file: http://bugs.python.org/file27898/issue16353.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16353

[issue16353] add function to os module for getting path to default shell

2012-11-05 Thread Chris Jerdonek
Chris Jerdonek added the comment: Is someone able to test the patch on Android (the impetus for this issue)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16353 ___

[issue8745] zipimport is a bit slow

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suggest to use fseek(fp, relative_offset, SEEK_CUR). It doesn't force a system call (at least on Linux) and may be a little faster than fread() or multiple getc(). -- nosy: +serhiy.storchaka ___ Python tracker

[issue16408] zipfile.testzip() opens file but does not close it.

2012-11-05 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Serhiy Storchaka, go for it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16408 ___ ___ Python-bugs-list

[issue16391] terminator argument for logging.FileHandlers

2012-11-05 Thread Taras Lyapun
Taras Lyapun added the comment: Hello! I don't understand issue - FileHandler is a subclass of StreamHandler, so you can use terminator for FileHandler instances in the same way as for StreamHandler instances. -- nosy: +lyapun ___ Python tracker

[issue16353] add function to os module for getting path to default shell

2012-11-05 Thread Chris Jerdonek
Chris Jerdonek added the comment: Some minor comments. +.. function :: get_shell() + + Return the path to default shell. Three leading spaces needed. Also, Return the path to the default shell. + For unix system returns path to ``sh``, for windows returns path to ``cmd.exe``. On Unix

[issue9584] Allow curly brace expansion

2012-11-05 Thread Tim Golden
Tim Golden added the comment: Scratch that last comment: the patch does apply. I've tested it against Windows Ubuntu. If no one comes in with any objections I'll commit it within the next day. -- ___ Python tracker rep...@bugs.python.org

[issue16392] import crashes on circular imports in ext modules

2012-11-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Maybe we should add a warning in some documentation somewhere about this and then close the issue? I don't really know where to add it, in the C API docs perhaps, -- ___ Python tracker rep...@bugs.python.org

[issue16327] subprocess.Popen leaks file descriptors on os.fork() failure

2012-11-05 Thread Mark Gius
Mark Gius added the comment: My contributor form has been accepted. Anything else I should be doing to work towards getting a fix applied? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16327

[issue10395] new os.path function to extract common prefix based on path components

2012-11-05 Thread Rafik Draoui
Rafik Draoui added the comment: Here is a new patch addressing some of storchaka review comments, and implementing a version in ntpath. For the Windows version, I did as proposed in msg174819, but as I am not familiar with the semantics and subtleties of paths in Windows maybe this version

[issue16408] FD leaks in zipfile

2012-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch. In additional to leaks in testzip and ZipFile.open() I fixed possible leaks in other places. -- keywords: +patch stage: needs patch - patch review title: zipfile.testzip() opens file but does not close it. - FD leaks in zipfile

[issue16408] FD leaks in zipfile

2012-11-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file27901/zipfile_fd_leaks-3.2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16408 ___

[issue16408] FD leaks in zipfile

2012-11-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file27902/zipfile_fd_leaks-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16408 ___

[issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames

2012-11-05 Thread STINNER Victor
New submission from STINNER Victor: Since the changeset 45079ad1e260 (issue #4388), command line arguments are decoded from UTF-8 instead of the locale encoding. Functions of Python/fileutils.c are still using the locale encoding. It does not work: see issue #16218. On Mac OS X, in the

[issue16218] Python launcher does not support unicode characters

2012-11-05 Thread STINNER Victor
STINNER Victor added the comment: I created the issue #16416 to fix the Mac OS X case. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16218 ___

[issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames

2012-11-05 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16416 ___ ___

[issue16417] Integer converted in tuple without request

2012-11-05 Thread Rosa Maria
New submission from Rosa Maria: in instruction: b = int(input('Dame valor (mayor) de b = ')) later is an instruction: while b 0: and the result is: Traceback (most recent call last): File H:\Soft_nuevo\Reptil\GCD_MCD_Euclides_Extendido-0.py, line 39, in module while b 0:

[issue16418] argparse with many choices can generate absurdly long usage message

2012-11-05 Thread Juraj Variny
New submission from Juraj Variny: Example: parser.add_argument(-p,--port, help=Listening port, type=int, choices=range(1, 65535),default=8007,required = False) generates this usage text: usage: agent.py [-h] [-p

[issue16414] Add support.NONASCII to test non-ASCII characters

2012-11-05 Thread STINNER Victor
STINNER Victor added the comment: If NONASCII is None I suggest the followed fallback code I prefer to not brute force Unicode because it would slow down any test, even tests not using FS_NONASCII. I wrote attached brute.py script to compute an exhaustive list of non-ASCII characters

[issue16414] Add support.NONASCII to test non-ASCII characters

2012-11-05 Thread STINNER Victor
STINNER Victor added the comment: I tested support_non_ascii-2.patch on Windows with cp932 ANSI code page (FS encoding), and on Linux with ASCII, ISO-8859-1, ISO-8859-15 and UTF-8 locale encodings. -- ___ Python tracker rep...@bugs.python.org

[issue16414] Add support.NONASCII to test non-ASCII characters

2012-11-05 Thread STINNER Victor
STINNER Victor added the comment: I think you should ensure that os.fsdecode(os.fsencode(character)) == character. Chosen characters respect this property, but it doesn't hurt to add such check. Can you use a name that reflects that this is a specific type of non-ASCII character having a

[issue16414] Add support.NONASCII to test non-ASCII characters

2012-11-05 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: Removed file: http://bugs.python.org/file27892/support_non_ascii.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16414 ___

[issue16417] Integer converted in tuple without request

2012-11-05 Thread R. David Murray
R. David Murray added the comment: You did request a tuple: r = a - q * b, That is equivalent to r = (a - q * b,) which is a single element tuple. I had to put in some print statements in your loop to find that, it wasn't obvious. This is perhaps a disadvantage of Python's tuple

[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2012-11-05 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6280 ___ ___ Python-bugs-list mailing list

[issue16418] argparse with many choices can generate absurdly long usage message

2012-11-05 Thread R. David Murray
R. David Murray added the comment: I don't think choices is a good choice there (pardon the pun). You really want a custom type. I'm inclined to think that that applies to any 'choices' value that is 'too large' for the help display. Part of the point of choices is that you *want* the help

[issue16419] email.message._headers is a list

2012-11-05 Thread DDarko
New submission from DDarko: in Python 3.3 lib.email.message File email/message.py, line 151, in as_string g.flatten(self, unixfrom=unixfrom) File email/generator.py, line 112, in flatten self._write(msg) File email/generator.py, line 171, in _write self._write_headers(msg)

[issue16419] email.message._headers is a list

2012-11-05 Thread Ezio Melotti
Ezio Melotti added the comment: Lists have a new copy method starting from Python 3.3: Python 3.3.0+ (3.3:549f7b5baa83+, Nov 4 2012, 23:18:06) [GCC 4.6.3] on linux Type help, copyright, credits or license for more information. list.copy method 'copy' of 'list' objects -- nosy:

[issue16391] add terminator ctor argument to logging.StreamHandlers derived handlers

2012-11-05 Thread Nikolay Bryskin
Nikolay Bryskin added the comment: Hello, Taras. I've renamed the issue - StreamHandler should also have a terminator __init__ keyword argument. This argument is mostly needed for automatic logging configuration using logging.config.dictConfig or logging.config.fileConfig. -- title:

[issue16385] evaluating literal dict with repeated keys gives no warnings/errors

2012-11-05 Thread Lukas Lueg
Lukas Lueg added the comment: PyLint or PyChecker can only do this if the keys are all simple objects like ints or strings. Consider a class with a custom __hash__ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16385

[issue16418] argparse with many choices can generate absurdly long usage message

2012-11-05 Thread Chris Jerdonek
Chris Jerdonek added the comment: I agree with David. Another sign that using choices isn't the right approach is that it requires constructing a list of 66,000 elements. There are better ways of checking if a provided argument is an integer between 1 and 65,535. -- nosy:

[issue16418] argparse with many choices can generate absurdly long usage message

2012-11-05 Thread Chris Jerdonek
Chris Jerdonek added the comment: The argparse documentation says in one part, The choices keyword argument may be more convenient for type checkers that simply check against a range of values. Thus, I wouldn't object to language clarifying that choices is meant for lists of choices that

[issue13349] Non-informative error message in index() and remove() functions

2012-11-05 Thread Sean Ochoa
Sean Ochoa added the comment: Tests updated for coverage and to use assertRaisesRegex. -- Added file: http://bugs.python.org/file27907/issue13349.patch.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13349