[issue11200] Addition of abiflags breaks distutils

2011-02-20 Thread Tarek Ziadé
Tarek Ziadé added the comment: Also, let's keep this open/valid for Distutils2 -- components: +Distutils2 -Library (Lib) nosy: +alexis, eric.araujo resolution: invalid -> ___ Python tracker __

[issue11200] Addition of abiflags breaks distutils

2011-02-20 Thread Tarek Ziadé
Tarek Ziadé added the comment: Toshio: yeah go ahead and add one, and let's do this asap in Distribute -- ___ Python tracker ___ ___

[issue11246] PyUnicode_FromFormat("%V") decodes the byte string from ISO-8859-1

2011-02-20 Thread Ray.Allen
Changes by Ray.Allen : -- keywords: +patch Added file: http://bugs.python.org/file20818/issue11246.diff ___ Python tracker ___ ___ Pyt

[issue11246] PyUnicode_FromFormat("%V") decodes the byte string from ISO-8859-1

2011-02-20 Thread Ray.Allen
Ray.Allen added the comment: Yes. The %V should be combination of %U and %s. Here is a patch which fixed this problem. -- ___ Python tracker ___ ___

[issue11252] Handling statement OR assignment continuation '\' on Win32 platform

2011-02-20 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: -> lukasz.langa nosy: +lukasz.langa ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue11261] urlopen breaks when data parameter is used.

2011-02-20 Thread Georg Brandl
Changes by Georg Brandl : -- type: crash -> behavior versions: +Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue11261] urlopen breaks when data parameter is used.

2011-02-20 Thread Georg Brandl
Georg Brandl added the comment: Quite a few docs still say "string" where in fact bytes are expected in Python 3.x; we're updating these as we go along. -- assignee: -> docs@python components: +Documentation -Library (Lib) nosy: +docs@python, georg.brandl

[issue11264] Format Specification Mini-Language missing type 'i'?

2011-02-20 Thread Georg Brandl
Georg Brandl added the comment: IMO the new format language was quite right to do away with redundant specifiers, since "d" and "i" are completely equivalent. -- assignee: -> eric.smith nosy: +eric.smith, georg.brandl ___ Python tracker

[issue11268] Mac OS/X installer fails if documentation was previously installed.

2011-02-20 Thread Raymond Hettinger
New submission from Raymond Hettinger : The 3.2.0 install failed at the documentation step. I believe this happened because I had already install the release candidate beforehand, so it looks like on of the steps is not checking for existing files. -- assignee: ned.deily components: I

[issue11267] asyncore does not check for POLLERR and POLLHUP if neither readable nor writable

2011-02-20 Thread Марк Коренберг
New submission from Марк Коренберг : asyncore.py: poll2() : if flags: # Only check for exceptions if object was either readable # or writable. flags |= select.POLLERR | select.POLLHUP | select.POLLNVAL pollster.register(fd, flags) This is

[issue11263] Wrong link to source code of ftplib

2011-02-20 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list ma

[issue10867] mmap.flush() issue msync() even if mapping was created with prot=mmap.PROT_READ only

2011-02-20 Thread Марк Коренберг
Changes by Марк Коренберг : -- resolution: -> duplicate status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue11266] asyncore does not handle EINTR in recv, send, connect, accept,

2011-02-20 Thread Марк Коренберг
New submission from Марк Коренберг : in spite of usage of non-blocking IO, syscalls may return EINTR if signal arrive during some syscalls. It is desirable to re-call syscall after receiving EINTR. Trivial loops should be implemented around (recv, send, connect, accept) -- components:

[issue11265] asyncore does not check for EAGAIN errno

2011-02-20 Thread Марк Коренберг
Changes by Марк Коренберг : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue11265] asyncore does not check for EAGAIN errno

2011-02-20 Thread Марк Коренберг
New submission from Марк Коренберг : According to man: -- ERRORS EAGAIN or EWOULDBLOCK The socket is marked nonblocking and no connections are present to be accepted. POSIX.1-2001 allows either error to be returned for this case, and does not require these constants

[issue11259] asynchat does not check if terminator is negative integer

2011-02-20 Thread Марк Коренберг
Марк Коренберг added the comment: asynchat.py: class async_chat: handle_read(): --- elif isinstance(terminator, int) or isinstance(terminator, long): # numeric terminator n = terminator if lb < n:

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Марк Коренберг
Марк Коренберг added the comment: sorry, forgot "import weakref" -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Марк Коренберг
Марк Коренберг added the comment: --- asyncore.py 2010-09-15 22:18:21.0 +0600 +++ asyncore.py 2011-02-21 09:43:15.033839614 +0500 @@ -58,7 +58,7 @@ try: socket_map except NameError: -socket_map = {} +socket_map = weakref.WeakValueDictionary() def _strerror(err): tr

[issue11261] urlopen breaks when data parameter is used.

2011-02-20 Thread David Phillips
David Phillips added the comment: Converting the type of my variable "form" from string to bytes did, indeed, allow the code to run, but I have to wonder about changing the inputs to urlopen like this. The 3.1.3 docs call for the data parameter to be string, and I presume that has been the

[issue11264] Format Specification Mini-Language missing type 'i'?

2011-02-20 Thread Matt Joiner
New submission from Matt Joiner : The Format Specification Mini-Language is missing type 'i', generally the same as 'd', and ubiquitous in the libraries from which the specification is derived. See the 'd,i' conversion specifier in C: http://linux.die.net/man/3/printf, and the Old String Forma

[issue7330] PyUnicode_FromFormat segfault

2011-02-20 Thread Ray.Allen
Changes by Ray.Allen : Removed file: http://bugs.python.org/file20739/issue_7330.diff ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue7330] PyUnicode_FromFormat segfault

2011-02-20 Thread Ray.Allen
Ray.Allen added the comment: > > > With your patch, "%.200s" truncates the input string to 200 *characters*, > > > but I think that it should truncate to 200 *bytes*, as printf does. > > > > Sorry, I don't understand. The result of PyUnicode_FromFormatV() is a > > unicode object. Then how to

[issue11252] Handling statement OR assignment continuation '\' on Win32 platform

2011-02-20 Thread Suresh Kalkunte
Suresh Kalkunte added the comment: If the defect was with the script, the failure to bypass the '\' notation would have to be true on Redhat Linux. Since build.conf with '\' notation gets parsed without errors on Redhat Linux, I am under the impression the parsing performed by Python on Win32

[issue11224] 3.2: tarfile.getmembers causes 100% cpu usage on Windows

2011-02-20 Thread Sridhar Ratnakumar
Sridhar Ratnakumar added the comment: Lars, the attached patch fixes the issue. I'll add this to ActivePython 3.2. Thanks. -- ___ Python tracker ___ ___

[issue11261] urlopen breaks when data parameter is used.

2011-02-20 Thread Senthil Kumaran
Senthil Kumaran added the comment: On Sun, Feb 20, 2011 at 10:07:31PM +, David Phillips wrote: > The following code works on python 3.1.3 but fails on Python 3.2rc2 > (r32rc2:88269, Jan 30 2011, 14:30:28). (I run Mac OS X, version > 10.6.6.) Is that a real world code? (As in used in produc

[issue11226] subprocesses experience mysterious delay in receiving stdin EOF

2011-02-20 Thread Yang Zhang
Yang Zhang added the comment: After way too much time, I figured it out, after a quote from this post jumped out at me: See the "I/O on Pipes and FIFOs" section of pipe(7) ("man 7 pipe") "If all file descriptors referring to the write end of a pipe have been closed, then an attempt to r

[issue11200] Addition of abiflags breaks distutils

2011-02-20 Thread Toshio Kuratomi
Toshio Kuratomi added the comment: Ha! Your reply jogged my memory. MvL mentioned exactly the potential for this backwards incompatibility here: http://mail.python.org/pipermail/python-dev/2010-December/106351.html when talking about whether other API changes could go into distutils to supp

[issue11263] Wrong link to source code of ftplib

2011-02-20 Thread SilentGhost
SilentGhost added the comment: here is the patch -- keywords: +patch nosy: +SilentGhost stage: -> patch review Added file: http://bugs.python.org/file20816/ftplib.rst.diff ___ Python tracker _

[issue11263] Wrong link to source code of ftplib

2011-02-20 Thread Reiner Gerecke
New submission from Reiner Gerecke : The link to the source code of the ftp module at the top of the documentation (http://docs.python.org/release/3.2/library/ftplib.html) points to a non-existant page. **Source code:** :source:`Lib/ftp.py` It is referencing ftp.py, but needs to be ftplib.p

[issue11262] re.sub replaces only first 32 matches with re.U flag

2011-02-20 Thread SilentGhost
SilentGhost added the comment: If you read docs carefully, you notice that re.sub doesn't accept flags argument. Its 4th argument is count, re.U numerical value is 32. Closing as invalid. There are some duplicates too, I'm sure. -- nosy: +SilentGhost resolution: -> invalid status: op

[issue9995] "setup.py register sdist upload" requires pass to be saved

2011-02-20 Thread Martin v . Löwis
Martin v. Löwis added the comment: Instead of using http over TCP and basic auth to upload stuff to PyPI, you can also use SSH. In this case, no password is needed at all. -- nosy: +loewis ___ Python tracker _

[issue11262] re.sub replaces only first 32 matches with re.U flag

2011-02-20 Thread Eugene Morozov
New submission from Eugene Morozov : There's a peculiar and difficult to find bug in the re.sub method. Try following example: >>> text = 'X'*4096 >>> nt = re.sub(u"XX", u".", text, re.U) >>> nt u'XXX' (only 32 dots, the rest of the string is not changed). If I firs

[issue11259] asynchat does not check if terminator is negative integer

2011-02-20 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue11261] urlopen breaks when data parameter is used.

2011-02-20 Thread Ned Deily
Changes by Ned Deily : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue11261] urlopen breaks when data parameter is used.

2011-02-20 Thread David Phillips
New submission from David Phillips : The following code works on python 3.1.3 but fails on Python 3.2rc2 (r32rc2:88269, Jan 30 2011, 14:30:28). (I run Mac OS X, version 10.6.6.) - import urllib, urllib.request, urllib.error, urllib.parse form = urllib.parse.urlenco

[issue11259] asynchat does not check if terminator is negative integer

2011-02-20 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: What do you mean by "constructions like self.ac_in_buffer[:n] will lead to misbehaviour."? Please try to be more precise (e.g. by providing a piece of code which demonstrates the issue). -- ___ Python tracker <

[issue11199] urllib hangs when closing connection

2011-02-20 Thread Charles-Francois Natali
Changes by Charles-Francois Natali : Added file: http://bugs.python.org/file20815/urllib_ftp_close_27.diff ___ Python tracker ___ ___ Python-b

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > Such code should be rewritten via weakref. Can you write a patch? -- ___ Python tracker ___ _

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> giampaolo.rodola nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mail

[issue11259] asynchat does not check if terminator is negative integer

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> giampaolo.rodola nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mail

[issue11199] urllib hangs when closing connection

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola, orsenthil stage: -> patch review versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker ___ ___

[issue11199] urllib hangs when closing connection

2011-02-20 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: The problem is due to the way urllib closes a FTP data transfer. The data channel is closed, and a shutdown hook is called that waits for a message on the control channel. But in that case, when the data connection is closed while the transfer is in p

[issue11260] smtpd-as-a-script feature should be documented and should use argparse

2011-02-20 Thread Xavier Morel
Xavier Morel added the comment: Second patch: documenting smtpd-as-a-script in the module's rst -- Added file: http://bugs.python.org/file20813/smtpd-as-script-doc.diff ___ Python tracker _

[issue11260] smtpd-as-a-script feature should be documented and should use argparse

2011-02-20 Thread Xavier Morel
New submission from Xavier Morel : argparse has been merged to the standard library in 3.2, and (tell me if I'm wrong) would therefore be the "best-practices" way to parse command-line arguments. Numerous stdlib modules can be used as scripts, but they tend to have ad-hoc documentation (if th

[issue11133] inspect.getattr_static code execution

2011-02-20 Thread Andreas Stührk
Andreas Stührk added the comment: Attached is a patch that fixes the issue: The dict methods are now used directly and before every access to an instance's "__dict__" attribute, it is checked that that attribute is really the instance's attribute and not a class attribute of the instance's ty

[issue11127] sockets should not be pickleable

2011-02-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: You also need to a test to Lib/test/test_socket.py. -- ___ Python tracker ___ ___ Python-bugs-list

[issue11259] asynchat does not check if terminator is negative integer

2011-02-20 Thread Марк Коренберг
Changes by Марк Коренберг : -- title: asynchat -> asynchat does not check if terminator is negative integer ___ Python tracker ___ ___

[issue11259] asynchat

2011-02-20 Thread Марк Коренберг
New submission from Марк Коренберг : asynchat does not check if terminator is negative integer. so constructions like self.ac_in_buffer[:n] will lead to misbehaviour. When that integer goes from net, attack can be crafted. For example, on Content-Length field. -- components: Library (

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, re.escape is probably still needed around name. -- ___ Python tracker ___ ___ Python-bugs

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is the first patch adapted for py3k. -- Added file: http://bugs.python.org/file20810/faster-find-library1-py3k.diff ___ Python tracker ___

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou stage: -> patch review versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___ ___

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-20 Thread Jonas H.
Jonas H. added the comment: (might also be related to http://bugs.python.org/issue11063) -- ___ Python tracker ___ ___ Python-bugs-li

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-20 Thread Jonas H.
Changes by Jonas H. : Added file: http://bugs.python.org/file20809/faster-find-library2.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue11258] ctypes: Speed up find_library() on Linux by 500%

2011-02-20 Thread Jonas H.
New submission from Jonas H. : (This applies to all versions of Python I investigated, although the attached patch is for Python 2.7) I wondered why `import uuid` took so long, so I did some profiling. It turns out that `find_library` wastes at lot of time because of this crazy regular expres

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Марк Коренберг
New submission from Марк Коренберг : asyncore.py: --- def add_channel(self, map=None): #self.log_info('adding channel %s' % self) if map is None: map = self._map map[self._fileno] = self - As we see, it add itself to a map, creating unneces

[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-20 Thread yeswanth
Changes by yeswanth : Added file: http://bugs.python.org/file20807/diff ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-20 Thread yeswanth
Changes by yeswanth : Removed file: http://bugs.python.org/file20806/diff ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-20 Thread yeswanth
yeswanth added the comment: Sorry for the typo. I ran the code though and it worked fine. I guess might have patched a wrong file :( . Made the changes as you asked. Will try for the unit tests :) -- Added file: http://bugs.python.org/file20806/diff __

[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-20 Thread yeswanth
Changes by yeswanth : Removed file: http://bugs.python.org/file20804/diff ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue11254] distutils doesn't byte-compile .py files to __pycache__ during installation

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: normal -> critical ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue11256] inspect.getcallargs raises TypeError on valid arguments

2011-02-20 Thread Daniel Urban
Daniel Urban added the comment: Here is a patch. It also includes tests that would have detected this bug. It also corrects a case when getcallargs raised an exception with a different message (there are tests also for this): >>> def f(**kwargs): pass ... >>> f(1, a=2) Traceback (most recent

[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-20 Thread Éric Araujo
Éric Araujo added the comment: Not bad! You need to test the script, at least manually, if possible with unit tests. This typo slipped in: + self.data.get['version']=suggested_version Remove “.get” (also add spaces around operators). -- ___

[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-02-20 Thread yeswanth
yeswanth added the comment: I guess this needs to be reviewed . Added support for checking version in mkcfg.py by making use of suggest_normalized_version .. (didnt not an error for non matching suggestion , though it will prompt for the version it again ) -- Added file: http://bugs

[issue11133] inspect.getattr_static code execution

2011-02-20 Thread Florian Mayer
Florian Mayer added the comment: Apparently another way to get getattr_static to execute code in Python 2.3rc3 is simply the following. >>> class Foo: ... @property ... def __dict__(self): ... print("Hello, World.") ... return {} ... >>> import inspect >>> inspect.geta

[issue11254] distutils doesn't byte-compile .py files to __pycache__ during installation

2011-02-20 Thread Éric Araujo
Éric Araujo added the comment: Patch looks good. Regarding the problem with 2to3 and -O, maybe you can run 2to3 manually, copy the setup.py and run python3.2 -0. disutils.util.byte_compile is not tested, so this patch requires at least careful manual testing, and if possible a unit test. I

[issue11256] inspect.getcallargs raises TypeError on valid arguments

2011-02-20 Thread Daniel Urban
New submission from Daniel Urban : inspect.getcallargs raises TypeError if given a function with only **kwargs, and some keyword arguments: Python 3.3a0 (py3k:88451, Feb 20 2011, 12:37:22) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> >>> fro

[issue11127] sockets should not be pickleable

2011-02-20 Thread Xuanji Li
Xuanji Li added the comment: the correct way is to provide a __getstate__ method for socket right? I have implemented that in the attached patch. -- keywords: +patch nosy: +xuanji Added file: http://bugs.python.org/file20803/issue11127.patch ___ Pyt

[issue11255] 2to3 throws AttributeError during distutils installation with -O

2011-02-20 Thread Stefan Behnel
New submission from Stefan Behnel : When running a distutils installation of Cython (which uses lib2to3) as "python3.2 -O setup.py bdist", I get this: Skipping implicit fixer: buffer Skipping implicit fixer: idioms Skipping implicit fixer: set_literal Skipping implicit fixer: ws_comma Traceback

[issue11254] distutils doesn't byte-compile .py files to __pycache__ during installation

2011-02-20 Thread Stefan Behnel
Stefan Behnel added the comment: Here's a patch. I basically copied over the way py_compile determines the .pyc file name. It works for me for a "normal" installation. However, I couldn't test it with "-O", as 2to3 crashes for me when I enable it during installation. I guess that's a separat

[issue11252] Handling statement OR assignment continuation '\' on Win32 platform

2011-02-20 Thread Georg Brandl
Georg Brandl added the comment: Why do you think this is a bug in Python as opposed to one in the script parsing the .conf file? -- nosy: +georg.brandl resolution: -> invalid status: open -> pending ___ Python tracker

[issue11254] distutils doesn't byte-compile .py files to __pycache__ during installation

2011-02-20 Thread Stefan Behnel
New submission from Stefan Behnel : During installation of Python packages (setup.py install or bdist), distutils puts .pyc files into the installed source directory, instead of moving them into __pycache__. This may mean that they are not getting used after installation (with potentially no w