[issue30095] HTMLCalendar allow custom classes

2017-04-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 consumer of the CSV file may be not Python and it may support 
larger precision than Python float.

And it is not clear what would be better solution for enums. Should they be 
serialized by name or by value?

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
messages: 291861
nosy: donkopotamus
priority: normal
pull_requests: 1304
severity: normal
status: open
title: WeakSet should all discard and remove on items that can have weak 
references

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30046] csv: Inconsistency re QUOTE_NONNUMERIC

2017-04-18 Thread Dong-hee Na

Changes by Dong-hee Na :


--
pull_requests: +1303

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 4.10.0-19 x86_64 (or Cygwin 2.8.0):

2,147,483 is acceptable, 2,147,484 is not.  (Either side of 2**31/1000.)  With 
the seconds/milliseconds conversions, I suppose the previous testing here just 
didn't get this specific - but this is only 24.86 days, just ever so slightly 
above half of the "48 days" figure mentioned below.  So no, not even the 
"maximum timeout of 30 days" previously proposed would be sufficient - though 
the currently documented "one day" maximum is.

So if intending to use this as a serious scheduler, what to do?  I considered 
checking for values more than 86,400 (1 day) before scheduling - and if in 
excess, instead scheduling a proxy that would repeatedly reschedule the next 
interval as needed in < 1 day increments.  However, this would require some 
special handling of the asyncio.Handle's that are returned to cancel the 
callback - as a new handle would be required for each renewal.

It would seem that a better and simpler approach could simply be to ensure that 
a recurring "dummy" task (or heartbeat) is scheduled to run every 1 day or 
less.  As long as a another task is scheduled in the queue ahead of any tasks 
with "excessively long" delays, the longer delay will never be passed to poll() 
until it is reduced to within the smaller threshold.  I can do this within my 
own code - but this could maybe also be further considered to happen 
automagically within asyncio.  Am I missing any further considerations or 
gotchas here?

(See also: 
http://stackoverflow.com/questions/27129037/why-is-there-a-limit-on-delayed-calls-like-asyncio-call-later-to-not-exceed-one)

--
nosy: +ziesemer

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2017-04-18 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
nosy: +Mariatta

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 will add zero additional 
information.  I think the only change that needs to be made is to make the 
existing message say 'asyncio.Future' instead of just 'Future'.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 should always function, given there is an obvious and 
trivial fallback (regenerating the grammar tables at runtime).

The current codebase will throw a PermissionDenied exception if the pickle file 
is unreadable, rather than fall back to generating the grammar tables. 

To reproduce:
 Install python2.6+, 3.0+
 chmod o-r $PYTHON_INSTALL/lib/pythonX.Y/lib2to3/*.pickle
 pythonX.Y -c "import lib2to3.pygram"

Notably, this sort of borked installation is quite hard to detect unless a 
user without root tries to run setuptools (*whistles*).

--
components: 2to3 (2.x to 3.x conversion tool)
files: 0001-Fallback-to-regenerating-2to3-grammars-on-read-fail.patch
keywords: patch
messages: 291853
nosy: Jake Merdich
priority: normal
severity: normal
status: open
title: Lib2to3 fails with unreadable pickle file
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7
Added file: 
http://bugs.python.org/file46811/0001-Fallback-to-regenerating-2to3-grammars-on-read-fail.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 picture.

> - I also considered making the existing error message more verbose (I think 
> that still could be effective).

Feel free to suggest a better wording.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 also considered making the existing error message more verbose (I think 
that still could be effective). However, I decided to open this PR as a 
separate TypeError to not muddle the language of the probably more common 
TypeError.

Thanks for your time and insight, Yury!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 with it. 

I understand, but 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.

Specializing error messages makes code more complex and adds to maintenance 
overhead, so we can't afford to make changes on first request.  In cases like 
this we usually put the issue on hold to see if more people complain.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 was telling me it 
>could only use a future with it. 

Though I eventually figured out what was going on, I think that a more clear 
message at that moment would have been very helpful to me. And I think other 
users who benefit from this was well.

A better warning/wording for the API would be helpful as well, but I don't 
think it fully suffices the problem.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 this code any further.

Instead I'd suggest to try to improve asyncio documentation for `ensure_future` 
and `run_coroutine_threadsafe`.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 source-code-digging to figure out what was going on.

To avoid this confusion for other users, I think that a verbose TypeError 
warning when a concurrent.futures.Future object is passed into 
asyncio.ensure_future would be very helpful.

--
components: asyncio
messages: 291845
nosy: crenwick, yselivanov
priority: normal
pull_requests: 1302
severity: normal
status: open
title: Verbose TypeError for asyncio.ensure_future
type: enhancement
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30094] PDB enhancement

2017-04-18 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 to their users while hiding the noise of implementation 
details and internal logic.  The exposed exceptions are a documented, 
guaranteed part of the API that users can reliably catch and handle.  This has 
worked well for them; however, when they are debugging the library itself it 
would be nice to have a way to suppress all the "from None" code and see fuller 
stack traces that indicate root causes.

One way to do this would be to have a command-line switch such as "python -C 
testcode.py".   Where the "-C" option means "Always show the cause of 
exceptions even when 'from None' is present.

--
components: Interpreter Core
messages: 291844
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Command-line option to suppress "from None" for debugging
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.  In other words, I want people to inherit from 
ABC but don't want the knowledge of ABCMeta to be lost.

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 from abc.ABC.

--
assignee: docs@python
components: Documentation
messages: 291842
nosy: brett.cannon, docs@python
priority: normal
severity: normal
stage: needs patch
status: open
title: Update examples in abc documentation to use abc.ABC
type: enhancement
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30085] Discourage operator.__dunder__ functions

2017-04-18 Thread Sanket Dasgupta

Changes by Sanket Dasgupta :


--
pull_requests: +1301

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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, if this would have be customize 
able.

Would you accept a PR for such thing?

--
components: Library (Lib)
messages: 291841
nosy: Oz.Tiram
priority: normal
severity: normal
status: open
title: HTMLCalendar allow custom classes
type: enhancement
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 (attached as zdebug.py) that 
implements a new ppp debugging command. This command prints a formatted output 
of an object's internals. It could be smoother, and doesn't fully obey the 
programming conventions used with in pdb, and I'm not proposing to submit it as 
a patch. However the ppp command is pretty simple and incredibly useful.  

Here's a tiny example. I can drill into an object, see its internals, and 
interactively explore its property chain. (The zdebug.zbreak() call is 
equivalent to pdb.set_trace()). 

$ python3
>>> from datetime import date
>>> today = date.today()
>>> import zdebug
>>> zdebug.zbreak()
--Return--
> (1)()->None
zdebug> p today
datetime.date(2017, 4, 18)
zdebug> ppp today
   ctime = 
   day = 18
   fromordinal = 
   fromtimestamp = 
   isocalendar = 
   isoformat = 
   isoweekday = 
   max = -12-31
   min = 0001-01-01
   month = 4
   replace = 
   resolution = 1 day, 0:00:00
   strftime = 
   timetuple = 
   today = 
   toordinal = 
   weekday = 
   year = 2017

zdebug> p today.day
18
zdebug> p today.year
2017

--
components: Library (Lib)
files: zdebug.py
messages: 291839
nosy: Erik Zoltan
priority: normal
severity: normal
status: open
title: PDB enhancement
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file46810/zdebug.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.  How to do so is a legitimate example itself.  Not all uses of 
sys.argv need argparse.

In other words, I don't think the proposed changes makes anyone's life better 
and in the some ways makes the example less approachable for teaching purposes 
(my area of expertise).

The example works fine as-is.  Changing it seems like unnecessary code churn 
and already eating some of our time.

Thank you for the idea.  It never hurts to look around for ways to improve 
code.  Though I don't think there was a new win in this case, don't let that 
discourage you.  Please continue to look for improvements :-)

--
assignee:  -> rhettinger
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 man page used this format).

I switch to another method that creates a Manpage class and a private 
_ManpageFormatter, we just need to put parser into this Manpage, the __str__ 
method will generate the man page that we want.

This approach prevents help page format affect by ManpageFormatter, and the 
user can happily switching formatter_class to RawDescriptionHelpForatter, 
RawTextHelpForatter and others, since the Manpage class is separate from 
HelpFormatter, and _ManpageFormatter will used the formatter provide from 
parser.

The attach file is a dummy argparser file, you can try it by this:

  ./python poc.py > poc.1 && man ./poc.1

--
nosy: +louielu
Added file: http://bugs.python.org/file46809/poc.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.)

--
components: Unicode
messages: 291833
nosy: corona10, ezio.melotti, haypo
priority: normal
severity: normal
status: open
title: Unicode eq operation with hash.
type: performance
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 specifically for 
use in function calls

The BUILD_*_UNPACK documentation could also point to their relevant function 
call counterpart: "Note: function calls do not use this opcode, they use the 
specialized BUILD_VAR_".

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29950] Rename SlotWrapperType to WrapperDescriptorType

2017-04-18 Thread Jim Fasarakis-Hilliard

Changes by Jim Fasarakis-Hilliard :


--
pull_requests: +1299

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12414] getsizeof() on code objects is wrong

2017-04-18 Thread Dong-hee Na

Changes by Dong-hee Na :


--
pull_requests: +1298

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--
keywords: +easy (C)
stage:  -> needs patch
versions: +Python 3.6, Python 3.7 -Python 3.2, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26434] multiprocessing cannot spawn grandchild from a Windows service

2017-04-18 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1297

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29950] Rename SlotWrapperType to WrapperDescriptorType

2017-04-18 Thread Dong-hee Na

Changes by Dong-hee Na :


--
pull_requests: +1296

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> In sysconfig, don't rely on sys.version format

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 raise an error when a C code introduces a cycle, 
in that case, the exc->cause/exc->context will be set to NULL.(I came to this 
bug via the ExitStack + subprocess issue27122 which merely has a suggested 
workaround patch as a band aid that might help until this is fixed) 
Thanks: http://driverwhiz.com/device-drivers

--
nosy: +larsonreever

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 sys.version to sys.version_info in sysconfig.py
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 curl uses the `no_proxy` environment variable, so the syntax 
is slightly different.

For anyone who doesn't fully grasp the details of this issue, there might be a 
better explanation at https://github.com/kennethreitz/requests/issues/2988.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com