[issue15767] add ModuleNotFoundError

2013-07-01 Thread Guido van Rossum
Guido van Rossum added the comment: Ok, the history of all that makes sense, except now I wonder if ModuleNotFoundError is useful at all. I just reviewed a patch for 3.4 and in the latest revision all ImportError checks were replaced with ModuleNotFoundError checks. What purpose does that

[issue15767] add ModuleNotFoundError

2013-07-01 Thread Guido van Rossum
Guido van Rossum added the comment: [switching to gmail-powered account] I'm sorry, but this seems like it should be an importlib internal affair. The new exception is too much in everyone's face, because the exception name gets printed on every traceback. I like #4, #3 is also

[issue15767] add ModuleNotFoundError

2013-07-03 Thread Guido van Rossum
Guido van Rossum added the comment: Right. Outside importlib there shouldn't be a need to distinguish between the cases (especially given that the exception works differently than its name suggests). -- ___ Python tracker <http://bugs.py

[issue17911] Extracting tracebacks does too much work

2013-07-08 Thread Guido van Rossum
Guido van Rossum added the comment: In terms of how much freedom you have about changing the internal, I'd check how long ago they were changed. "Internal" APIs that have been stable for many versions tend to have illicit external uses -- but internal APIs that were introduce

[issue18468] re.group() should never return a bytearray

2013-07-15 Thread Guido van Rossum
New submission from Guido van Rossum: I discovered that the Python 3 version of the re module's Match object behaves subtly different from the Python 2 version when the target string (i.e. the haystack, not the needle) is a buffer object. In Python 2, the type of the return value of group

[issue18468] re.group() should never return a bytearray

2013-07-18 Thread Guido van Rossum
Guido van Rossum added the comment: > Ezio Melotti added the comment: [...] > IIUC the advantage of changing the behavior is that it won't keep the target > string alive anymore, but on the other hand is not backward compatible and > makes things more difficult for people

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-27 Thread Guido van Rossum
Guido van Rossum added the comment: This is mostly fine. FWIW I disagree with MAL's assertion that we need to start adding internal versioning; people who "lawyer" about which version of the PEP should apply are focused on the wrong thing entirely. IIUC the occasional Python-3

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-28 Thread Guido van Rossum
Guido van Rossum added the comment: OK, forget I said anything about exceptions. The language in Nick's patch is fine. Regarding "break is bad", while I agree with Terry's recommendation, I think saying anything about this would be overreaching the scope of a style guide.

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-28 Thread Guido van Rossum
Guido van Rossum added the comment: > Raymond Hettinger added the comment: > > Nick, +1 from me if you want to make your edits and wrap this one up. +1 from me too. -- ___ Python tracker <http://bugs.python.or

[issue18472] Update PEP 8 to encourage modern conventions

2013-07-29 Thread Guido van Rossum
Guido van Rossum added the comment: [Guido] >>- Regarding line length, I think it is reasonable to mention that many >>- organizations are settling on 100 as a compromise. On newer laptops you >>- can still fit two terminal windows (with a reasonable font size) side by >

[issue18472] Update PEP 8 to encourage modern conventions

2013-08-01 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks a bundle, Nick! -- ___ Python tracker <http://bugs.python.org/issue18472> ___ ___ Python-bugs-list mailing list Unsub

[issue18472] Update PEP 8 to encourage modern conventions

2013-08-01 Thread Guido van Rossum
Guido van Rossum added the comment: I think the current wording about line length makes it too easy to adopt 99 instead of 79. I propose to go back to 79 only, and add this before the paragraph starting with "The preferred way of wrapping long lines ..." """ Som

[issue18472] Update PEP 8 to encourage modern conventions

2013-08-01 Thread Guido van Rossum
Guido van Rossum added the comment: See proposed patch at https://codereview.appspot.com/12269044/ . -- ___ Python tracker <http://bugs.python.org/issue18

[issue18472] Update PEP 8 to encourage modern conventions

2013-08-01 Thread Guido van Rossum
Guido van Rossum added the comment: Patch applied. -- ___ Python tracker <http://bugs.python.org/issue18472> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18472] Update PEP 8 to encourage modern conventions

2013-08-02 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, I forgot the push. I had to do a little merge dance and also fixed one typo (a redundant 'line') and now it's hopefully pushed. -- ___ Python tracker <http://bugs.pyt

[issue16853] add a Selector to the select module

2013-08-02 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! We should make sure this makes it into alpha 2. Could you also prepare a patch for Tulip itself? That way I can make sure Tulip works with either its own or the stdlib implementation. One thought: would it be better if the selectors ended up in a

[issue16853] add a Selector to the select module

2013-08-02 Thread Guido van Rossum
Guido van Rossum added the comment: No time for a full review yet, but a comment on the timeout test failure you are observing in Tulip. This particular test schedules a task that sleeps for 20 msecs, and first calls run_until_complete() with a timeout of 10 msecs, and then calls it again

[issue18656] setting function.__name__ doesn't affect repr()

2013-08-04 Thread Guido van Rossum
New submission from Guido van Rossum: In Python 3.2 and earlier: >>> def f(): pass ... >>> f.__name__ = 'g' >>> f However in Python 3.3 and later, the last line shows 'f' instead of 'g'. -- components: Interpreter Core me

[issue18656] setting function.__name__ doesn't affect repr()

2013-08-04 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry. The actual problem reported was that the traceback uses the wrong name. I can still reproduce this in 3.4; attached is a repro. -- Added file: http://bugs.python.org/file31160/functools_wraps_oddity.py

[issue16853] add a Selector to the select module

2013-08-06 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, the timeouts are a bad idea anyway. I've filed http://code.google.com/p/tulip/issues/detail?id=49 to remind us to do something about this. I'll review your tulip patch next. -- ___ Python trac

[issue16853] add a Selector to the select module

2013-08-06 Thread Guido van Rossum
Guido van Rossum added the comment: Actually there is a misunderstanding underlying you Tulip patch. Tulip needs to support Python 3.3 as well as Python 3.4, so it needs to do a little dance trying to import BaseSelector (or some other key class) from select and if that fails fall back to

[issue16853] add a Selector to the select module

2013-08-06 Thread Guido van Rossum
Guido van Rossum added the comment: Sorry, replying to some direct questions in the bug: > I also made the following changes: > - BaseSelector is an abstract base class (so one could imagine user code > implementing its own selector on top of it) Fine (though I had to work around this

[issue18699] What is Future.running() for in PEP 3148 / concurrent.futures.Future?

2013-08-09 Thread Guido van Rossum
New submission from Guido van Rossum: >From glyph (in a particularly snarky mood): """ P.S.: I realize that this isn't really within the scope of this message, but as I was reviewing Future's documentation while writing it, I realized what Future.running() do

[issue18699] What is Future.running() for in PEP 3148 / concurrent.futures.Future?

2013-08-09 Thread Guido van Rossum
Guido van Rossum added the comment: (Note that my change to PEP 3156 is somewhat separate -- Tulip's Future doesn't have to follow all of the PEP 3148 API and its running() method did nothing anyway. But concurrent.futures.Future has been released for several cycles and we must co

[issue18788] Proof of concept: implicit call syntax

2013-08-20 Thread Guido van Rossum
Guido van Rossum added the comment: Well aren't there other languages (Ruby, Coffeescript) that have the same syntax? How do they do it? (Haskell does it too, but I don't think we can learn from it -- but in Ruby and IIRC Coffeescsript it is syntactic sugar for a regular call.)

[issue16853] add a Selector to the select module

2013-08-20 Thread Guido van Rossum
Guido van Rossum added the comment: I've lost track -- who is waiting for whom? I reviewed the patch selector-12.diff and received zero response AFAICT. (Maybe the email from Rietveld didn't make it?) I'd like to get this into alpha2, even if the proactor won't make it

[issue18794] select.devpoll objects have no close() method

2013-08-20 Thread Guido van Rossum
Guido van Rossum added the comment: This all sounds fine to fix without waiting for anything else -- can you attach a patch here? -- ___ Python tracker <http://bugs.python.org/issue18

[issue16853] add a Selector to the select module

2013-08-21 Thread Guido van Rossum
Guido van Rossum added the comment: On Wed, Aug 21, 2013 at 2:37 AM, STINNER Victor wrote: > > STINNER Victor added the comment: > > I like the idea of renaming select to _select, and add Lib/select.py > for the high-level wrapper (Selector). In my opinion, adding a module >

[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue18794> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16853] add a Selector to the select module

2013-08-26 Thread Guido van Rossum
Guido van Rossum added the comment: On Sat, Aug 24, 2013 at 5:04 AM, Charles-François Natali wrote: > Before I post it for final review, I have three more questions: > 1) In the documentation, I don't know how to best refer to files > object registered: is "file descriptor&qu

[issue18720] Switch suitable constants in the socket module to IntEnum

2013-08-26 Thread Guido van Rossum
Guido van Rossum added the comment: Looks good. Go ahead and convert the rest of the socket constants. Then we can consider other modules, e.g. select and os. -- ___ Python tracker <http://bugs.python.org/issue18

[issue18720] Switch suitable constants in the socket module to IntEnum

2013-08-30 Thread Guido van Rossum
Guido van Rossum added the comment: I prefer two prettier loops over one less pretty one in this case. No opinion about _intenum_converter yet. (IMO refactoring can always be lazy, i.e. after you have multiple copies of the same code there's time to consider whether you should unify the

[issue16853] add a Selector to the select module

2013-08-30 Thread Guido van Rossum
Guido van Rossum added the comment: On Fri, Aug 30, 2013 at 6:34 AM, Charles-François Natali wrote: [Giampaolo Rodola'] > > - I'm not sure why in case of EINTR you retry with a different timeout; > > can't you just return []? > > Because when I do: >

[issue16853] add a Selector to the select module

2013-08-31 Thread Guido van Rossum
Guido van Rossum added the comment: > Charles-François Natali added the comment: > Well, I'll change it, but: > We have to change the select() docstring to "Wait until some > registered file objects become ready, or for *at most* timeout > seconds" Doesn't

[issue18885] handle EINTR in the stdlib

2013-08-31 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker <http://bugs.python.org/issue18885> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18885] handle EINTR in the stdlib

2013-08-31 Thread Guido van Rossum
Guido van Rossum added the comment: On Sat, Aug 31, 2013 at 9:56 AM, Charles-François Natali wrote: > > Charles-François Natali added the comment: > > Gregory, thanks, that's what I was planning to do. > > But since the recent discussions (mainly on selectors), there ar

[issue16853] add a Selector to the select module

2013-08-31 Thread Guido van Rossum
Guido van Rossum added the comment: Hm... I like the [] return just fine, it matches what Tulip's selector did. The framework should be re-checking the clock anyway -- it's possible that select() returned late too... -- ___ Python trac

[issue16853] add a Selector to the select module

2013-09-04 Thread Guido van Rossum
Guido van Rossum added the comment: Agreed, this was a great feat of implementation and API design. Is there anything left to do or can we close this issue? (I looked at the Proactor code in Tulip again and I think it is not quite as easy to isolate it, so I'm not requesting that Proacto

[issue18606] Add statistics module to standard library

2013-09-08 Thread Guido van Rossum
Guido van Rossum added the comment: Here's a combined patch. Hopefully it will code review properly. -- nosy: +gvanrossum Added file: http://bugs.python.org/file31680/statistics_combined.patch ___ Python tracker <http://bugs.python.org/is

[issue18606] Add statistics module to standard library

2013-09-08 Thread Guido van Rossum
Guido van Rossum added the comment: Nice docstrings, but those aren't automatically included in the Doc tree. -- ___ Python tracker <http://bugs.python.org/is

[issue14417] dict RuntimeError workaround

2012-04-28 Thread Guido van Rossum
Guido van Rossum added the comment: Still no progress on this bug. Should I just check in my simple patch? But there's much more to do -- docs, and unittests. Volunteers? It's not hard, just work. -- ___ Python tracker <http://bu

[issue14417] dict RuntimeError workaround

2012-04-29 Thread Guido van Rossum
Guido van Rossum added the comment: I could check it in, but I probably would mess up something (which branches are affected?). Let me know if you want me to. The priorities after that would be: 1) update docs (the warning about RuntimeError needs to be moderated) 2) convert stress tests to

[issue14417] dict RuntimeError workaround

2012-04-29 Thread Guido van Rossum
Guido van Rossum added the comment: Actually my patch doesn't even apply cleanly. I suspect the dict refactoring for shared keys interfered. Someone please help! -- ___ Python tracker <http://bugs.python.org/is

[issue12029] Catching virtual subclasses in except clauses

2012-05-11 Thread Guido van Rossum
Guido van Rossum added the comment: I agree it's a bug and should be fixed. It's too confusing that there would be two slightly different interpretations of isinstance/issubclass where the isinstance() and issubclass() would be using the extended interpretation but the except cl

[issue14417] dict RuntimeError workaround

2012-05-13 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks Antoine! -- ___ Python tracker <http://bugs.python.org/issue14417> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

2012-06-08 Thread Guido van Rossum
Guido van Rossum added the comment: I haven't read the code, but from Larry's description this looks great to me. It's amazing how many extra functions were added to the os module since 3.2! I also agree that the redundant functions that existed in 3.2 should stay and I don&

[issue15138] base64.urlsafe_b64**code are too slow

2012-06-22 Thread Guido van Rossum
New submission from Guido van Rossum : This bug is still present in Python 3.3. Some people use urlsafe strings *a lot*. And they find that the (obvious) implementation in base64.py is way too slow. In fact, I found myself writing the following a few times in App Engine libraries

[issue15138] base64.urlsafe_b64**code are too slow

2012-06-22 Thread Guido van Rossum
Guido van Rossum added the comment: Why would it be a feature? There is no change in semantics, only in speed. Do we have a policy that forbids performance enhancements in bugfix releases? (It doesn't really matter, I'm just curious. Also, if it really was a feature request, i

[issue15138] base64.urlsafe_b64**code are too slow

2012-06-22 Thread Guido van Rossum
Guido van Rossum added the comment: Here's a patch. It makes urlsafe_b64{en,de}code about 4x faster on my machine. The tests in base64_test.py still pass. -- keywords: +patch Added file: http://bugs.python.org/file26087/base64.patch ___ P

[issue15138] base64.urlsafe_b64**code are too slow

2012-06-22 Thread Guido van Rossum
Guido van Rossum added the comment: Heh. I'd forgotten about maketrans. Here's a patch that kills the _translate() helper function completely. -- Added file: http://bugs.python.org/file26088/base64.patch ___ Python tracker <http://bu

[issue15138] base64.urlsafe_b64**code are too slow

2012-06-22 Thread Guido van Rossum
Guido van Rossum added the comment: I didn't touch that assert. -- ___ Python tracker <http://bugs.python.org/issue15138> ___ ___ Python-bugs-list m

[issue15138] base64.urlsafe_b64**code are too slow

2012-06-22 Thread Guido van Rossum
Guido van Rossum added the comment: So, can I check this into 3.3? -- ___ Python tracker <http://bugs.python.org/issue15138> ___ ___ Python-bugs-list mailin

[issue15138] base64.urlsafe_b64**code are too slow

2012-06-22 Thread Guido van Rossum
Changes by Guido van Rossum : -- assignee: -> gvanrossum stage: needs patch -> patch review ___ Python tracker <http://bugs.python.org/issue15138> ___ ___

[issue15138] base64.urlsafe_b64**code are too slow

2012-06-22 Thread Guido van Rossum
Guido van Rossum added the comment: Submitted. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue15138> ___ __

[issue11442] list_directory() in SimpleHTTPServer.py should add charset=... to Content-type header

2012-06-27 Thread Guido van Rossum
Guido van Rossum added the comment: For posterity, according to the red hat tracker at https://bugzilla.redhat.com/show_bug.cgi?id=803500 this issue has been assigned a CVE number: CVE-2011-4940 -- ___ Python tracker <http://bugs.python.

[issue11319] Command line option -t (and -tt) does not work for a particular case

2012-07-07 Thread Guido van Rossum
Guido van Rossum added the comment: The -t feature is not technically about rejecting all code that mixes tabs and spaces. It is only about detecting code that mixes tabs and spaces IN SUCH A WAY THAT THE TAB SIZE AFFECTS THE VALIDITY OR MEANING OF THE CODE. The sample program is only

[issue15719] Sort dict items in urlencode()

2012-08-17 Thread Guido van Rossum
New submission from Guido van Rossum: >From http://mail.python.org/pipermail/python-dev/2012-August/121364.html : """ I just fixed a unittest for some code used at Google that was comparing a url generated by urllib.encode() to a fixed string. The problem was caused by turning

[issue15719] Sort dict items in urlencode()

2012-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: Note, the sort may fail if e.g. bytes and str are mixed in the keys. So this should be caught and ignored. An alternative would just be to fix the call site to pass in sorted(query.items()) instead of sorted(query). Still, I think that more predictable

[issue15719] Sort dict items in urlencode()

2012-08-18 Thread Guido van Rossum
Guido van Rossum added the comment: I've come to see more downsides than upsides to this idea. I'm withdrawing it. Good points, Greg! (And others.) -- resolution: -> rejected status: open -> closed ___ Python tracker <htt

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-09-30 Thread Guido van Rossum
Guido van Rossum added the comment: In practice this is indeed how most users of met a classes do it. E.g. Django. So, +1. --Guido van Rossum (sent from Android phone) On Sep 30, 2012 11:36 AM, "Antoine Pitrou" wrote: > > Antoine Pitrou added the comment: > > It looks s

[issue16141] Possible simplification for logging.StreamHandler exception handling

2012-10-05 Thread Guido van Rossum
New submission from Guido van Rossum: I just noticed that StreamHandler contains the following fragment in its emit() method: try: except (KeyboardInterrupt, SystemExit): #pragma: no cover raise except: self.handleError(record) Couldn't this be simplifi

[issue16150] Implement generator interface in itertools.chain.

2012-10-08 Thread Guido van Rossum
Guido van Rossum added the comment: TBH I don't think that using "yield from" in the docs makes things clearer at all -- it just requires readers to understand a rather esoteric feature. -- nosy: +gvanrossum ___ Python

[issue16150] Implement generator interface in itertools.chain.

2012-10-08 Thread Guido van Rossum
Guido van Rossum added the comment: I also don't think that this is a desirable feature. -- ___ Python tracker <http://bugs.python.org/issue16150> ___ ___

[issue16150] Implement generator interface in itertools.chain.

2012-10-08 Thread Guido van Rossum
Guido van Rossum added the comment: I am going to reject this unless at least one other core developer supports it. Extensive discussion on python-ideas has found very few supporters besides Serhiy Storchaka. -- ___ Python tracker <h

[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: +mhammond ___ Python tracker <http://bugs.python.org/issue16175> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Guido van Rossum
Guido van Rossum added the comment: Tough choice. I'm not in favor of using either ctypes or Cython for this purpose -- ctypes because it's brittle, and Cython because it is a huge complicated system of its own that I would rather not depend on. Cython already depends on CPython,

[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Guido van Rossum
Guido van Rossum added the comment: So do we need this ticket at all? It seems there's no code to write -- all we need to do is make sure we can integrate IOCP in the future standard reactor interface. That hardly seems a reason to keep a ticket

[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Guido van Rossum
Guido van Rossum added the comment: I would be happy with requiring that the user use pywin32 if they want to use this. Have you all read the docs for IOCP? It is not for the faint of heart. E.g. it integrates with the thread scheduler

[issue16175] Add I/O Completion Ports wrapper

2012-10-09 Thread Guido van Rossum
Guido van Rossum added the comment: According to http://msdn.microsoft.com/en-us/library/aa365198%28VS.85%29.aspx once you call GetQueuedCompletionStatus() your thread is managed by the IOCP and only up to a given parameter of those threads are allowed to run. They recommend setting that

[issue16203] Proposal: add re.fullmatch() method

2012-10-11 Thread Guido van Rossum
New submission from Guido van Rossum: I've noticed a subtle bug in some of our internal code. Someone wants to ensure that a certain string (e.g. a URL path) matches a certain pattern in its entirety. They use re.match() with a regex ending in $. Fine. Now someone else comes alon

[issue10836] regression: TypeError during exception handling in urllib.request.urlretrieve

2012-10-15 Thread Guido van Rossum
Changes by Guido van Rossum : -- priority: normal -> high ___ Python tracker <http://bugs.python.org/issue10836> ___ ___ Python-bugs-list mailing list Unsubscri

[issue16203] Proposal: add re.fullmatch() method

2012-10-16 Thread Guido van Rossum
Guido van Rossum added the comment: re.matchall() would appear to be related to re.findall(), which it isn't. The re2 package has a FullMatch method: http://code.google.com/p/re2/wiki/CplusplusAPI -- ___ Python tracker <http://bugs.py

[issue16203] Proposal: add re.fullmatch() method

2012-10-16 Thread Guido van Rossum
Guido van Rossum added the comment: But my other argument stands. -- ___ Python tracker <http://bugs.python.org/issue16203> ___ ___ Python-bugs-list mailin

[issue16239] PEP8 arithmetic operator examples

2012-10-27 Thread Guido van Rossum
Guido van Rossum added the comment: Wow. Someone edited that to be completely against my guidance. I'll fix it according to my intentions. -- ___ Python tracker <http://bugs.python.org/is

[issue16239] PEP8 arithmetic operator examples

2012-10-27 Thread Guido van Rossum
Changes by Guido van Rossum : -- assignee: ezio.melotti -> gvanrossum ___ Python tracker <http://bugs.python.org/issue16239> ___ ___ Python-bugs-list mai

[issue16239] PEP8 arithmetic operator examples

2012-10-27 Thread Guido van Rossum
Guido van Rossum added the comment: Corrected to: Yes:: i = i + 1 submitted += 1 x = x*2 - 1 hypot2 = x*x + y*y c = (a+b) * (a-b) No:: i=i+1 submitted +=1 x = x * 2 - 1 hypot2 = x * x + y * y c = (a + b) * (a - b

[issue16239] PEP8 arithmetic operator examples

2012-10-28 Thread Guido van Rossum
Guido van Rossum added the comment: That example doesn't feel strong enough to me to include in the style guide. I am fine with leaving that up to the individual contributor to decide. -- ___ Python tracker <http://bugs.python.org/is

[issue18931] new selectors module should support devpoll on Solaris

2014-03-17 Thread Guido van Rossum
Guido van Rossum added the comment: I actually prefer some code duplication in this case. Makes the review easier. On Mar 17, 2014 2:17 PM, "Giampaolo Rodola'" wrote: > > Giampaolo Rodola' added the comment: > > Sorry for not being able to rewrite the patch in t

[issue18931] new selectors module should support devpoll on Solaris

2014-03-18 Thread Guido van Rossum
Guido van Rossum added the comment: review links are only generated for patches that apply cleanly (I don't know to which branch) On Tue, Mar 18, 2014 at 2:37 PM, Yury Selivanov wrote: > > Yury Selivanov added the comment: > > Why there is no 'review&#

[issue18931] new selectors module should support devpoll on Solaris

2014-03-20 Thread Guido van Rossum
Guido van Rossum added the comment: LGTM, but I don't have a Solaris box to test. I suppose one of you has tested this? Then okay to commit to the default (== 3.5) branch. -- ___ Python tracker <http://bugs.python.org/is

[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Guido van Rossum
Guido van Rossum added the comment: OK, somebody please review this (not me). -- ___ Python tracker <http://bugs.python.org/issue21076> ___ ___ Python-bugs-list m

[issue21076] Turn signal.SIG* constants into enums

2014-03-27 Thread Guido van Rossum
Changes by Guido van Rossum : -- stage: -> patch review ___ Python tracker <http://bugs.python.org/issue21076> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue20668] Remove dependency on tests.txt when running test_asyncio suite

2014-03-27 Thread Guido van Rossum
Guido van Rossum added the comment: I think this is reasonable to also commit to the 3.4 branch so it will appear in 3.4.1. -- ___ Python tracker <http://bugs.python.org/issue20

[issue21073] Py_ReprEnter potentially misbehaves during malformed thread states

2014-03-27 Thread Guido van Rossum
Guido van Rossum added the comment: No, I haven't changed my mind. Feel free to add a comment explaining this. :-) -- ___ Python tracker <http://bugs.python.org/is

[issue18932] selectors and modify()

2014-03-27 Thread Guido van Rossum
Guido van Rossum added the comment: Why can't this be fixed in 3.4.1? It isn't an API change. -- ___ Python tracker <http://bugs.python.org/issue18932> ___ __

[issue21080] asyncio.subprocess: connect pipes of two programs

2014-03-27 Thread Guido van Rossum
Guido van Rossum added the comment: How do you do that with the subprocess module, and why doesn't that work with asyncio? -- ___ Python tracker <http://bugs.python.org/is

[issue21080] asyncio.subprocess: connect pipes of two programs

2014-03-27 Thread Guido van Rossum
Guido van Rossum added the comment: Oh, I see. Given that it is possible to do using event loop methods, why don't you write up a complete implementation and then propose to add that to the asyncio.subprocess module? -- ___ Python tracker

[issue21080] asyncio.subprocess: connect pipes of two programs

2014-03-27 Thread Guido van Rossum
Guido van Rossum added the comment: But how is the first call supposed to know that you don't want a StreamReader? Or the second that you do want one? Maybe we need a new constant instead of PIPE that means "leave it hanging"? -- ___

[issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception

2014-03-28 Thread Guido van Rossum
Guido van Rossum added the comment: For anyone watching this still, the fix introduced in this issue caused a security vulnerability, see http://bugs.python.org/issue21082 . -- nosy: +gvanrossum ___ Python tracker <http://bugs.python.org/issue9

[issue21163] asyncio task possibly incorrectly garbage collected

2014-04-05 Thread Guido van Rossum
Guido van Rossum added the comment: Ouch. That example is very obfuscated -- I fail to understand what it is trying to accomplish. Running it I see that it always prints 100 for the count with 3.3 or DO_CG on; for me it prints 87 with 3.4 an DO_GC off. But I wouldn't be surprised i

[issue21163] asyncio task possibly incorrectly garbage collected

2014-04-05 Thread Guido van Rossum
Guido van Rossum added the comment: Most likely your program is simply relying on undefined behavior and the right way to fix it is to keep strong references to all tasks until they self-destruct. -- ___ Python tracker <http://bugs.python.

[issue21163] asyncio task possibly incorrectly garbage collected

2014-04-05 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks for understanding. It's definitely subtle: there is also some code in asyncio that logs an error when a Future holding an exception becomes unreachable before anyone has asked for it; this has been a valuable debugging tool, and it depends on

[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-13 Thread Guido van Rossum
Guido van Rossum added the comment: I'll be darned. It appears that generator's send() method uses METH_O, which means that it really expects a single argument, but if you pass it a tuple, it assumes that you meant each item in the tuple as a separate argument. I think a more corr

[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-13 Thread Guido van Rossum
Guido van Rossum added the comment: Heh. METH_O was *also* a red herring. But upstream (Tulip) issue 163 *was* a good clue. I now believe that the real bug is that CoroWrapper.__iter__() has "return self" rather than "return iter(self.gen)". That fix is in

[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-13 Thread Guido van Rossum
Guido van Rossum added the comment: Wow. So many fixes! :-) Are you going to be at the CPython sprint tomorrow? I'll be there in the morning but my plane leaves in the afternoon. -- ___ Python tracker <http://bugs.python.org/is

[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Guido van Rossum
Guido van Rossum added the comment: This is nice (a backport 3.3 would be even nicer) but at least for the PyPI repo version of Tulip I'd like to have work-around so people won't run into this when they are using a slightly outdated Python version. I'll think about which of my

[issue17009] "Thread Programming With Python" should be removed

2014-04-14 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker <http://bugs.python.org/issue17009> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Guido van Rossum
Guido van Rossum added the comment: I think I have to add a work-around to Tulip anyway, because I don't want to have to tell people "you must upgrade your Python 3.3 otherwise this problem can happen" (if upgrading was easy for them they would be on 3.4 :-). So I don't

[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Guido van Rossum
Guido van Rossum added the comment: Yuri, thanks for the test, but why would the patch need a version check? Shouldn't the work-around work equally well in Python versions that don't need it? Maybe all we need is a comment explaining that it is a work-around and a hint that eve

[issue21209] q.put(some_tuple) fails when PYTHONASYNCIODEBUG=1

2014-04-14 Thread Guido van Rossum
Guido van Rossum added the comment: OK, looks good. I tried your test with my earlier workaround and the wrapper got deallocated too early, proving that my workaround was indeed wrong and your test is useful. I am still concerned theoretically that the CoroWrapper.send() signature is

<    34   35   36   37   38   39   40   41   42   43   >