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

2011-02-20 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: 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

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

2011-02-20 Thread Georg Brandl
Georg Brandl ge...@python.org 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
Stefan Behnel sco...@users.sourceforge.net 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.

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

2011-02-20 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: 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

[issue11127] sockets should not be pickleable

2011-02-20 Thread Xuanji Li
Xuanji Li xua...@gmail.com 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

[issue11256] inspect.getcallargs raises TypeError on valid arguments

2011-02-20 Thread Daniel Urban
New submission from Daniel Urban urban.dani...@gmail.com: 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

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

2011-02-20 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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

[issue11133] inspect.getattr_static code execution

2011-02-20 Thread Florian Mayer
Florian Mayer florma...@aim.com 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

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

2011-02-20 Thread yeswanth
yeswanth swamiyeswa...@yahoo.com 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 ) --

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

2011-02-20 Thread Éric Araujo
Éric Araujo mer...@netwok.org 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). --

[issue11256] inspect.getcallargs raises TypeError on valid arguments

2011-02-20 Thread Daniel Urban
Daniel Urban urban.dani...@gmail.com 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)

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

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- priority: normal - critical ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11254 ___ ___

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

2011-02-20 Thread yeswanth
Changes by yeswanth swamiyeswa...@yahoo.com: Removed file: http://bugs.python.org/file20804/diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11060 ___

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

2011-02-20 Thread yeswanth
yeswanth swamiyeswa...@yahoo.com 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 swamiyeswa...@yahoo.com: Removed file: http://bugs.python.org/file20806/diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11060 ___

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

2011-02-20 Thread yeswanth
Changes by yeswanth swamiyeswa...@yahoo.com: Added file: http://bugs.python.org/file20807/diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11060 ___ ___

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Марк Коренберг
New submission from Марк Коренберг socketp...@gmail.com: 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

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

2011-02-20 Thread Jonas H.
New submission from Jonas H. jo...@lophus.org: (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

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

2011-02-20 Thread Jonas H.
Changes by Jonas H. jo...@lophus.org: Added file: http://bugs.python.org/file20809/faster-find-library2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11258 ___

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

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

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

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +pitrou stage: - patch review versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11258

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

2011-02-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 rep...@bugs.python.org http://bugs.python.org/issue11258

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

2011-02-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Actually, re.escape is probably still needed around name. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11258 ___

[issue11259] asynchat

2011-02-20 Thread Марк Коренберг
New submission from Марк Коренберг socketp...@gmail.com: 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. --

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

2011-02-20 Thread Марк Коренберг
Changes by Марк Коренберг socketp...@gmail.com: -- title: asynchat - asynchat does not check if terminator is negative integer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11259 ___

[issue11127] sockets should not be pickleable

2011-02-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: You also need to a test to Lib/test/test_socket.py. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11127 ___

[issue11133] inspect.getattr_static code execution

2011-02-20 Thread Andreas Stührk
Andreas Stührk andy-pyt...@hammerhartes.de 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

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

2011-02-20 Thread Xavier Morel
New submission from Xavier Morel xavier.mo...@masklinn.net: 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

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

2011-02-20 Thread Xavier Morel
Xavier Morel xavier.mo...@masklinn.net 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 rep...@bugs.python.org

[issue11199] urllib hangs when closing connection

2011-02-20 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr 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

[issue11199] urllib hangs when closing connection

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +giampaolo.rodola, orsenthil stage: - patch review versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11199

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

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - giampaolo.rodola nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11259 ___

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - giampaolo.rodola nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11257 ___

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: Such code should be rewritten via weakref. Can you write a patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11257 ___

[issue11199] urllib hangs when closing connection

2011-02-20 Thread Charles-Francois Natali
Changes by Charles-Francois Natali neolo...@free.fr: Added file: http://bugs.python.org/file20815/urllib_ftp_close_27.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11199 ___

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

2011-02-20 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com 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). -- ___

[issue11261] urlopen breaks when data parameter is used.

2011-02-20 Thread David Phillips
New submission from David Phillips david.193.phill...@gmail.com: 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

[issue11261] urlopen breaks when data parameter is used.

2011-02-20 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11261 ___ ___ Python-bugs-list mailing list

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

2011-02-20 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11259 ___

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

2011-02-20 Thread Eugene Morozov
New submission from Eugene Morozov eugene.moro...@gmail.com: There's a peculiar and difficult to find bug in the re.sub method. Try following example: text = 'X'*4096 nt = re.sub(uXX, u., text, re.U) nt u'XXX' (only 32 dots, the rest of the string is not

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

2011-02-20 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de 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 rep...@bugs.python.org

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

2011-02-20 Thread SilentGhost
SilentGhost ghost@gmail.com 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: -

[issue11263] Wrong link to source code of ftplib

2011-02-20 Thread Reiner Gerecke
New submission from Reiner Gerecke mr.squ...@gmail.com: 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

[issue11263] Wrong link to source code of ftplib

2011-02-20 Thread SilentGhost
SilentGhost ghost@gmail.com 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 rep...@bugs.python.org

[issue11200] Addition of abiflags breaks distutils

2011-02-20 Thread Toshio Kuratomi
Toshio Kuratomi a.bad...@gmail.com 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

[issue11226] subprocesses experience mysterious delay in receiving stdin EOF

2011-02-20 Thread Yang Zhang
Yang Zhang yang.pythonb...@mailnull.com 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

[issue11261] urlopen breaks when data parameter is used.

2011-02-20 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com 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

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

2011-02-20 Thread Sridhar Ratnakumar
Sridhar Ratnakumar sridh...@activestate.com added the comment: Lars, the attached patch fixes the issue. I'll add this to ActivePython 3.2. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11224

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

2011-02-20 Thread Suresh Kalkunte
Suresh Kalkunte sskalku...@gmail.com 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

[issue7330] PyUnicode_FromFormat segfault

2011-02-20 Thread Ray.Allen
Ray.Allen ysj@gmail.com 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

[issue7330] PyUnicode_FromFormat segfault

2011-02-20 Thread Ray.Allen
Changes by Ray.Allen ysj@gmail.com: Removed file: http://bugs.python.org/file20739/issue_7330.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7330 ___

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

2011-02-20 Thread Matt Joiner
New submission from Matt Joiner anacro...@gmail.com: 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

[issue11261] urlopen breaks when data parameter is used.

2011-02-20 Thread David Phillips
David Phillips david.193.phill...@gmail.com 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

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Марк Коренберг
Марк Коренберг socketp...@gmail.com 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

[issue11257] asyncore stores unnecessary object references

2011-02-20 Thread Марк Коренберг
Марк Коренберг socketp...@gmail.com added the comment: sorry, forgot import weakref -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11257 ___

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

2011-02-20 Thread Марк Коренберг
Марк Коренберг socketp...@gmail.com 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:

[issue11265] asyncore does not check for EAGAIN errno

2011-02-20 Thread Марк Коренберг
New submission from Марк Коренберг socketp...@gmail.com: 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

[issue11265] asyncore does not check for EAGAIN errno

2011-02-20 Thread Марк Коренберг
Changes by Марк Коренберг socketp...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11265 ___ ___ Python-bugs-list

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

2011-02-20 Thread Марк Коренберг
New submission from Марк Коренберг socketp...@gmail.com: 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)

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

2011-02-20 Thread Марк Коренберг
Changes by Марк Коренберг socketp...@gmail.com: -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10867 ___

[issue11263] Wrong link to source code of ftplib

2011-02-20 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: docs@python - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11263 ___

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

2011-02-20 Thread Марк Коренберг
New submission from Марк Коренберг socketp...@gmail.com: 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)

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

2011-02-20 Thread Raymond Hettinger
New submission from Raymond Hettinger rhettin...@users.sourceforge.net: 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. --

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

2011-02-20 Thread Georg Brandl
Georg Brandl ge...@python.org 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

[issue11261] urlopen breaks when data parameter is used.

2011-02-20 Thread Georg Brandl
Georg Brandl ge...@python.org 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

[issue11261] urlopen breaks when data parameter is used.

2011-02-20 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- type: crash - behavior versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11261 ___

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

2011-02-20 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: - lukasz.langa nosy: +lukasz.langa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11252 ___

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

2011-02-20 Thread Ray.Allen
Ray.Allen ysj@gmail.com added the comment: Yes. The %V should be combination of %U and %s. Here is a patch which fixed this problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11246

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

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

[issue11200] Addition of abiflags breaks distutils

2011-02-20 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Toshio: yeah go ahead and add one, and let's do this asap in Distribute -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11200 ___

[issue11200] Addition of abiflags breaks distutils

2011-02-20 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Also, let's keep this open/valid for Distutils2 -- components: +Distutils2 -Library (Lib) nosy: +alexis, eric.araujo resolution: invalid - ___ Python tracker rep...@bugs.python.org