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

2011-03-01 Thread Raymond Hettinger
Raymond Hettinger 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. The copy() method isn't being proposed for MutableSequence be

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

2011-03-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hello, > Shouldn't this be fixed in _dummy_thread too? > > Attached patch contains fix + test. Oops, thanks for noticing. > (Unfortunately, I was not able to run the tests with my patch: > `python3.2 -m test.regrtest test_dummy_thread` tests my 'system' > ve

[issue11349] _pickle should implement the module finalisation protocol

2011-03-01 Thread Nick Coghlan
Nick Coghlan added the comment: We might be able to tapdance our way around the issue by falling back to the old mechanism when dealing with extension modules without traverse/clear/dealloc methods. -- ___ Python tracker

[issue11349] _pickle should implement the module finalisation protocol

2011-03-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Not sure why #812369 is bogged down. The patch simply needs updating for 3.x. -- nosy: +pitrou ___ Python tracker ___ _

[issue1559549] ImportError needs attributes for module and file name

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

[issue8927] Handle version incompatibilities in dependencies

2011-03-01 Thread Éric Araujo
Éric Araujo added the comment: Re: title, I don’t know how to phrase it best. What exactly is the behavior you request? I put “handle” as in “do the right thing”, that is, “don’t install the newest version but the one that satisfies all predicates”. I softened “conflicts” to “incompatibili

[issue9436] test_sysconfig failure

2011-03-01 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue7867] Proposed FAQ entry on pass-by-? semantics and the meaning of 'variable' in python

2011-03-01 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue8933] Invalid detection of metadata version

2011-03-01 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I'll get down to it. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue10900] bz2 module fails to uncompress large files

2011-03-01 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: @Eric.Wolf Could you try with this: # Read in anohter chunk of the file # NOTE: It's possible that an XML tag will be greater than buffsize # This will break in that situation -newb = self.fp.read(

[issue11360] In documentation of getopt, advertise argparse instead of optparse

2011-03-01 Thread Daniel Haertle
New submission from Daniel Haertle : At the beginning of http://docs.python.org/dev/library/getopt.html the line "A more convenient, flexible, and powerful alternative is the optparse module." routes the user to optparse. Since optparse is deprecated in favor of argparse, this line is no more

[issue11351] Mac OS X os.sendfile()

2011-03-01 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: I'm trashing your mailbox, but http://bugs.python.org/file20949/issue11351-2.patch should do 'total+=blen' not 'total+=len'. Anyway i attach yet a third patch which does some code cleanup in general and is a bit more of my very own coding style, becau

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

2011-03-01 Thread Daniel Haertle
Daniel Haertle added the comment: Hi Wojciech, in your tests, at def test_add_argument10(self): "nargs = (0, 1) => optimized to '?'" opt = self.add_argument(1, None) self.assertEqual(opt.nargs, argparse.ONE_OR_MORE) you should change "argparse.ONE_OR_MORE" to "argp

[issue8933] Invalid detection of metadata version

2011-03-01 Thread Filip Gruszczyński
Changes by Filip Gruszczyński : Removed file: http://bugs.python.org/file20942/8933.patch ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue8933] Invalid detection of metadata version

2011-03-01 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Patch with tests. Hope this is enough. -- Added file: http://bugs.python.org/file20956/8933.patch ___ Python tracker ___ ___

[issue11351] Mac OS X os.sendfile()

2011-03-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well the third patch has a lot of spurious style changes that make it harder to spot the actual changes. -- ___ Python tracker ___ ___

[issue11351] Mac OS X os.sendfile()

2011-03-01 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Aah, unfortunately - what a shame, this beautiful language ... But do i need to re-post the real (ouch!) issue11351-2.patch, i.e. with 'total+=blen' instead of 'total+=len'? Or is it sufficient now with these comments (for Giampaolo')? > Antoine

[issue11324] ConfigParser(interpolation=None) doesn't work

2011-03-01 Thread Tobias Brink
Tobias Brink added the comment: I added a test but I am not too familiar with the Python test suite. Please check if the "test_init_takes_interpolation_none" test is necessary because the test suite also fails without it if my patch is not applied. Feel free to remove it if it is superfluou

[issue11351] Mac OS X os.sendfile()

2011-03-01 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: Maybe Giampaolo' should at least replace these two PyArg_ParseTupleAndKeywords() near (unpatched) line 5942, because doing it like this is messes up (at least) vim(1) group detection, resulting in a lot of bold red mis-brace warnings further on? ---

[issue11361] suggestion for os.kill(pid,CTRL_C_EVENT)

2011-03-01 Thread Igor
New submission from Igor : Hello! I see some 'skip' in test_os.py @unittest.skip("subprocesses aren't inheriting CTRL+C property") def test_CTRL_C_EVENT(self): I think, problem with calling SetConsoleCtrlHandler(NULL,0) in parent process, rather in child. If call SetConsoleCtrlHandle

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

2011-03-01 Thread david
david added the comment: On 1 March 2011 18:01, Alex wrote: > > 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). I would have suggested yaml (using safe_load() ) .

[issue11351] Mac OS X os.sendfile()

2011-03-01 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Please try to provide a patch which fixes (as in "makes the test pass") this specific issue only. As for other changes such as the code restyling you can open a separate ticket with another patch. -- ___ Python

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

2011-03-01 Thread david
david added the comment: Um this isn't a duplicate this is addressing a different module to multiprocessing. Currently in subprocess you can almost remove the use of pickle with little to no side-effects. -- ___ Python tracker

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

2011-03-01 Thread david
david added the comment: Can you please re-open this bug ? (unless you feel otherwise). -- ___ Python tracker ___ ___ Python-bugs-lis

[issue11361] suggestion for os.kill(pid,CTRL_C_EVENT)

2011-03-01 Thread Igor
Changes by Igor : -- keywords: +patch Added file: http://bugs.python.org/file20958/1.patch ___ Python tracker ___ ___ Python-bugs-list

[issue11324] ConfigParser(interpolation=None) doesn't work

2011-03-01 Thread Éric Araujo
Éric Araujo added the comment: Thanks, the configparser maintainer will review your patch. Łukasz, you may want to use assertIsNone when you commit. -- keywords: +needs review stage: -> patch review ___ Python tracker

[issue11351] Mac OS X os.sendfile()

2011-03-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Maybe Giampaolo' should at least replace these two > PyArg_ParseTupleAndKeywords() near (unpatched) line 5942, > because doing it like this is messes up (at least) vim(1) group > detection, resulting in a lot of bold red mis-brace warnings > further on? P

[issue11351] Mac OS X os.sendfile()

2011-03-01 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: So this is fixed -2.patch supplemented only with PyArg_ParseTupleAndKeywords() fixed in a way that re-enables correct syntax highlighting. -- Added file: http://bugs.python.org/file20959/issue11351-4.patch

[issue11351] Mac OS X os.sendfile()

2011-03-01 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: (GMail imposes a five minute or so delay when used over SMTP, so the timeline sometimes looks unfortunate.) So, finally, -2.patch only fixed with 'blen' for 'len'. Compiles and test ok. > Giampaolo Rodola' added the comment: > > Please try to provide

[issue11351] Mac OS X os.sendfile()

2011-03-01 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: But, dear Antoine, i don't know *any* editor that is capable to handle the following code correctly: #ifdef __APPLE__ if (!PyArg_ParseTupleAndKeywords(args, kwdict, "iiO&O&|OOi:sendfile", keywords, &out, &in, _parse_off_t, &offset, _parse_o

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

2011-03-01 Thread david
david added the comment: I don't have 3.3 installed so I cannot test it, but here is a patch for 2.6. I am sure it breaks stuff - are there tests for the subprocess module that would cover the cases that pickle was used for? --- subprocess.py.orig 2011-03-02 00:47:59.0 +1100 +++ su

[issue11351] Mac OS X os.sendfile()

2011-03-01 Thread Steffen Daode Nurpmeso
Changes by Steffen Daode Nurpmeso : Removed file: http://bugs.python.org/file20943/posixmodule.naive-apple-patch ___ Python tracker ___ ___ Py

[issue11351] Mac OS X os.sendfile()

2011-03-01 Thread Steffen Daode Nurpmeso
Changes by Steffen Daode Nurpmeso : Removed file: http://bugs.python.org/file20946/issue11351.patch ___ Python tracker ___ ___ Python-bugs-lis

[issue11351] Mac OS X os.sendfile()

2011-03-01 Thread Steffen Daode Nurpmeso
Changes by Steffen Daode Nurpmeso : Removed file: http://bugs.python.org/file20949/issue11351-2.patch ___ Python tracker ___ ___ Python-bugs-l

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

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

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

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: Why do you want to replace pickle by json? -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-l

[issue11351] Mac OS X os.sendfile()

2011-03-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > But, dear Antoine, i don't know *any* editor that is capable to > handle the following code correctly: > > #ifdef __APPLE__ > if (!PyArg_ParseTupleAndKeywords(args, kwdict, "iiO&O&|OOi:sendfile", > keywords, &out, &in, _parse_off_t, &offset, _par

[issue11349] _pickle should implement the module finalisation protocol

2011-03-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: http://mail.python.org/pipermail/python-dev/2009-October/093057.html 2011/3/1 Antoine Pitrou : > > Antoine Pitrou added the comment: > > Not sure why #812369 is bogged down. The patch simply needs updating for 3.x. > > -- > nosy: +pitrou > > ___

[issue11361] suggestion for os.kill(pid,CTRL_C_EVENT)

2011-03-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +gregory.p.smith versions: +Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-bugs-list ma

[issue11351] Mac OS X os.sendfile()

2011-03-01 Thread Steffen Daode Nurpmeso
Steffen Daode Nurpmeso added the comment: I agree with that. > Antoine Pitrou added the comment: > If you are asking your editor to simply edit test, it should work fine. -- ___ Python tracker __

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

2011-03-01 Thread david
david added the comment: >From my reading of the code it may be possible if I execute a command via >Popen that the child had output that went to stderror, because stderror is >associated with the fd of errpipe_write, and it was not to be 'trusted' (lets >say I ran it as another user) then it

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

2011-03-01 Thread david
david added the comment: Actually I don't think that is possible mmm. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

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

2011-03-01 Thread david
david added the comment: As the child will have already have exec'ed there will be no exception raised --> so the parent shouldn't pickle.load from stderror... So unless there is a path where the parent will end up pickle.load ing the exception that case I put before is not possible. ---

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

2011-03-01 Thread R. David Murray
R. David Murray added the comment: This would increase the overhead to no purpose, as far as I can see. Ask or Jesse can reopen this if they think it is worth considering. -- nosy: +asksol, jnoller, r.david.murray resolution: -> rejected status: open -> closed ___

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

2011-03-01 Thread david
david added the comment: Um ok. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mail

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

2011-03-01 Thread Jesse Noller
Jesse Noller added the comment: I concur with RDM. We need complex data structures, and switching to JSON represents a non zero amount of work, isn't as fast and pickle works well. If you want to use JSON as a transport, I would do custom subclassing. -- _

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

2011-03-01 Thread david
david added the comment: Fair enough. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

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

2011-03-01 Thread Alexis Metaireau
Alexis Metaireau added the comment: Some nitpicks: In mirrors.get_server_key, the documentation is not up to date with your last changes (raises an error if there is a problem instead of returning None) You do use the name 'package' while talking about distributions or projects. Please be su

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

2011-03-01 Thread Alexis Metaireau
Alexis Metaireau added the comment: Antoine Pitrou on #python-dev made interesting remarks about the validation: 16:19 < __ap__> hmm the way the patch does validation is bogus 16:22 < __ap__> because it opens the URL a first time, validates it, then opens it a second time with urlopen() 16:22 <

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

2011-03-01 Thread Kelsey
Kelsey added the comment: Thanks for the feedback! I agree with the issues raised and will rework the patch to address them. -- ___ Python tracker ___ _

[issue11322] encoding package's normalize_encoding() function is too slow

2011-03-01 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue11362] image/webp missing from mimetypes.py

2011-03-01 Thread Richard Rabbat
New submission from Richard Rabbat : image/webp is missing from the mimetypes.py list of valid mimetypes. webp is an open-source image format and uses vp8 as a codec. -- components: Library (Lib) messages: 129786 nosy: Richard.Rabbat priority: normal severity: normal status: open title:

[issue10900] bz2 module fails to uncompress large files

2011-03-01 Thread Eric Wolf
Eric Wolf added the comment: I tried the change you suggested. It still fails but now at 572,320 bytes instead of 900,000. I'm not sure why the difference in bytes read. I'll explore this more in a bit. I also converted the BZ2 to GZ and used the gzip module. It's failing after reading 46628

[issue11360] In documentation of getopt, advertise argparse instead of optparse

2011-03-01 Thread Éric Araujo
Éric Araujo added the comment: This was overlooked in r81490, which added the note pointing to argparse. Fixed in r88696 for the py3k branch (I’ll backport later to 3.2 and 2.7), thanks. -- nosy: +eric.araujo resolution: -> fixed stage: -> committed/rejected status: open -> closed ve

[issue11362] image/webp missing from mimetypes.py

2011-03-01 Thread R. David Murray
R. David Murray added the comment: Is there an IANA registration for this? Any other standards references to it would be helpful, if it doesn't. See issue 10730 for an example of the research that went in to the last mimetypes addition. -- nosy: +r.david.murray versions: -Python 2.

[issue9276] pickle should support methods

2011-03-01 Thread Ram Rachum
Ram Rachum added the comment: Okay, as an initial suggestion, how about we give every function a `.__parent_class__` attribute saying which class it is a method of? I feel this is a bit of a duct tape solution, but I don't see any other alternative. -- ___

[issue11363] Curses - add missing functions to doc

2011-03-01 Thread Sandro Tosi
New submission from Sandro Tosi : Following up http://mail.python.org/pipermail/docs/2011-January/002922.html , I did a check on all the documented functions of curses and those available from the module, and wrote a patch to include in the doc the missing ones (text is mainly brought by manpa

[issue11326] connect_ex() implementation missing for SSL sockets

2011-03-01 Thread Florian Mayer
Florian Mayer added the comment: Thanks for the fast response and for fixing this. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue11363] Curses - add missing functions to doc

2011-03-01 Thread Sandro Tosi
Sandro Tosi added the comment: On Tue, Mar 1, 2011 at 19:50, Sandro Tosi wrote: > > New submission from Sandro Tosi : > > Following up http://mail.python.org/pipermail/docs/2011-January/002922.html , > I did a check on all the documented functions of curses and those available > from the modu

[issue10900] bz2 module fails to uncompress large files

2011-03-01 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: > I've attached the strace output. I was getting an error with the sbrk > parameter, so I left it out. Yeah, sbrk is not a syscall ;-) > Let me know if there's anything else I can provide. Stupid questions: - have you checked the file's md5sum ? - w

[issue11364] Move from distutils.sysconfig to sysconfig in test_osx_env

2011-03-01 Thread Éric Araujo
New submission from Éric Araujo : I’m working on removing uses of distutils from the standard library. I found only one remaining use of distutils.sysconfig; changing it to use sysconfig should not change the behavior of the test, but I can’t test, so please review attached patch. --

[issue11364] Move from distutils.sysconfig to sysconfig in test_osx_env

2011-03-01 Thread Éric Araujo
Éric Araujo added the comment: (I thought auto-nosy was set for Mac.) -- nosy: +ned.deily, ronaldoussoren ___ Python tracker ___ ___

[issue9276] pickle should support methods

2011-03-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: > how about we give every function a `.__parent_class__` > attribute saying which class it is a method of? Won't work. The same function can be used in multiple classes. The function object is independent of the class. This is conceptually no different

[issue9276] pickle should support methods

2011-03-01 Thread Ram Rachum
Ram Rachum added the comment: Raymond: I don't think this matters. We don't need a canonical `.__parent_class__`, we just need to know where that function is defined so we could find it when unpickling. In the example that you gave, `f` would have a `.__parent_class__` of `None`, and it would

[issue11364] Move from distutils.sysconfig to sysconfig in test_osx_env

2011-03-01 Thread Ned Deily
Ned Deily added the comment: LGTM -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/ma

[issue11364] Move from distutils.sysconfig to sysconfig in test_osx_env

2011-03-01 Thread Éric Araujo
Éric Araujo added the comment: Thanks for reviewing. Have you had time to test it or shall I just commit and wait for the buildbots master to come at me with a big knife if I break them? -- ___ Python tracker __

[issue9276] pickle should support methods

2011-03-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: This isn't worth introducing poorly thought out hacks. -- ___ Python tracker ___ ___ Python-bugs-

[issue11364] Move from distutils.sysconfig to sysconfig in test_osx_env

2011-03-01 Thread Ned Deily
Ned Deily added the comment: Go for it. It's highly unlikely to break anything but, if so, redirect the knives my way. I verified that the results from the two sysconfigs are the same. I don't know that there are any buildbots that currently build a framework configuration anyway. --

[issue9276] pickle should support methods

2011-03-01 Thread Ram Rachum
Ram Rachum added the comment: > This isn't worth introducing poorly thought out hacks. Being able to pickle unbound methods is important. In my project I have objects that refer to unbound methods. Now these objects are unpickleable. I can't save them to disk and I can't use the multiprocessi

[issue9276] pickle should support methods

2011-03-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Being able to pickle unbound methods is important. In my project I have > objects that refer to unbound methods. Now these objects are > unpickleable. I can't save them to disk and I can't use the > multiprocessing module on them. That's a big problem. Judgi

[issue9276] pickle should support methods

2011-03-01 Thread Ram Rachum
Ram Rachum added the comment: > [...] try to whip up a patch and upload it if it ends up not too hackish. To have a non-hackish patch we need a non-hackish idea. The `.__parent_class__` idea looks hackish to me, but now that I think about it, how is it more hackish than a function's `.__modu

[issue9276] pickle should support methods

2011-03-01 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue9276] pickle should support methods

2011-03-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > To have a non-hackish patch we need a non-hackish idea. The > `.__parent_class__` idea looks hackish to me, but now that I think > about it, how is it more hackish than a function's `.__module__` > attribute? Not much, agreed. You might want to call it `__nam

[issue10900] bz2 module fails to uncompress large files

2011-03-01 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: After running this under gdb, it turns out that it's actually bzlib's bzRead that's returning a BZ_STREAM_END after only 900k bytes. So it confims what I've been suspecting, i.e. that the file is corrupt (I got the error at exactly the same offset as

[issue10900] bz2 module fails to uncompress large files

2011-03-01 Thread Eric Wolf
Eric Wolf added the comment: Stupid questions are always worth asking. I did check the MD5 sum earlier and just checked it again (since I copied the file from one machine to another): ebwolf@ubuntu:/opt$ md5sum /host/full-planet-110115-1800.osm.bz2 0e3f81ef0dd415d8f90f1378666a400c /host/full

[issue9276] pickle should support methods

2011-03-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > Being able to pickle unbound methods is important. In my project I have > objects that refer to unbound methods. Now these objects are > unpickleable. I can't save them to disk and I can't use the > multiprocessing module on them. That's a big problem.

[issue11265] asyncore does not check for EAGAIN and EPIPE errno

2011-03-01 Thread Марк Коренберг
Марк Коренберг added the comment: patch updated for handling EPIPE -- title: asyncore does not check for EAGAIN errno -> asyncore does not check for EAGAIN and EPIPE errno Added file: http://bugs.python.org/file20964/z.patch ___ Python tracker

[issue11265] asyncore does not check for EAGAIN and EPIPE errno

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

[issue11365] Integrate Buildroot patches (cross-compilation)

2011-03-01 Thread STINNER Victor
New submission from STINNER Victor : "Buildroot: Making Embedded Linux easy" has patches for Python 2.7 to simplify the cross-compilation of Python: http://git.buildroot.net/buildroot/tree/package/python The maintainer, Thomas Petazzoni, told me that the 12 first patches are the most important

[issue11365] Integrate Buildroot patches (cross-compilation)

2011-03-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +eric.araujo, tarek stage: -> needs patch type: -> feature request versions: -Python 2.7 ___ Python tracker ___ __

[issue9276] pickle should support methods

2011-03-01 Thread Ram Rachum
Ram Rachum added the comment: Amaury: I don't think ForkingPickler works for unbound methods defined in user code, which are implemented as functions. I think it only works for method-descriptors and wrapper-descriptors. -- ___ Python tracker

[issue9276] pickle should support methods

2011-03-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: did you see my example above? it passes methods defined in user code. -- ___ Python tracker ___ __

[issue10900] bz2 module fails to uncompress large files

2011-03-01 Thread Eric Wolf
Eric Wolf added the comment: The only problem with the theory that the file is corrupt is that at least three people have encountered exactly the same problem with three files: http://mail.python.org/pipermail/tutor/2010-June/076343.html Colin was using an OSM planet file from some time last

[issue11365] Integrate Buildroot patches (cross-compilation)

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: buildroot-python-patches.tar.gz: today checkout of the git repository (package/python). -- Added file: http://bugs.python.org/file20965/buildroot-python-patches.tar.gz ___ Python tracker

[issue11365] Integrate Buildroot patches (cross-compilation)

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: buildboot.patch: the 12 patches combined into a single patch for Python 2.7. Note: python-2.7-001-support-for-build.patch doesn't apply cleanly on release27-maint. -- keywords: +patch Added file: http://bugs.python.org/file20966/buildroot.patch _

[issue11365] Integrate Buildroot patches (cross-compilation)

2011-03-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, the patches should be first ported to 3.3 (and need checking that they don't break anything: test suite, etc.). Then, if you want them to be examined separately, it might be better to create a separate issue for each. -- nosy: +pitrou _

[issue8841] GetoptError strings should be localized

2011-03-01 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I'd be happy to provide a patch. How about extending getopt api to something like this: >> optlist, args = getopt.getopt(['-b'], 'e', not_recognized="no %s option, >> mate!") GetoptError: no -b option, mate! Or maybe you should provide a dictionary? >>

[issue11342] ResourceWarning: unclosed file <_io.TextIOWrapper

2011-03-01 Thread Éric Araujo
Éric Araujo added the comment: Can you try updating your py3k checkout and applying with “patch -p1”? -- ___ Python tracker ___ ___ P

[issue8841] GetoptError strings should be localized

2011-03-01 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: One more solution. Maybe getopt should expose variables that hold error messages (rather than have them hardcoded in the code), that can be simply substituted by the user before he runs getopt? But I don't really like this one. -- ___

[issue10900] bz2 module fails to uncompress large files

2011-03-01 Thread Charles-Francois Natali
Charles-Francois Natali added the comment: > Stupid questions are always worth asking. I did check the MD5 sum earlier > and just checked it again (since I copied the file from one machine to > another): > > ebwolf@ubuntu:/opt$ md5sum /host/full-planet-110115-1800.osm.bz2 > 0e3f81ef0dd415d8f90f1

[issue11265] asyncore does not check for EAGAIN and EPIPE errno

2011-03-01 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Ok for EAGAIN. I'm not completely sure about EPIPE on recv() as it is not listed here: http://www.kernel.org/doc/man-pages/online/pages/man2/recv.2.html ...although I think it's ok to treat it as an alias for connection lost anyway. In pyftpdlib I treat bot

[issue11365] Integrate Buildroot patches (cross-compilation)

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: I uploaded the patch to Rietveld for a review: http://codereview.appspot.com/4253047 > Well, the patches should be first ported to 3.3 Ok, I will ask the author if he can do this job. I uploaded the patches for Python 2.7 for a review and to open the discussi

[issue8841] GetoptError strings should be localized

2011-03-01 Thread Éric Araujo
Éric Araujo added the comment: Filip: The standard way of doing localization is thanks to the gettext module. Richard: Regarding the contents of the error messages, please make specific remarks on what is lacking. -- stage: -> needs patch versions: +Python 3.3 -Python 3.2 __

[issue8841] GetoptError strings should be localized

2011-03-01 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I understand I should do something similar to what is done in argparse: from gettext import gettext as _, ngettext ... message = ngettext('conflicting option string: %s', 'conflicting option strings: %s', len(conflict

[issue10900] bz2 module fails to uncompress large files

2011-03-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Perhaps your bz2 files are simply multi-stream files? The bz2 module currently doesn't support them (it only decompresses the first stream); see issue1625 for a patch. I'm not an expert on this, but it seems you can do: $ bzip2 -tvvv foo.bz2 foo.bz2:

[issue8841] GetoptError strings should be localized

2011-03-01 Thread Richard Lowe
Richard Lowe added the comment: I don't find anything lacking about the error messages, I meant that there were no more specific exceptions, or fields in GetoptError to allow the caller to tell what was specifically wrong and provide its own localized messages. So while the defaults are unlo

[issue8841] GetoptError strings should be localized

2011-03-01 Thread Éric Araujo
Éric Araujo added the comment: Richard: It’s not common to use subclasses to allow message customization. Would gettext cover your need? -- ___ Python tracker ___ _

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

2011-03-01 Thread STINNER Victor
STINNER Victor added the comment: Fixed in Python 3.3 (r88697) and 3.2 (r88698). Thank you Ray. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue8841] GetoptError strings should be localized

2011-03-01 Thread Richard Lowe
Richard Lowe added the comment: Sure, just localizing them in the getopt implementation would be fine. I suggested subclassing to solve the more general problem of the caller being able to tell one getopt error from another, for which it is a pretty common solution. -- _

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

2011-03-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: _dummy_thread patch committed in r88699, thank you! -- ___ Python tracker ___ ___ Python-bugs-list

  1   2   >