[issue12568] Add functions to get the width in columns of a character

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: Oh, unicode_width.patch of issue #2382 implements the width on Windows using: WideCharToMultiByte(CP_ACP, 0, buf, len, NULL, 0, NULL, NULL); It computes the length of byte string encoded to the ANSI code page. I don't know if it can be seen as the "width" of

[issue12568] Add functions to get the width in columns of a character

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: > There might be something you can steal from ... I don't think that Python should reinvent the wheel. We should just reuse wcswidth(). Here is a simple patch exposing wcswidth() function as locale.width(). Example: >>> import locale >>> text = '\u3042\u30

[issue7833] bdist_wininst installers fail to load extensions built with Issue4120 patch

2011-10-13 Thread Mark Hammond
Mark Hammond added the comment: New version of the patch with the small tweaks requested plus a NEWS entry. -- Added file: http://bugs.python.org/file23400/bug-7833-tweaks-plus-news.patch ___ Python tracker ___

[issue12795] Remove the major version from sys.platform

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: While working on #12326, it's realized that many modules and applications rely on sys.platform. Change this value should be decided for each platform because it breaks backward compatibility. Linux was a special case and now I don't think that we should drop

[issue13025] mimetypes should read the rule file using UTF-8, not the locale encoding

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: > Please use the file from Fedora in a test. Done. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue13025] mimetypes should read the rule file using UTF-8, not the locale encoding

2011-10-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8d8ab3e04363 by Victor Stinner in branch '3.2': Issue #13025: mimetypes is now reading MIME types using the UTF-8 encoding, http://hg.python.org/cpython/rev/8d8ab3e04363 New changeset 2c223d686feb by Victor Stinner in branch 'default': (Merge 3.2)

[issue13029] test_strptime fails on Windows 7 french

2011-10-13 Thread STINNER Victor
Changes by STINNER Victor : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue10653] test_time test_strptime fails on windows

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: It's a bug in the Windows API: I used the workaround suggested by Hirokazu Yamamoto. Thanks Hirokazu! Python 2.7 doesn't use wcsftime() and so it is not affected by this issue. -- resolution: -> fixed status: open -> closed versions: +Python 3.3 ___

[issue13029] test_strptime fails on Windows 7 french

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: Yes, this issue is a duplicate of #10653. -- resolution: -> duplicate ___ Python tracker ___ ___ P

[issue10653] test_time test_strptime fails on windows

2011-10-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset e3d9c5e690fc by Victor Stinner in branch '3.2': Issue #10653: On Windows, use strftime() instead of wcsftime() because http://hg.python.org/cpython/rev/e3d9c5e690fc New changeset 79e60977fc04 by Victor Stinner in branch 'default': (Merge 3.2) Issue

[issue13088] Add Py_hexdigits constant: use one unique constant to format a digit to hexadecimal

2011-10-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset d76338eacf7c by Victor Stinner in branch 'default': Issue #13088: Add shared Py_hexdigits constant to format a number into base 16 http://hg.python.org/cpython/rev/d76338eacf7c -- nosy: +python-dev ___ P

[issue11880] add a {dist-info} category to distutils2

2011-10-13 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berkerpeksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue13175] packaging uses wrong line endings in RECORD files on Windows

2011-10-13 Thread Paul Moore
New submission from Paul Moore : On Windows, packaging seems to create RECORD files with an additional CR at the end of the line. (So the line end is CR CR LF). This does not seem to be consistent, but it is likely to be because a file is being opened in text mode rather than binary. I am try

[issue13174] test_os failures on Fedora 15: listxattr() returns ['security.selinux']

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: Attached patch fixes test_os failures. -- keywords: +patch nosy: +benjamin.peterson Added file: http://bugs.python.org/file23399/xattr_test.patch ___ Python tracker __

[issue13174] test_os failures on Fedora 15: listxattr() returns ['security.selinux']

2011-10-13 Thread STINNER Victor
New submission from STINNER Victor : == FAIL: test_fds (test.test_os.ExtendedAttributeTests) -- Traceback (most recent call last): File "/home/haypo/prog/pytho

[issue13173] Default values for string.Template

2011-10-13 Thread Bfontaine
New submission from Bfontaine : This patch allows you to define default values for a string.Template, which is useful when you need to use a lot some values, but sometimes other values. for example: >>> from string import Template >>> s = Template("${user} made me a ${flavor} cake.", default={

[issue13163] `port` and `host` are confused in `_get_socket

2011-10-13 Thread Víctor Terrón
Víctor Terrón added the comment: It was strange it was *that* easy. My newbie apologies, David. Let me take a look at it -- hopefully it will be an adequate first task for a newcomer. -- ___ Python tracker __

[issue13027] python 2.6.6 interpreter core dumps on modules command from help prompt

2011-10-13 Thread Ned Deily
Ned Deily added the comment: The recent fixes do not address cases like here where importing a module causes a crash in the interpreter process, usually due to some faulty third-party extension module. One way to handle it more gracefully might be to move the import scan to a separate interp

[issue13163] `port` and `host` are confused in `_get_socket

2011-10-13 Thread Ram Rachum
Ram Rachum added the comment: The reason this bug bothered me is because I was debugging a Django app, and in the stacktrace's local variables I suddenly saw that `host` was `25`, which seemed like a bug to me and wasted me 5 minutes. So it's not a critical bug but it wasted my time. ---

[issue13163] `port` and `host` are confused in `_get_socket

2011-10-13 Thread R. David Murray
R. David Murray added the comment: Well, your patch is a little *too* simple: it doesn't change the function prototype to match :) This is a cosmetic issue rather than a bug, but it would still be nice to fix it. Or maybe a documentation issue in the sense that Python code is (usually) self

[issue13171] Bug in tempfile module

2011-10-13 Thread R. David Murray
R. David Murray added the comment: I wonder if it is a bug in Windows? Have you tried similar experiments with regular files? tempfile is really just about *where* the files are located (and what happens when they are closed), not about their fundamental nature as OS file objects. (I could

[issue13163] `port` and `host` are confused in `_get_socket

2011-10-13 Thread vterron
vterron added the comment: Added a ridiculously simple patch, in case it is going to get fixed in 2.7. -- keywords: +patch nosy: +vterron Added file: http://bugs.python.org/file23397/smtplib.py.diff ___ Python tracker

[issue6210] Exception Chaining missing method for suppressing context

2011-10-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue13172] pysetup run --list-commands fails with a traceback

2011-10-13 Thread Paul Moore
New submission from Paul Moore : In a directory with 2 files, setup.cfg and a single C file containing source for an extension module. The same happens with a pure-python module. This is on Windows. PS D:\Data\python-sample> D:\Data\cpython\PCbuild\python.exe -m packaging.run run --list-comma

[issue13171] Bug in tempfile module

2011-10-13 Thread Alexander Steppke
New submission from Alexander Steppke : The tempfile module shows strange behavior under certain conditions. This might lead to data leaking or other problems. The test session looks as follows: Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "

[issue13167] Add get_metadata to packaging

2011-10-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Oct 13, 2011, at 04:01 PM, Éric Araujo wrote: >The PEP 376 implementation in packaging.database has been called ugly and >opaque. When discussing PEP 396 for example (that’s why I’m adding Barry and >Antoine to nosy, for their feedback), >get_distribution(

[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2011-10-13 Thread Matthew Barnett
Matthew Barnett added the comment: The quantifiers use 65535 to represent no upper limit, so ".{0,65535}" is equivalent to ".*". For example: >>> re.match(".*", "x" * 10).span() (0, 10) >>> re.match(".{0,65535}", "x" * 10).span() (0, 10) but: >>> re.match(".{0,65534}", "x" *

[issue13146] Writing a pyc file is not atomic

2011-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, here is a new patch using O_EXCL. Also, since import.c is quite different in 3.2, I'm not sure I will bother backporting. -- versions: -Python 3.2 Added file: http://bugs.python.org/file23396/importrename3.patch __

[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2011-10-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue13151] pysetup3 run bdist_wininst fails

2011-10-13 Thread Vinay Sajip
Vinay Sajip added the comment: > I don’t have Windows yet, so either we wait or we iterate I make a patch - > you report failures - I make a patch etc. Actually I'm finding these failures on Ubuntu :-) Although there are MBCS encoding issues which will also need to be fixed before you can bu

[issue13027] python 2.6.6 interpreter core dumps on modules command from help prompt

2011-10-13 Thread Éric Araujo
Éric Araujo added the comment: Unless I’m mistaken, this is another of the duplicate reports for the bug fixed by Ned in 2.7 recently. -- nosy: +eric.araujo, ned.deily ___ Python tracker _

[issue13169] Regular expressions with 0 to 65536 repetitions raises OverflowError

2011-10-13 Thread Brian Curtin
Changes by Brian Curtin : -- title: Regular expressions with 0 to 65536 repetitions and above makes Python crash -> Regular expressions with 0 to 65536 repetitions raises OverflowError ___ Python tracker _

[issue13170] distutils2 test failures

2011-10-13 Thread Éric Araujo
New submission from Éric Araujo : I get three errors/failures on linux3: ERROR: test_simple_run (distutils2.tests.test_command_install_data.InstallDataTestCase) -- Traceback (most recent call last): File "distutils2/tests/tes

[issue13169] Regular expressions with 0 to 65536 repetitions and above makes Python crash

2011-10-13 Thread Brian Curtin
Brian Curtin added the comment: I might be missing something, but what's the issue? 65535 is the limit, and doing 65536 gives a clear overflow exception (no crash). -- nosy: +brian.curtin type: crash -> behavior ___ Python tracker

[issue13169] Regular expressions with 0 to 65536 repetitions and above makes Python crash

2011-10-13 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue13169] Regular expressions with 0 to 65536 repetitions and above makes Python crash

2011-10-13 Thread Maurice de Rooij
New submission from Maurice de Rooij : Regular expressions with 0 to 65536 repetitions and above makes Python crash with a "OverflowError: regular expression code size limit exceeded" exception. 65535 repetitions do not raise this issue. Tested and confirmed this with versions 2.7.1 and 3.2.2.

[issue13168] Python 2.6 having trouble finding modules when invoked via a symlink

2011-10-13 Thread Randy Galbraith
New submission from Randy Galbraith : Hi Python Developers, Our install of Python 2.6.4 on AIX 5.3 seems to have problems finding modules when invoked via a symlink. A direct path to the binary will work. One symlink will work, but another will not. I created a test harness to demonstrate thi

[issue13134] speed up finding of one-character strings

2011-10-13 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I would rather propose to simplify the needle heuristic and only use it > when the lower byte is non-zero. A properly optimized memchr() (as in > the glibc / gcc) is definitely faster than our naïve loop. That would be fine as well. Not sure if a heuristics

[issue12344] Add **kwargs to get_reinitialized_command

2011-10-13 Thread Éric Araujo
Éric Araujo added the comment: This patch has tests that look sensible and pass. -- Added file: http://bugs.python.org/file23395/d2-get_reinitialized_command-kwargs.diff ___ Python tracker ___

[issue13167] Add get_metadata to packaging

2011-10-13 Thread Éric Araujo
New submission from Éric Araujo : The PEP 376 implementation in packaging.database has been called ugly and opaque. When discussing PEP 396 for example (that’s why I’m adding Barry and Antoine to nosy, for their feedback), get_distribution(name).metadata['Version'] did not seem to agree with

[issue13165] Integrate stringbench in the Tools directory

2011-10-13 Thread STINNER Victor
STINNER Victor added the comment: Some ideas to improve stringbench: - test different Unicode range (stringbench tests only ASCII currently) - test mixing different Unicode range, e.g. ascii+latin1, UCS2.find(ascii), UCS2.replace(UCS2, UCS4), ... - add options to configure string lengths P

[issue13166] Implement packaging.database.Distribution.__str__

2011-10-13 Thread Éric Araujo
New submission from Éric Araujo : In code working with instances of packaging.database.Distribution, it’s bothersome to have to use '%r %s' % (dist.name, dist.version) all the time. It is also not good-looking in 2.x, where we get u'name'. I think it would be best to implement a __str__ meth

[issue13150] Most of Python's startup time is sysconfig

2011-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > A Python solution would be more useful for other implementations > > if enough of the sysconfig info is not CPython specific. > That’s the point: the info currently parsed at runtime by sysconfig is > specific to CPython (Makefile and pyconfig.h), so adding

[issue13151] pysetup3 run bdist_wininst fails

2011-10-13 Thread Éric Araujo
Éric Araujo added the comment: Metadata now only uses item access, and the names have changed: long_description is description, url is home_page, former description is summary, etc. (more in PEP 345). I don’t have Windows yet, so either we wait or we iterate I make a patch - you report failu

[issue12386] packaging fails in install_distinfo when writing RESOURCES

2011-10-13 Thread Éric Araujo
Éric Araujo added the comment: I started to look at this a few days ago and found out that there are no tests at all for writing RESOURCES. I need to look again at the documentation and code and add many tests. -- ___ Python tracker

[issue13162] Trying to install a binary extension as a resource file causes pysetup to give a traceback

2011-10-13 Thread Éric Araujo
Éric Araujo added the comment: This does not look related to installing binary files at all, but rather an already known bug: #12386. -- assignee: tarek -> eric.araujo resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> packaging fails in inst

[issue13150] Most of Python's startup time is sysconfig

2011-10-13 Thread Éric Araujo
Éric Araujo added the comment: > Since #9878 proposes an *alternate* solution to *part* of the > sysconfig problem, I disagree with 'supersede'. It’s also an older issue. > A Python solution would be more useful for other implementations > if enough of the sysconfig info is not CPython specific

[issue13165] Integrate stringbench in the Tools directory

2011-10-13 Thread Antoine Pitrou
New submission from Antoine Pitrou : The stringbench suite of micro-benchmarks, currently available through SVN at http://svn.python.org/projects/sandbox/trunk/stringbench, would probably be a reasonable addition to the Tools directory. -- components: Demos and Tools keywords: easy mes

[issue13163] `port` and `host` are confused in `_get_socket

2011-10-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue6715] xz compressor support

2011-10-13 Thread Martin v . Löwis
Martin v. Löwis added the comment: I have imported xz-5.0.3 into the externals repository now. -- ___ Python tracker ___ ___ Python-bu

[issue8668] Packaging: add a 'develop' command

2011-10-13 Thread higery
higery added the comment: >> What’s more practical for you, a review or a patch? I think a review is better(thanks for your time:) ), because some changes maybe needed after I have finished all the issues against the develop command. -- ___ Python

[issue13134] speed up finding of one-character strings

2011-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I think the >1 character sizes are overly complex in this patch, and > still memchr isn't typically used for them. So I suggest to simplify > the code and restrict it to 1-byte chars only. I would rather propose to simplify the needle heuristic and only use i

[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

2011-10-13 Thread Nadeem Vawda
Nadeem Vawda added the comment: No problem :) -- assignee: -> nadeem.vawda resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue13164] importing rlcompleter module writes a control sequence in stdout

2011-10-13 Thread Valvanuz
New submission from Valvanuz : When you import the module rlcompleter in a python script in Centos 6 (x86_64), the control sequence \033[?1034h is printed in stdout. The problem is that these sequence is not visible by the user and cause a lot of confusion. In my case I compared the output of

[issue13134] speed up finding of one-character strings

2011-10-13 Thread Martin v . Löwis
Martin v. Löwis added the comment: I think the >1 character sizes are overly complex in this patch, and still memchr isn't typically used for them. So I suggest to simplify the code and restrict it to 1-byte chars only. -- ___ Python tracker

[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

2011-10-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you :) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

2011-10-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset c1c434e30e06 by Nadeem Vawda in branch '2.7': Issue #13159: Replace FileIO's quadratic-time buffer growth algorithm with a linear-time one. http://hg.python.org/cpython/rev/c1c434e30e06 -- ___ Python tr

[issue13159] _io.FileIO uses a quadratic-time buffer growth algorithm

2011-10-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset d18c80a8c119 by Nadeem Vawda in branch '3.2': Issue #13159: Replace FileIO's quadratic-time buffer growth algorithm with a linear-time one. http://hg.python.org/cpython/rev/d18c80a8c119 New changeset 4a6709a071d0 by Nadeem Vawda in branch 'default

[issue13158] tarfile.TarFile.getmembers misses some entries

2011-10-13 Thread Sebastien Binet
Sebastien Binet added the comment: one interesting additional piece of information is that if I un-tar that file and re-tar it w/o gzip compression, getmembers gets the right answer. -s -- ___ Python tracker ___

[issue13158] tarfile.TarFile.getmembers misses some entries

2011-10-13 Thread Lars Gustäbel
Changes by Lars Gustäbel : -- assignee: -> lars.gustaebel nosy: +lars.gustaebel versions: +Python 3.3 ___ Python tracker ___ ___ Pyth