[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2011-02-28 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > The patch turned out to be less trivial than I initially thought. > > The current algorithm checks for invalid continuation bytes in 4 places: > 1) before the switch/case statement in Objects/un

[issue11283] incorrect pattern in the re module docs for conditional regex

2011-02-28 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thinking about the regex pattern again. The example given is not really wrong. It does what it claims to match, that is '' and 'u...@example.com' and reject ' kind of string. Also, this is not an example of validating an email address or finding an email a

[issue10524] Patch to add Pardus to supported dists in platform

2011-02-28 Thread Onur Küçük
Onur Küçük added the comment: Is this patch going to be applied ? platform.dist() is a function which detects and returns the distribution name and version, and it fails to detect Pardus distribution name and version. Since the attached patch fixes this, this should be considered as a bugfix

[issue11350] __setitem__()'s problem of dbm.dumb object pointed out by comments

2011-02-28 Thread Ray.Allen
New submission from Ray.Allen : By reading the Lib/dbm/dumb.py source, there seems to be an distinct problem which is pointed out in comments: the __setitem__() should call self._commit() in order to keep .dat file and .dir file consist. Here is a piece of comment found at the end of __setitem

[issue11351] (test_os) os.sendfile() error

2011-02-28 Thread Steffen Daode Nurpmeso
New submission from Steffen Daode Nurpmeso : Antoine, i made you noisy because you took care about Issue11323. I'm at r88671 (271057c7c6f3). I'm opening this because the buildbot URL (thanks) doesn't show anything about sendfile(2). 12:47 ~/arena/code.extern.repos/py3k.hg $ ./python.exe -Wd -m t

[issue11351] (test_os) os.sendfile() error

2011-02-28 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: It's about the headers[]: def test_headers(self): total_sent = 0 sent = os.sendfile(self.sockno, self.fileno, 0, 4096, headers=[b"x" * 512]) total_sent += sent print("

[issue11352] Buf in cgi module doc

2011-02-28 Thread Pierre Quentel
New submission from Pierre Quentel : Hi, I wrote a patch for the cgi module in version 3.2rc1 (#4953). Small changes should be done to the documentation of this module to reflect the changes in the module API : - in section "20.2.2. Using the cgi module" original text : "If a field represent

[issue11352] Bug in cgi module doc

2011-02-28 Thread Pierre Quentel
Pierre Quentel added the comment: "bug", not "buf"... -- title: Buf in cgi module doc -> Bug in cgi module doc ___ Python tracker ___ ___

[issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent

2011-02-28 Thread Senthil Kumaran
Senthil Kumaran added the comment: Guy, if the issue you describe in relevant to py3.x or 2.7, can you open a new issue? -- nosy: +orsenthil ___ Python tracker ___ _

[issue11351] (test_os) os.sendfile() error

2011-02-28 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: posixmodule.c: iov_setup(): IOV[i]: buffer:0x10152b8f0, len:512 iov_setup() leave ok before sendfile: sf=0x7fff5fbfb410, sf.headers=0x10036c780 sf.headers[0].iov_base=0x10152d950, .iov_len=512

[issue1720250] PyGILState_Ensure does not acquires GIL

2011-02-28 Thread Nick Coghlan
Nick Coghlan added the comment: Given the deprecation of PyEval_ReleaseLock in issue10913, should this be closed as "out of date"? -- nosy: +ncoghlan ___ Python tracker ___ _

[issue11350] __setitem__()'s problem of dbm.dumb object pointed out by comments

2011-02-28 Thread R. David Murray
R. David Murray added the comment: Can you construct a test case that demonstrates the corruption? -- nosy: +r.david.murray stage: -> test needed ___ Python tracker ___ ___

[issue11342] ResourceWarning: unclosed file <_io.TextIOWrapper

2011-02-28 Thread Éric Araujo
Éric Araujo added the comment: So the patch fixes the resource warnings? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue11351] (test_os) os.sendfile() error

2011-02-28 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Did you know that 'sbytes' is not adjusted to match possibly existent headers and trailers in posixmodule.c? This however is required according to Mac OS X 'man 2 sendfile'. I'll attach a simple, naive patch for a very intelligent and outstanding oper

[issue11351] Mac OS X os.sendfile()

2011-02-28 Thread Steffen Daode Nurpmeso
Changes by Steffen Daode Nurpmeso : -- title: (test_os) os.sendfile() error -> Mac OS X os.sendfile() ___ Python tracker ___ ___ Pytho

[issue11281] smtplib: add ability to bind to specific source IP address/port

2011-02-28 Thread Paulo Scardine
Paulo Scardine added the comment: Patch attached. -- Added file: http://bugs.python.org/file20944/smtp_lib_source_address.patch ___ Python tracker ___ __

[issue10524] Patch to add Pardus to supported dists in platform

2011-02-28 Thread Éric Araujo
Éric Araujo added the comment: Marc-André already approved it; he must just have lacked time. We’re all volunteers with a lot of bugs on our radar, so thanks for the reminder. Marc-André: I can commit this if you want. -- ___ Python tracker

[issue11281] smtplib: add ability to bind to specific source IP address/port

2011-02-28 Thread Paulo Scardine
Paulo Scardine added the comment: oops... -- Added file: http://bugs.python.org/file20945/smtp_lib_source_address.patch ___ Python tracker ___ __

[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-28 Thread R. David Murray
R. David Murray added the comment: We could, however, raise SkipTest if getpriority returns 19 or higher with a message like "unable to reliably test setpriority at current nice level of NN". My guess is that no system we support has a lower upper limit on nice. If someone wants to customiz

[issue11281] smtplib: add ability to bind to specific source IP address/port

2011-02-28 Thread Paulo Scardine
Paulo Scardine added the comment: Sorry for the last post, I had the impression that I forgot to attach the patch. I'm slow this Monday. -- ___ Python tracker ___ _

[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-28 Thread R. David Murray
R. David Murray added the comment: To be clear: raise SkipTest if prio is 19 or above *and* the increment fails. -- ___ Python tracker ___ __

[issue11351] Mac OS X os.sendfile()

2011-02-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Likely explanation is http://bugs.python.org/issue10882#msg129555. -- nosy: +giampaolo.rodola ___ Python tracker ___ __

[issue11301] cookielib.LWPCookieJar.save() doesn't save cookies

2011-02-28 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- resolution: -> invalid stage: -> committed/rejected ___ Python tracker ___ ___ Python-bugs-list mail

[issue11351] (test_os) os.sendfile() error

2011-02-28 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Before i'm going down, here is the paragraph from 'man 2 sendfile': When a header or trailer is specified the value of len returned will include the size of header or trailer sent. The user should provide suf- ficiently large value of len as argum

[issue11351] Mac OS X os.sendfile()

2011-02-28 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: (But see msg12970. And the test runs fine with my patch applied.) On Mon, Feb 28, 2011 at 02:17:46PM +, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Likely explanation is http://bugs.python.org/issue10882#msg129555. > > -

[issue11351] Mac OS X os.sendfile()

2011-02-28 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: (Should have been msg129706, sorry.) P.S.: yes, you're right. But now: issue 10882 is on adding os.sendfile(), not on fixing errors on os.sendfile(). ;-) -- ___ Python tracker

[issue11351] Mac OS X os.sendfile()

2011-02-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Your patch is not cleaned up. There are strange things like: +ret ^= ret; (while would you xor an off_t?) and +do {off_t x = (*buf)[i].len; +(*iov)[i].iov_len = x; +ret += x; +} while (0);

[issue1720250] PyGILState_Ensure does not acquires GIL

2011-02-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Given the deprecation of PyEval_ReleaseLock in issue10913, should this > be closed as "out of date"? Indeed :) -- resolution: -> out of date stage: test needed -> status: open -> closed ___ Python tracker

[issue11351] Mac OS X os.sendfile()

2011-02-28 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Will this do? Otherwise feel free to adjust the patch the way Python needs it, i'll learn from that, then, for possible future things. (I need to go down now.) On Mon, Feb 28, 2011 at 02:37:16PM +, Antoine Pitrou wrote: > > Antoine Pitrou adde

[issue11351] Mac OS X os.sendfile()

2011-02-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> giampaolo.rodola nosy: +rosslagerwall stage: -> patch review ___ Python tracker ___ ___

[issue11353] Python 2.7.1 cannot be built by 2.x baselines of Python

2011-02-28 Thread David
New submission from David : I tried to download and install the latest Python tarball (2.7.1) and use Python 2.6 to execute "setup.py". I got the error "No module named sysconfig" when running setup.py. "sysconfig" was introduced with Python 3.2 (per http://docs.python.org/dev/library/sysconf

[issue11353] Python 2.7.1 cannot be built by 2.x baselines of Python

2011-02-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: The way to build Python is to run "./configure" followed by "make". This is explained in the README. -- nosy: +barry, pitrou resolution: -> invalid status: open -> closed ___ Python tracker

[issue11354] argparse: nargs could accept range of options count

2011-02-28 Thread Wojciech Muła
New submission from Wojciech Muła : Hi, sometimes it is needed to grab variable, but limited, number of options. For example --point could accept 2, 3 or 4 values: (x,y) or (x,y,z) or (x,y,z,w). Current version of argparse requires postprocessing: parser.add_argument('--point', action='a

[issue11354] argparse: nargs could accept range of options count

2011-02-28 Thread Wojciech Muła
Wojciech Muła added the comment: tests -- Added file: http://bugs.python.org/file20948/test.py ___ Python tracker ___ ___ Python-bugs

[issue11342] ResourceWarning: unclosed file <_io.TextIOWrapper

2011-02-28 Thread LW
LW added the comment: only the sysconfig.py was patched, the rest were "reject'ed." no compilation yet at this time. -- ___ Python tracker ___ _

[issue8728] 2.7 regression in httplib.py: AttributeError: 'NoneType' object has no attribute 'makefile'

2011-02-28 Thread Ryan Coyner
Changes by Ryan Coyner : -- nosy: +rcoyner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue8594] Add a "source_address" option to ftplib

2011-02-28 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Committed in r88679. -- versions: +Python 3.3 -Python 3.2 ___ Python tracker ___ ___ Python-bugs-

[issue11351] Mac OS X os.sendfile()

2011-02-28 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: This version uses Py_ssize_t for the lengths and seems to be more Python-style beside that, too. It compiles clean and the test is ok. -- Added file: http://bugs.python.org/file20949/issue11351-2.patch ___

[issue11348] test_os: test_set_get_priority() fails when high niceness is set

2011-02-28 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Committed in r88680. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue8594] Add a "source_address" option to ftplib

2011-02-28 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue11355] os.mkdir() and os.mkdirat() don't apply SUID/SGID permissions

2011-02-28 Thread Arfrever Frehtes Taifersar Arahesis
New submission from Arfrever Frehtes Taifersar Arahesis : os.mkdir() and os.mkdirat() use libc's mkdir() and mkdirat(), which can ignore SUID/SGID permissions. This problem occurs at least on systems using glibc. The solution is to call chmod() / fchmodat() to ensure that given directory has

[issue11355] os.mkdir() and os.mkdirat() don't apply SUID/SGID permissions

2011-02-28 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue11355] os.mkdir() and os.mkdirat() don't apply SUID/SGID permissions

2011-02-28 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: The new patch restores respecting of umask. -- Added file: http://bugs.python.org/file20951/python-mkdir.patch ___ Python tracker

[issue11355] os.mkdir() and os.mkdirat() don't apply SUID/SGID permissions

2011-02-28 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : Removed file: http://bugs.python.org/file20950/python-mkdir.patch ___ Python tracker ___ ___

[issue11355] os.mkdir() and os.mkdirat() don't apply SUID/SGID permissions

2011-02-28 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: A side effect of this patch is that it fixes failure of test_exist_ok_existing_directory() from test_os.py in situation when top-level directory of Python sources has SGID bit set. (test_exist_ok_existing_directory() exists only in Python

[issue11347] libpython3.so: Broken soname and linking

2011-02-28 Thread Martin v . Löwis
Martin v. Löwis added the comment: > The -hl -> -h part seems correct though. Indeed. -- ___ Python tracker ___ ___ Python-bugs-list

[issue11347] libpython3.so: Broken soname and linking

2011-02-28 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: "Having the soname be libpython3 is the whole point of the library": I think that the point of this library is "libpython3.so" filename, not soname. Everything should still work if libpython3.so had no soname at all. (If somebody has inst

[issue11347] libpython3.so: Broken soname and linking

2011-02-28 Thread Martin v . Löwis
Martin v. Löwis added the comment: > "Having the soname be libpython3 is the whole point of the library": > I think that the point of this library is "libpython3.so" filename, > not soname. Everything should still work if libpython3.so had no > soname at all. IIUC, the linker will hard-code the

[issue11140] threading.Lock().release() raises _thread.error, not RuntimeError

2011-02-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed in r88682, thank you! -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker _

[issue11341] test_os fails

2011-02-28 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: Alright, digging a little further, it's a kernel bug introduced by this commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4a3956c790290efeb647bbb0c3a90476bb57800e Note that this should only affect 64-bit systems (comp

[issue11349] _pickle should implement the module finalisation protocol

2011-02-28 Thread Nick Coghlan
Nick Coghlan added the comment: In that case, the request should probably read "_pickle should implement the module finalisation protocol, and module finalisation should be designed so that doing so isn't a recipe for segfaults". It strikes me as being very similar to the existing problems we

[issue11356] Include module name on ImportError

2011-02-28 Thread Nick Coghlan
New submission from Nick Coghlan : Catching ImportError in order to switch to an alternate implementation can mask real failures in imported modules. Attaching the module name as an attribute would allow this to be handled correctly by doing something like: try: import simplejson except Impor

[issue11349] _pickle should implement the module finalisation protocol

2011-02-28 Thread Benjamin Peterson
Benjamin Peterson added the comment: It's a chicken and egg problem because proper module finalization techniques like #812369 are bogged down by static globals in extension modules, and proper state storage in modules is prevented by proper module finalization. -- __

[issue11356] Include module name on ImportError

2011-02-28 Thread Ram Rachum
Changes by Ram Rachum : -- nosy: +cool-RR ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent

2011-02-28 Thread Guy Kloss
Guy Kloss added the comment: I would open a new issue if I had it verified. But I can't verify it right now, as I cannot install the dependencies for a Py2.7 (or 3.x) for running my failing code on the server (running Ubuntu Lucid/LTS). Unless you're saying I should open an issue for it anywa

[issue10866] Add sethostname()

2011-02-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed in r88685 (3.3), closing. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue11341] test_os fails

2011-02-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the investigation, Charles-François. I'm closing as invalid, then. -- resolution: -> invalid status: open -> closed ___ Python tracker

[issue10900] bz2 module fails to uncompress large files

2011-02-28 Thread Eric Wolf
Eric Wolf added the comment: I'm experiencing the same thing. My script works perfectly on a 165MB file but fails after reading 900,000 bytes on a 22GB file. My script uses a buffered bz2file.read and is agnostic about end-of-lines. Opening with "rb" does not help. It is specifically written

[issue11041] On the distutils2 documentation, 'requires-python' shouldn't be documented as *multi

2011-02-28 Thread Kelsey
Kelsey added the comment: Fixed in my bitbucket fork. https://bitbucket.org/khightower/distutils2/changeset/ee9e580e5000 -- nosy: +kelseyhightower ___ Python tracker ___ __

[issue11357] Add support for PEP 381 -- Mirror Authenticity

2011-02-28 Thread Kelsey
New submission from Kelsey : Distutils2 should provide support for verifying a mirrors authenticity as described in PEP 381 -- Mirror Authenticity. -- assignee: tarek components: Distutils2 messages: 129736 nosy: alexis, eric.araujo, kelseyhightower, tarek priority: normal severity: nor

[issue11357] Add support for PEP 381 -- Mirror Authenticity

2011-02-28 Thread Kelsey
Kelsey added the comment: I have started on an implementation in my distutil2 patch-queue on bitbucket. Link to code, tests, and documentation: https://bitbucket.org/khightower/distutils2-patch-queue/qseries?apply=t&qs_apply=mirror-authenticity Outstanding items include back porting the SSL

Re: [issue11306] mailbox should test for errno.EROFS

2011-02-28 Thread Senthil Kumaran
On Thu, Feb 24, 2011 at 03:07:10PM +, R. David Murray wrote: > Creating a test for this may not be practical :( Then should we just go ahead with this change as it seems reasonable one. -elif e.errno == errno.EACCES:

[issue10516] Add list.clear() and list.copy()

2011-02-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch is fine. Do consider using assertIsNot() in the tests. Then go ahead and apply it. The OverflowError in bytearray.pop() is a bug, please open a separate report for it and make a patch changing it to IndexError. Assign that bug report to me.

[issue11357] Add support for PEP 381 -- Mirror Authenticity

2011-02-28 Thread Kelsey
Changes by Kelsey : -- keywords: +patch Added file: http://bugs.python.org/file20953/mirror-authenticity.patch ___ Python tracker ___

[issue10516] Add list.clear() and list.copy()

2011-02-28 Thread Georg Brandl
Georg Brandl added the comment: Hmm, shouldn't self.__class__(self) be a good default implementation of copy()? I'd expect any sequence to support this way of creation from another sequence, even if it's inefficient. -- ___ Python tracker

[issue11356] Include module name on ImportError

2011-02-28 Thread Georg Brandl
Georg Brandl added the comment: This is a dupe of #1559549. -- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> ImportError needs attributes for module and file name ___ Python tracker

[issue11358] Please replace the use of pickle in multiprocessing with json.

2011-02-28 Thread david
New submission from david : Please replace the use of pickle in multiprocessing with json. -- messages: 129742 nosy: db priority: normal severity: normal status: open title: Please replace the use of pickle in multiprocessing with json. ___ Python tra

[issue11358] Please replace the use of pickle in multiprocessing with json.

2011-02-28 Thread Alex
Alex added the comment: Why? JSON is incapable of representing most Python datastructures that can be pickled (i.e. anything that isn't a list, tuple, dict, int, or str). -- nosy: +alex ___ Python tracker __

[issue11359] Please replace the use of pickle in subprocess with json.

2011-02-28 Thread david
New submission from david : Please replace the use of pickle in subprocess with json. -- messages: 129744 nosy: db priority: normal severity: normal status: open title: Please replace the use of pickle in subprocess with json. ___ Python tracker

[issue11140] threading.Lock().release() raises _thread.error, not RuntimeError

2011-02-28 Thread aaugustin
aaugustin added the comment: Shouldn't this be fixed in _dummy_thread too? Attached patch contains fix + test. (Unfortunately, I was not able to run the tests with my patch: `python3.2 -m test.regrtest test_dummy_thread` tests my 'system' version, not my svn checkout. I did not change the t

[issue11359] Please replace the use of pickle in subprocess with json.

2011-02-28 Thread Ezio Melotti
Changes by Ezio Melotti : -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Please replace the use of pickle in multiprocessing with json. ___ Python tracker

[issue11358] Please replace the use of pickle in multiprocessing with json.

2011-02-28 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Library (Lib) stage: -> needs patch type: -> feature request versions: +Python 3.3 ___ Python tracker ___