[issue25782] CPython hangs on error __context__ set to the error itself

2017-04-18 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___

[issue30092] Replace sys.version to sys.version_info in sysconfig.py

2017-04-18 Thread Dong-hee Na
New submission from Dong-hee Na: Not to rely on sys.version here, its format is an implementation detail of CPython, use sys.version_info or sys.hexversion -- components: Library (Lib) messages: 291824 nosy: corona10 priority: normal severity: normal status: open title: Replace

[issue25782] CPython hangs on error __context__ set to the error itself

2017-04-18 Thread larsonreever
larsonreever added the comment: My patch works for your example too. Since it checks for loops in __context__ setter, you shouldn't be able to create complicated loops. However, since PyException_SetContext and PyException_SetCause are public APIs, and their return type is 'void', I can't

[issue30092] Replace sys.version to sys.version_info in sysconfig.py

2017-04-18 Thread Dong-hee Na
Changes by Dong-hee Na : -- pull_requests: +1295 ___ Python tracker ___ ___

[issue30076] Opcode names BUILD_MAP_UNPACK_WITH_CALL and BUILD_TUPLE_UNPACK_WITH_CALL are too long

2017-04-18 Thread Nick Coghlan
Nick Coghlan added the comment: I think it should be sufficient connection to describe the link in the documentation as: * BUILD_VAR_POSITIONAL: a variant of BUILD_TUPLE_UNPACK tailored specifically for use in function calls * BUILD_VAR_KEYWORD: a variant of BUILD_MAP_UNPACK tailored

[issue30093] Unicode eq operation with hash.

2017-04-18 Thread STINNER Victor
STINNER Victor added the comment: My previous attempt which ended with "Raymond Hettinger: I don't think it is worth it." http://bugs.python.org/issue16286#msg216654 Most string comparisons are comparisons of strings of less than 20 characters. --

[issue14102] argparse: add ability to create a man page

2017-04-18 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1300 ___ Python tracker ___ ___ Python-bugs-list

[issue30093] Unicode eq operation with hash.

2017-04-18 Thread Dong-hee Na
Dong-hee Na added the comment: Thanks for the reply. I did not know it was already discussed. The conclusion of the thread looks reasonable. -- ___ Python tracker

[issue30031] Improve queens demo (use argparse and singular form)

2017-04-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: After more thought on the subject, I think the n-queens demo should be left as is. The demo is principally about the class and not about being a command-line tool. Also, it is reasonable and appropriate to use sys.argv directly for such a simple API.

[issue24160] Pdb sometimes crashes when trying to remove a breakpoint defined in a different debugger sessoon

2017-04-18 Thread Tomer Chachamu
Changes by Tomer Chachamu : -- nosy: +Tomer Chachamu ___ Python tracker ___ ___

[issue30093] Unicode eq operation with hash.

2017-04-18 Thread Dong-hee Na
New submission from Dong-hee Na: If the Unicode compare operation is done by comparing the hashes, it is likely to be efficient because memory comparison is not necessary. If this idea is approved I could upload my PR right now. :-) (I already checked local unit test is passed.) --

[issue30093] Unicode eq operation with hash.

2017-04-18 Thread Dong-hee Na
Changes by Dong-hee Na : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30094] PDB enhancement

2017-04-18 Thread Erik Zoltan
New submission from Erik Zoltan: I have created a pdb enhancement that allows me to query an object's internals more gracefully. It is incredibly useful and it would be very easy to include this logic in the distribution version of pdb. I created my own modification of pdb called zdebug

[issue30092] Replace sys.version to sys.version_info in sysconfig.py

2017-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch contains too much unrelated changes. As for changing the definition of sysconfig.get_config_vars('py_version') I'm not sure it is worth to do bacause this loss an information. This is a duplicate issue24916. -- nosy: +serhiy.storchaka

[issue29950] Rename SlotWrapperType to WrapperDescriptorType

2017-04-18 Thread Dong-hee Na
Changes by Dong-hee Na : -- pull_requests: +1296 ___ Python tracker ___ ___

[issue29533] urllib2 works slowly with proxy on windows

2017-04-18 Thread Marc Schlaich
Marc Schlaich added the comment: Julia, could you please add other major browsers/HTTP clients (Firefox, Chrome, curl, ...) to your comparison (compare_ie_urllib.txt). I would expect that Python/urllib is the only implementation doing DNS requests for proxy bypass handling. Please note that

[issue25782] CPython hangs on error __context__ set to the error itself

2017-04-18 Thread Larry Hastings
Larry Hastings added the comment: Why is this still open? GPS: didn't your checkin last June fix this? -- ___ Python tracker ___

[issue25782] CPython hangs on error __context__ set to the error itself

2017-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Because we have two alternate solutions, issue25782_5.patch and set_context_reordering2.patch. -- ___ Python tracker

[issue26434] multiprocessing cannot spawn grandchild from a Windows service

2017-04-18 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +1297 ___ Python tracker ___

[issue12414] getsizeof() on code objects is wrong

2017-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is easy issue. The only tricky part is testing. AFAIK we have no control on co_extra from Python. Therefore we can't create a new test. But existing test perhaps should be weaken for the case when it is ran on the interpreter that sets co_extra.

[issue12414] getsizeof() on code objects is wrong

2017-04-18 Thread Dong-hee Na
Changes by Dong-hee Na : -- pull_requests: +1298 ___ Python tracker ___ ___

[issue14102] argparse: add ability to create a man page

2017-04-18 Thread Louie Lu
Louie Lu added the comment: Hi all, I've created a PR for this, please help for code review. I found that previous method from Oz had a problem, that man page and general help page will share a Formatter, that cause an unexpected behavior that help page will generate with troff format (Unix

[issue4180] warnings.simplefilter("always") does not make warnings always show up

2017-04-18 Thread Gerrit Holl
Gerrit Holl added the comment: I believe this fix causes this bug: http://bugs.python.org/issue29672 -- nosy: +Gerrit.Holl ___ Python tracker ___

[issue30094] PDB enhancement

2017-04-18 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Dunno, if I wanted to see a nice formatted output of the internals I'd run `pp vars(obj)`. That, though, suffers a bit from the fact that `vars` is not the most known of the builtins. -- nosy: +Jim Fasarakis-Hilliard versions: +Python 3.7

[issue30096] Update examples in abc documentation to use abc.ABC

2017-04-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: +1 It would be nice to have the examples show the usual best practices. That said, in the doc for abc.ABC itself, it would be nice to show an brief example both ways (much like we do for the property() docstring) to show the relationship between the two.

[issue30095] HTMLCalendar allow custom classes

2017-04-18 Thread Oz Tiram
New submission from Oz Tiram: At the moment methods like HTMLCalendar.formatmonthname and HTMLCalendar.formatmonth have hard coded name 'month'. This class is pretty helpful as a good start, but if you want to customize the styles it's not helpful. I think it would be helpful for others too,

[issue30085] Discourage operator.__dunder__ functions

2017-04-18 Thread Sanket Dasgupta
Changes by Sanket Dasgupta : -- pull_requests: +1301 ___ Python tracker ___ ___

[issue30094] PDB enhancement

2017-04-18 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___

[issue30098] Verbose TypeError for asyncio.ensure_future

2017-04-18 Thread crenwick
New submission from crenwick: Despite the shy mention in the docs, it was not clear to me that the future returned from asyncio.run_coroutine_threadsafe is not compatible with asyncio.ensure_future (and other asyncio functions), and it took me a fair amount of frustration and

[issue30096] Update examples in abc documentation to use abc.ABC

2017-04-18 Thread Brett Cannon
New submission from Brett Cannon: I noticed that the documentation for the abc module (https://docs.python.org/3/library/abc.html) has all example classes use ABCMeta instead of ABC which is what most people probably want. To keep things simple the docs should probably be updated to inherit

[issue30097] Command-line option to suppress "from None" for debugging

2017-04-18 Thread Raymond Hettinger
New submission from Raymond Hettinger: Filing this feature request on behalf of an engineering team that I work with. This team creates Python tools for use by other departments. Accordingly, their best practice is to use "raise CleanException from None" to give the cleanest error messages

[issue29950] Rename SlotWrapperType to WrapperDescriptorType

2017-04-18 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Dong-hee, I apologize. I had made a silly mistake in the title of my PR and, as such, it didn't appear here on bpo. Thanks for the PR, though! :-) -- ___ Python tracker

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-04-18 Thread Anders Hovmöller
Anders Hovmöller added the comment: @larsonreever That lib is pretty limited, in that it doesn't handle dates or deltas. Again: my lib that is linked above does and has comprehensive tests. -- ___ Python tracker

[issue29950] Rename SlotWrapperType to WrapperDescriptorType

2017-04-18 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- pull_requests: +1299 ___ Python tracker ___

[issue20493] select module: loop if the timeout is too large (OverflowError "timeout is too large")

2017-04-18 Thread Mark A. Ziesemer
Mark A. Ziesemer added the comment: Not sure what may have changed here over the past 3 years, but some current findings: For _UnixSelectorEventLoop, "/usr/lib/python3.5/selectors.py", line 445, in select, fd_event_list = self._epoll.poll(timeout, max_ev), Python 3.5.3 (or 3.6.1), Linux

[issue30097] Command-line option to suppress "from None" for debugging

2017-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The initial exception still is linked as __context__. You can write own implementation of traceback.print_exception() that ignores __suppress_context__. Alternatively you can just set __suppress_context__ to False. -- nosy: +serhiy.storchaka

[issue30097] Command-line option to suppress "from None" for debugging

2017-04-18 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

[issue29991] http client marks valid multipart headers with defects.

2017-04-18 Thread Berker Peksag
Changes by Berker Peksag : -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30098] Verbose TypeError for asyncio.ensure_future

2017-04-18 Thread Yury Selivanov
Yury Selivanov added the comment: > A verbose error like this one would have made this behavior more clear to me. Well, it already raises a TypeError with a clear message -- this is how we tell the user that the argument type is not supported in Python. I don't think we need to specialize

[issue30098] Verbose TypeError for asyncio.ensure_future

2017-04-18 Thread crenwick
crenwick added the comment: Totally understandable. Some final thoughts: > this is the first time I see somebody tries to use `ensure_future` on > `run_coroutine_threadsafe` result, which suggests that it's not a common > problem. - I wonder how much self-reporting will be done here. - I

[issue30098] Verbose TypeError for asyncio.ensure_future

2017-04-18 Thread crenwick
crenwick added the comment: > it already raises a TypeError with a clear message This is more to my point: I found the TypeError message not clear at all. >From my prospective, I was using a future object returned from an asyncio >function to call another asyncio function, yet that function

[issue30049] Don't cache tp_iternext

2017-04-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: > it seems like this is just a "broken code is broken" bug I agree. Unless there were a crasher of some sort, I prefer to keep the existing code, some of which has been deployed successfully for well over a decade. -- resolution: -> rejected

[issue30098] Verbose TypeError for asyncio.ensure_future

2017-04-18 Thread Yury Selivanov
Yury Selivanov added the comment: `asyncio.run_coroutine_threadsafe` was't designed to be compatible with `asyncio.ensure_future`. It should be used to run a coroutine in an event loop from another thread. You shouldn't need to await on the future it returns. --

[issue30098] Verbose TypeError for asyncio.ensure_future

2017-04-18 Thread crenwick
crenwick added the comment: Totally. But this wasn't immediately clear to me when using the API. A verbose error like this one would have made this behavior more clear to me. -- ___ Python tracker

[issue30098] Verbose TypeError for asyncio.ensure_future

2017-04-18 Thread Yury Selivanov
Yury Selivanov added the comment: > - I wonder how much self-reporting will be done here. Yeah, I don't think we see enough reporting on bugs.python.org. I hope people will become more vocal :) I try to monitor what people say about asyncio on SO, Twitter and /r/python to get a better

[issue30070] Fix errors handling in the parser module

2017-04-18 Thread Raymond Hettinger
Raymond Hettinger added the comment: LGTM -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list

[issue30098] Verbose TypeError for asyncio.ensure_future

2017-04-18 Thread Yury Selivanov
Yury Selivanov added the comment: > This is more to my point: I found the TypeError message not clear at all. > From my prospective, I was using a future object returned from an asyncio > function to call another asyncio function, yet that function was telling me > it could only use a future

[issue30098] Verbose TypeError for asyncio.ensure_future

2017-04-18 Thread R. David Murray
R. David Murray added the comment: I don't think your specialized error message adds anything. The the most common mistake, IMO, is going to be not realizing that run_coroutine_threadsafe don't return one of the acceptable types. So being told that concurrent.future.Future is not acceptable

[issue30095] HTMLCalendar allow custom classes

2017-04-18 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Can't you override the `.month` css class and customize the style that way? -- nosy: +Mariatta ___ Python tracker ___

[issue30095] HTMLCalendar allow custom classes

2017-04-18 Thread Oz Tiram
Oz Tiram added the comment: Of course I can, but I can't add multiple css classes, and I forced to have the same class for both the title of the month and the body of the month. -- ___ Python tracker

[issue30099] Lib2to3 fails with unreadable pickle file

2017-04-18 Thread Jake Merdich
New submission from Jake Merdich: There seem to have been a few issues in the past with creating the lib2to3 pickle files with the right permissions due to umask behavior (#15890). While I'm unaware of the status installer-level fixes have given, it seems prudent that the installed python

[issue30046] csv: Inconsistency re QUOTE_NONNUMERIC

2017-04-18 Thread Dong-hee Na
Changes by Dong-hee Na : -- pull_requests: +1303 ___ Python tracker ___ ___

[issue30100] WeakSet should all discard and remove on items that can have weak references

2017-04-18 Thread donkopotamus
New submission from donkopotamus: Currently WeakSet().discard([]) will raise a TypeError as we cannot take a weak reference to a list. However, that means a list can never be in a WeakSet, so WeakSet().discard([]) could instead be a no-op. Similarly WeakSet().remove([]) could be a KeyError.

[issue30046] csv: Inconsistency re QUOTE_NONNUMERIC

2017-04-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue is not easy, it needs a thoughtful design before starting coding. I agree with Xiang's analysis and proposed solutions. But if just convert numbers to float we can get an overflow for large integers or lost precision in case of Decimal. The

[issue30100] WeakSet should all discard and remove on items that can have weak references

2017-04-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +fdrake, pitrou ___ Python tracker ___

[issue28837] 2to3 does not wrap zip correctly

2017-04-18 Thread Berker Peksag
Berker Peksag added the comment: I think this at least needs to be backported to 3.6 (or can we close the issue now?) -- nosy: +berker.peksag stage: -> backport needed ___ Python tracker

[issue30095] HTMLCalendar allow custom classes

2017-04-18 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +rhettinger ___ Python tracker ___ ___