[issue17914] add os.cpu_count()

2013-05-13 Thread Charles-François Natali
Charles-François Natali added the comment: > Well, they can be wrong sometimes, too :-) Indeed, as can I ;-) > The patch doesn't seem to rely on the glibc, so we are fine here. > Or do the other libs work likewise? sysconf(_SC_NPROCESSORS_CONF) is implemented with the above function in the gli

[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals

2013-05-13 Thread paul j3
paul j3 added the comment: I've played a bit the idea that barthard sketched. I don't have all the details worked out, but I believe this is what will happen: With parser = argparse.ArgumentParser() parser.add_argument('-w') parser.add_argument('-x', nargs='+') parser.add_argument('y'

[issue17954] Support creation of extensible enums through metaclass subclassing

2013-05-13 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-13 Thread Nick Coghlan
Nick Coghlan added the comment: I just wanted to note that there's a trivial way to prevent accidental aliases inline or in your test suite if you don't intend them: class MyEnum(Enum): assert len(MyEnum) == len(MyEnum.__members__) --

[issue17642] IDLE add font resizing hot keys

2013-05-13 Thread Roger Serwy
Roger Serwy added the comment: @Abhishek: I'd rather not require extensions to have a new method for resetting font sizes. Instead, a virtual event can be bound to a callback by the extension if it needs to know about a font change. @Alejandro: It looks like there's a bug in ZoomFont.py where

[issue13657] IDLE doesn't support sys.ps1 and sys.ps2.

2013-05-13 Thread Roger Serwy
Roger Serwy added the comment: Adding 16123 as a dependency. Resolving sys.ps1 and sys.ps2 will likely be simpler when only considering one execution mode. -- dependencies: +IDLE - deprecate running without a subprocess nosy: +roger.serwy versions: +Python 2.7, Python 3.4 _

[issue14146] IDLE: source line in editor doesn't highlight when debugging

2013-05-13 Thread Roger Serwy
Roger Serwy added the comment: On second thought, I'll wait until after the releases so that Misc/NEWS gets populated properly. -- ___ Python tracker ___ ___

[issue17972] inspect module leak docs

2013-05-13 Thread xiaobing jiang
New submission from xiaobing jiang: the inspect module leak docs. all these functions have no doc. getlineno getabsfile getblock formatannotation walktree findsource indentsize getargs formatannotationrelativeto classify_class_attrs -- assignee: docs@python components: Documentation mess

[issue14146] IDLE: source line in editor doesn't highlight when debugging

2013-05-13 Thread Roger Serwy
Roger Serwy added the comment: It won't make it in 2.7.5. Benjamin tagged the 2.7.5 release a couple of days ago. I'll apply this later tonight. -- stage: patch review -> commit review ___ Python tracker

[issue17968] memory leak in listxattr()

2013-05-13 Thread Benjamin Peterson
Benjamin Peterson added the comment: Technically a false alarm but it is a danger in the future. -- status: open -> closed ___ Python tracker ___

[issue17968] memory leak in listxattr()

2013-05-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7aa157971810 by Benjamin Peterson in branch '3.3': prevent double free in cleanup code (#17968) http://hg.python.org/cpython/rev/7aa157971810 New changeset 617cb2f978b0 by Benjamin Peterson in branch 'default': merge 3.3 (#17968) http://hg.python.or

[issue17968] memory leak in listxattr()

2013-05-13 Thread Christian Heimes
Christian Heimes added the comment: Coverity complains that your patch has introduced a double free bug. Can you have a look, please? ** CID 1021198: Double free (USE_AFTER_FREE) /Modules/posixmodule.c: 10161 http://scan5.coverity.com:8080//sourcebrowser.htm?projectId=10226#mergedDefectId=10211

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-13 Thread Nick Coghlan
Nick Coghlan added the comment: Thanks Guido, now that I fully understand your reasoning, I can accept that this is a valid "practicality beats purity" situation. -- ___ Python tracker _

[issue17971] Weird interaction between Komodo Python debugger C module & Python 3

2013-05-13 Thread Eric Promislow
Eric Promislow added the comment: I'm running it inside gdb to see if I can figure it out. I don't see a way of isolating this from the whole product. -- ___ Python tracker ___

[issue16024] Doc cleanup regarding path=fd, dir_fd, follow_symlinks, etc

2013-05-13 Thread Kaleb Robertson
Kaleb Robertson added the comment: Adding a revision of the .diff file according to akuchling's comment. -- nosy: +kkvr05 Added file: http://bugs.python.org/file30255/lch.supports_set.doc.cleanup.1-revised.diff ___ Python tracker

[issue17971] Weird interaction between Komodo Python debugger C module & Python 3

2013-05-13 Thread Benjamin Peterson
Benjamin Peterson added the comment: Since this seems to be some sort of interaction between Komodo's code and Python (it works for me with vanilla Python 3), it's going to be hard to debug without seeing what this other thing is doing. -- nosy: +benjamin.peterson

[issue17971] Weird interaction between Komodo Python debugger C module & Python 3

2013-05-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +georg.brandl, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue17914] add os.cpu_count()

2013-05-13 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: Based on the last 3 messages by Ned, Charles and Antoine, I keep thinking that arguments made by Charles are very valid ones and that it would be better to return 1. I say this (partly from the 'type' argument, but), mainly, *if* its known that the underlyin

[issue17971] Weird interaction between Komodo Python debugger C module & Python 3

2013-05-13 Thread Eric Promislow
New submission from Eric Promislow: While much of Komodo's source code has been released under MIT/GPL/LGPL, the Python debugger hasn't, so I can't post it here. We can work out an arrangement later, although it might not be necessary once I describe the problem: Komodo's Python debugger was

[issue1772673] Replacing char* with const char*

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Antoine, I was referring to the discussion linked earlier > (http://mail.python.org/pipermail/python-dev/2006-February/060689.html). Ok, I've read it through. The problem is specifically with pointers-to-pointers: http://mail.python.org/pipermail/python-dev/20

[issue1772673] Replacing char* with const char*

2013-05-13 Thread Eli Bendersky
Eli Bendersky added the comment: Antoine, I was referring to the discussion linked earlier (http://mail.python.org/pipermail/python-dev/2006-February/060689.html). Users of the C API needed to recompile their code and also add preprocessor hacks to make things compatible with C and C++, AFAIU.

[issue17914] add os.cpu_count()

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Python's goal is not to emulate the suboptimal parts of other languages. > > Well, I'm sure they could have returned -1 or 0, which are valid C > long distinct from any valid integer representing a number of CPUs. If > the libc guys (and many other APIs out

[issue17914] add os.cpu_count()

2013-05-13 Thread Charles-François Natali
Charles-François Natali added the comment: > Python's goal is not to emulate the suboptimal parts of other languages. Well, I'm sure they could have returned -1 or 0, which are valid C long distinct from any valid integer representing a number of CPUs. If the libc guys (and many other APIs out t

[issue1772673] Replacing char* with const char*

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > For external APIs visible to user code, this can cause some > compatibility problems and users may need to at the very least > re-compile this code. Can you explain exactly which compatibility problems this would cause? Actually, the point is precisely to mak

[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-05-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: LGTM too. Needs test and docs. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue6208] path separator output ignores shell's path separator: / instead of \

2013-05-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: The resolution should be 'This is a gawd-awful mess created by Microsoft 30 years ago and we already do the best we sensibly can to deal with it' ;-) (and sensible people know it would be a mess from the first day). To put is another way, the answer to the ori

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-13 Thread Zachary Ware
Zachary Ware added the comment: I've come across something in the implementation here that I'd like some clarification on. What is the purpose of overriding __dir__ in Enum and EnumMeta? It doesn't change any behavior that I'm aware of, just makes things look a little nicer when someone call

[issue17945] tkinter/Python 3.3.0: peer_create doesn't instantiate Text

2013-05-13 Thread Gregory HOULDSWORTH
Gregory HOULDSWORTH added the comment: The Text instance created by the last patch has the same parent -in the Python w hierarchy- as the "model" widget regardless of the actual parent implied by the given pathname. Further, pathname is really a tk level construct: in Python this hierarchy is exp

[issue17914] add os.cpu_count()

2013-05-13 Thread Ned Batchelder
Ned Batchelder added the comment: Python's goal is not to emulate the suboptimal parts of other languages. We have dynamic typing, and so can return None from the same function that returns 1. And we have compact expressions like `cpu_count() or 1`, so we don't have to make unfortunate compr

[issue6208] path separator output ignores shell's path separator: / instead of \

2013-05-13 Thread Eric V. Smith
Eric V. Smith added the comment: I say close it. Any "shell detection" is likely to be fragile, and any changes are likely to break something. It's not worth the risk. -- ___ Python tracker

[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: Great, forget I said anything then. LGTM to the patch, feel free to commit (with update to Misc/NEWS please). -- ___ Python tracker ___ _

[issue17914] add os.cpu_count()

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > And on Linux, 1 is returned as a fallback when you don't have the > right /sys or /proc entry: > http://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/getsysstats.c > > (The enum discussion enlighted me, endless discussions are so fun!) Do y

[issue17914] add os.cpu_count()

2013-05-13 Thread Charles-François Natali
Charles-François Natali added the comment: Just for giggles, here's the glibc default implementation on non Linux platforms: http://sourceware.org/git/?p=glibc.git;a=blob;f=misc/getsysstats.c;hb=HEAD """ int __get_nprocs () { /* We don't know how to determine the number. Simply return always 1

[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-05-13 Thread Richard Oudkerk
Richard Oudkerk added the comment: When pickling a class (or instance of a class) there is already a check that the invariant getattr(sys.modules[cls.__module__], cls.__name__) == cls holds. >>> import pickle >>> class A: pass ... >>> A.__module__ = 'nonexistent' >>> pickle.dumps(A()

[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: I'd like to propose one slight tweak to the patch. (Also to enum.py.) If no module name was passed and _getframe() fails, can you set the __module__ attribute to something that will cause pickling the object to fail? That would be much better than letting

[issue6208] path separator output ignores shell's path separator: / instead of \

2013-05-13 Thread Mark Lawrence
Mark Lawrence added the comment: Can this issue to confined to the small round filing cabinet, mainly on the grounds that I find some of the wording undecipherable? -- nosy: +BreamoreBoy ___ Python tracker

[issue17950] Dynamic classes contain non-breakable reference cycles

2013-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: I think turning the __mro__ tuple into a getter is fine. As long as this works I'm okay: class C: ... mro = C.__mro__ del C assert mro[0].__name__ == 'C' (The last assert stands in for asserting that the class object must stay alive as long as the tuple re

[issue17970] Mutlithread XML parsing cause segfault

2013-05-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 3.3, Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-13 Thread Alex Gaynor
Alex Gaynor added the comment: >From PyPy's perspective we don't really care what you name this particular >bikeshed, and it's probably not that important to us (in this particular case). As far as I know IronPython is the only Python VM that doesn't have _getframe() support by default (you ne

[issue17963] Deprecate the frame hack for implicitly getting module details

2013-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: As I explained in issue 17947, I think that any Python implementation worth its salt should be able to implement sys.get_calling_module_name() (*), at least for the case where the caller is top-level code in a module body. That is a much weaker requirement

[issue17970] Mutlithread XML parsing cause segfault

2013-05-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: But this would break working code which already uses locks correctly (or some kind of pool of cached parsers) -- ___ Python tracker ___ _

[issue17970] Mutlithread XML parsing cause segfault

2013-05-13 Thread Alex Gaynor
Alex Gaynor added the comment: It could also track tids and raise an error if you attempt to use it from multiple threads. -- nosy: +alex ___ Python tracker ___

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: Here's the promised explanation why I want to keep the getframe hack. I'm sure it won't satisfy everyone, but this will have to do. There are two parts to my argument. TL;DR: (a) by implementing this hack, we will maximize user happiness; (b) I expect that

[issue17970] Mutlithread XML parsing cause segfault

2013-05-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Expat is not thread-safe at the object level, a single Parser cannot be used from multiple threads. Pyexpat could add locks to Parser objects. -- nosy: +amaury.forgeotdarc stage: -> needs patch ___ Python trac

[issue17966] Lack of consistency in PEP 8 -- Style Guide for Python Code

2013-05-13 Thread Paul Jurczak
Paul Jurczak added the comment: I admit, it is somewhat silly, but not entirely silly. -- ___ Python tracker ___ ___ Python-bugs-list

[issue17968] memory leak in listxattr()

2013-05-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2187cf880e5b by Antoine Pitrou in branch '3.3': Issue #17968: Fix memory leak in os.listxattr(). http://hg.python.org/cpython/rev/2187cf880e5b New changeset 1fa1a021ed23 by Antoine Pitrou in branch 'default': Issue #17968: Fix memory leak in os.list

[issue17968] memory leak in listxattr()

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Should be fixed now. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: One thing: "int i" should be "Py_ssize_t i". -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue17969] multiprocessing crash on exit

2013-05-13 Thread Richard Oudkerk
Richard Oudkerk added the comment: > We can consider two options then: > 1) A multiprocessing specific fix. Removing this handle close gil > release (which is superfluous, since these calls aren't blocking in any > real sense) will certainly remove _this_ instance of the crash. An > alternat

[issue17969] multiprocessing crash on exit

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le lundi 13 mai 2013 à 16:14 +, Kristján Valur Jónsson a écrit : > I don't see the point of having 2.7 in bug fix mode if we can't fix > bugs. Delicate bug fixes may entail regressions, and we've had enough of them in 2.7.4. You've already patched your own P

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: That is not sufficient. The weakrefs may have been cleared already if the deletion comes as a result of garbage collection (which is currently the only way classes get deleted.) It is still easily demonstratably correct: The previous version _only_ re

[issue17934] Add a frame method to clear expensive details

2013-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: A downside of using this is that some extended traceback printers (such as cgitb.py in the stdlib, or and some things I've seen in web frameworks) won't be able to print the locals. And pdb's pm() function would lose its value too. So it'll remain a judgme

[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-13 Thread Phil Connell
Changes by Phil Connell : -- nosy: +isoschiz, pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue17969] multiprocessing crash on exit

2013-05-13 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Well, knowing that they crash less in 3.3 doesn't really fix the problem now, does it? We can consider two options then: 1) A multiprocessing specific fix. Removing this handle close gil release (which is superfluous, since these calls aren't blocking

[issue17950] Dynamic classes contain non-breakable reference cycles

2013-05-13 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +daniel.urban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue17934] Add a frame method to clear expensive details

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch addressing some of Nick's comments. -- Added file: http://bugs.python.org/file30252/frame_clear_alt2.patch ___ Python tracker ___

[issue17969] multiprocessing crash on exit

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, I think it's too delicate to change in 2.7 right now. As Charles-François said, daemon threads should be much less crashy in 3.3. -- ___ Python tracker __

[issue17956] add ScheduledExecutor

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > To be honest I can't find much to say about this proposal, > > Hum, OK, I thought it would be a useful addition :-) It's probably useful, but I'd have to take a closer look. It's been a long time I haven't used separate threads for timers... > Note that th

[issue17969] multiprocessing crash on exit

2013-05-13 Thread Charles-François Natali
Charles-François Natali added the comment: > Also, even though an IO call _can_ block, that doesn't mean that > we _must_ release the gil for the duration. Yes, otherwise some people will complain when the whole interpreter is stuck while a socket/NFS file handle/whatever is shutdown. This pro

[issue17969] multiprocessing crash on exit

2013-05-13 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I think that socket.close() is the exception rather than the rule here. What kind of handle is this? It can't be a socket, since that would require closesocket. Also, even though an IO call _can_ block, that doesn't mean that we _must_ release the g

[issue17956] add ScheduledExecutor

2013-05-13 Thread Charles-François Natali
Charles-François Natali added the comment: > To be honest I can't find much to say about this proposal, Hum, OK, I thought it would be a useful addition :-) > but I think it would be good if the time function were configurable (both for > test purposes, and to allow passing e.g. time.monotonic

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 13, 2013, at 02:24 PM, Nick Coghlan wrote: >Yep. Since we no longer have a compelling reason for it to be anything >else, it may as well be the human readable string. Again, why does it matter? That's the whole point of having a human readable str() an

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 13, 2013, at 02:06 PM, Antoine Pitrou wrote: >Antoine Pitrou added the comment: > >> >I agree with Nick here, there's no reason to auto-number constants >> >in >> >Python. This is not C :-) >> >> Why should they be strings? Why not object()? > >Becaus

[issue17642] IDLE add font resizing hot keys

2013-05-13 Thread Alejandro Rodas
Alejandro Rodas added the comment: I have merged the two patches: Now it queries the font size as I did in the original patch, and it also stores the position of the cursor based on Abhishek Kumar's modification of ZoomFont.py. -- Added file: http://bugs.python.org/file30251/ZoomInOut.

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-13 Thread Ethan Furman
Ethan Furman added the comment: So the repr will look like: ? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue17969] multiprocessing crash on exit

2013-05-13 Thread Richard Oudkerk
Richard Oudkerk added the comment: > In general, deallocators should have no side effects, I think. > Releaseing the GIL is certainly a side effect. Notice that socket and file objects also release the GIL when being deallocated. At least for sockets close() can block (e.g. if you you use th

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 12, 2013, at 06:51 AM, Nick Coghlan wrote: class Shape(Enum): >... square = 2 >... diamond = 1 >... circle = 3 >... alias_for_square = square I see Guido pronounced against it, but I'm just registering that I kind of like this. You could p

[issue17959] Alternate approach to aliasing for PEP 435

2013-05-13 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-13 Thread Nick Coghlan
Nick Coghlan added the comment: On 14 May 2013 00:06, "Antoine Pitrou" wrote: > > > Antoine Pitrou added the comment: > > > >I agree with Nick here, there's no reason to auto-number constants > > >in > > >Python. This is not C :-) > > > > Why should they be strings? Why not object()? > > Becau

[issue17966] Lack of consistency in PEP 8 -- Style Guide for Python Code

2013-05-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: It's not *particularly* silly[1], but I think that with Government backing, he could make it very silly. [1] I mean, the right hand side isn't silly at all and the left hand side merely does a forward aerial half turn every alternative assignment. --

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I don't want guaranteed O(1) behaviour, just O(1) for the common case > of creating a class, or a few classes, and then removing them. Then just make sure you call remove_subclass() before PyObject_ClearWeakRefs() in type_dealloc(). Really, this thing should

[issue17966] Lack of consistency in PEP 8 -- Style Guide for Python Code

2013-05-13 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > >I agree with Nick here, there's no reason to auto-number constants > >in > >Python. This is not C :-) > > Why should they be strings? Why not object()? Because strings are readable, I'd say. -- ___ Python track

[issue17968] memory leak in listxattr()

2013-05-13 Thread Benjamin Peterson
Benjamin Peterson added the comment: LGTM -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-13 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On May 13, 2013, at 10:10 AM, Antoine Pitrou wrote: >I agree with Nick here, there's no reason to auto-number constants in >Python. This is not C :-) Why should they be strings? Why not object()? Why is `x.value == str(x)` a useful invariant to hold? -

[issue17970] Mutlithread XML parsing cause segfault

2013-05-13 Thread mrDoctorWho0 .
New submission from mrDoctorWho0 .: Linux i386, Python 2.7.4. Multithread xml parsing via pyexpat cause segmentation fault -- components: XML files: pyexpat_crash_multithread.py messages: 189131 nosy: mrDoctorWho0.. priority: normal severity: normal status: open title: Mutlithread XML p

[issue1772673] Replacing char* with const char*

2013-05-13 Thread Eli Bendersky
Eli Bendersky added the comment: For external APIs visible to user code, this can cause some compatibility problems and users may need to at the very least re-compile this code. So -1 here. For new external APIs, having const wherever appropriate should be considered on a case by case basis.

[issue17966] Lack of consistency in PEP 8 -- Style Guide for Python Code

2013-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: This is a silly argument. -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___

[issue17963] Deprecate the frame hack for implicitly getting module details

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

[issue17950] Dynamic classes contain non-breakable reference cycles

2013-05-13 Thread Nick Coghlan
Changes by Nick Coghlan : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue17962] Broken OpenSSL version in Windows builds

2013-05-13 Thread Yogesh Chaudhari
Yogesh Chaudhari added the comment: @Antoine and @Georg: You are right. There is nothing much to be done. The only difference is those of auto-generated files like Makefile and other config files created after running ./config script. This just needs a simple add/commit from the openssl site

[issue17968] memory leak in listxattr()

2013-05-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue5803] email/quoprimime: encode and decode are very slow on large messages

2013-05-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch for 3.4 based on Matt's patch with additional optimizations. It speeds up body_encode() and header_encode(). $ ./python -m timeit -s "from email.quoprimime import body_encode as encode; x = open('Lib/decimal.py').read()[:10]" "encode(x)"

[issue17950] Dynamic classes contain non-breakable reference cycles

2013-05-13 Thread Fred L. Drake, Jr.
Changes by Fred L. Drake, Jr. : -- nosy: +fdrake ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue17962] Broken OpenSSL version in Windows builds

2013-05-13 Thread Georg Brandl
Georg Brandl added the comment: I don't know what there is to do, so I can give no instructions. It's best to let Martin handle it. -- ___ Python tracker ___ __

[issue17950] Dynamic classes contain non-breakable reference cycles

2013-05-13 Thread Martin Morrison
Changes by Martin Morrison : -- nosy: +isoschiz, pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Yes I am sure. Please see the previous reasoning. Igoring assigning to __bases__ for the moment... Every class deletion will try to remove itself from the list. Either it will a) find an existing reference in the weakref and remove it b) find a None

[issue17969] multiprocessing crash on exit

2013-05-13 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- nosy: +sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue17969] multiprocessing crash on exit

2013-05-13 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson: We have observed this crash with some frequency when running our compilation scripts using multiprocessing.Pool() By analysing the crashes, this is what is happening: 1) The Pool has a "daemon" thread managing the pool. 2) the worker is asleep, waitin

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > While I admit that I oversaw the exact requirement for __bases__, I think > that allowing for a "None" to be sufficient when the class is being deleted > is an important improvement. You can't be sure the "None" corresponds to the type being deleted and not

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Actually, in a program that dynamically creates a class, and then deletes it, you would expect a O(1) complexity. adding children at the end, and searching from the end, is a way to achieve this. While I admit that I oversaw the exact requirement for _

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The second one is when the class is being deleted, for housekeeping > of the weakrefs. > I worry that your alternative will cause us to walk the entire list > in the second case because it will be called when the weakref has > been cleared, so it will never fi

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: There are two cases when remove_subclass is called: One when we are changing base classes(the original use of this function), and in this case we must find the correct one. The second one is when the class is being deleted, for housekeeping of the weak

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > In case this logic is flawed, we know that when remove_subclass() is > called, exactly one child is removed. Whether it is us, or some > previous class, is irrelevant. remove_subclass() is called when __bases__ is assigned to, so it is not irrelevant: >>> cl

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Basically the logic is this: When the class goes away, it _always_ calls remove_subclass(). Now, this may be before or after the weakref has been clear so that it will either find itself in a weakref, or a clear weakref. In case this logic is flawed,

[issue17956] add ScheduledExecutor

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: To be honest I can't find much to say about this proposal, but I think it would be good if the time function were configurable (both for test purposes, and to allow passing e.g. time.monotonic). I suppose this could be an executor option. -- _

[issue17961] Use enum names as values in enum.Enum convenience API

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with Nick here, there's no reason to auto-number constants in Python. This is not C :-) -- nosy: +pitrou ___ Python tracker ___ ___

[issue17966] Lack of consistency in PEP 8 -- Style Guide for Python Code

2013-05-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue17968] memory leak in listxattr()

2013-05-13 Thread Antoine Pitrou
New submission from Antoine Pitrou: os.listxattr() leaks its internal buffer when the first call to C listxattr() fails with ERANGE. This wasn't caught by the refleak bot, probably because xattrs are not enabled on it. -- files: listxattr_leak.patch keywords: patch messages: 189114 nos

[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Attaching an alternative implementation for remove_subclass(). -- Added file: http://bugs.python.org/file30247/subtype2.patch ___ Python tracker ___

  1   2   >