[issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches

2017-05-01 Thread Nathaniel Smith

Nathaniel Smith added the comment:

More collateral damage: apparently the workaround that Pandas used for this bug 
(#undef'ing PySlice_GetIndicesEx) broke PyPy, so now they need a workaround for 
the workaround: https://github.com/pandas-dev/pandas/pull/16192

Recording this here partly as a nudge since IIUC the breaking change is still 
in the 3.6 tree, and partly for the benefit of future projects that are also 
trying to work around this.

--

___
Python tracker 

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



[issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial

2017-05-01 Thread Jaysinh shukla

Jaysinh shukla added the comment:

Thanks Mariatta for reminding. Please expect a Github PR from my side in next 2 
days.

--

___
Python tracker 

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



[issue30221] Deprecate assertNotAlmostEqual

2017-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If the absent of use cases is not good argument I close this issue. But this 
looks as a design mistake to me.

--
resolution:  -> wont fix
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



[issue19903] Idle: Use inspect.signature for calltips

2017-05-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Thanks for the report. As Yuri pointed out in msg292701, and I verified, c.m2() 
raises "TypeError: meth() takes 0 positional arguments but 1 was given".

The purpose of get_argspec is to tell the user how to call the function without 
getting such a TypeError.  But this is not possible, at least in this case.  
When signature raises "ValueError: invalid method signature", get_argspec 
should catch ValueError and put, for instance, "Function has an invalid method 
signature" in the box, instead of a signature that does not work, so users will 
know that the function cannot be called properly.  (Should message be red?)

An initial patch could just comment out this test.  I would like to see whether 
everything else passes.  Or have you, Louie, already done that?  
Signature can raise "TypeError if that type of object is not supported".  Does 
.signature return for all the other test cases?  I expect it should  if only 
called after current guard.

try:
ob_call = ob.__call__
except BaseException:
return argspec

Before committing a patch using .signature, the known possible exception 
(ValueError) must be caught.  This test should then be changed to verify the 
new behavior.

Possible future enhancement.  Current nothing happens after code like "1(" or 
"''(".  Should a box pop up saying (in red?) something like "Non-callable 
object before ("?

--

___
Python tracker 

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



[issue20401] inspect.signature removes initial starred method params (bug)

2017-05-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

OK, we will change this example in test_calltips once calltips uses .signature 
(#19903).

--

___
Python tracker 

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



[issue22385] Define a binary output formatting mini-language for *.hex()

2017-05-01 Thread Nick Coghlan

Nick Coghlan added the comment:

Minimalist proposal:

def hex(self, *, bytes_per_group=None, delimiter=" "):
"""B.hex() -> string of hex digits
B.hex(bytes_per_group=N) -> hex digits in groups separated by 
*delimeter*

Create a string of hexadecimal numbers from a bytes object::

>>> b'\xb9\x01\xef'.hex()
'b901ef'
>>> b'\xb9\x01\xef'.hex(bytes_per_group=1)
'b9 01 ef'
"""

Alternatively, the grouping could be by digit rather than by byte:

def hex(self, *, group_digits=None, delimiter=" "):
"""B.hex() -> string of hex digits
B.hex(group_digits=N) -> hex digits in groups separated by *delimeter*

Create a string of hexadecimal numbers from a bytes object::

>>> b'\xb9\x01\xef'.hex()
'b901ef'
>>> b'\xb9\x01\xef'.hex(group_digits=2)
'b9 01 ef'
"""

One potential advantage of the `group_digits` approach is that it could be 
fairly readily adapted to the hex/oct/bin builtins (although if we did that, it 
would make the lack of a "dec" builtin for decimal formatting a bit weird)

--

___
Python tracker 

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



[issue30220] Why are the custom messages for ValueError and TypeError suppressed in argparse?

2017-05-01 Thread paul j3

paul j3 added the comment:

In http://bugs.python.org/issue9353 Steven Bethard includes 'ArgumentTypeError' 
in a list of values that "look like they should be public but aren't in 
__all__::".  

I take that `__all__` list to be the ultimate authority on what's public or 
not, not omissions in the comments or documentation.

ArgumentTypeError is used in an illustration in the 'type' section of the 
documentation, https://docs.python.org/3/library/argparse.html#type

It also used in the FileType class, which I see as an example of a custom type 
callable.

In a function like _get_value it is far easier to test for an custom Error 
class than to test the message of a more generic class.

The most common `type` functions are `int` and `float`.  Are these custom or 
generic messages?

ValueError: invalid literal for int() with base 10: 'one'
ValueError: could not convert string to float: 'one'

In these common cases the ValueError is converted into a parser.Error call that 
identifies the argument name, the type, and the bad value, as well as correct 
usage.

If you issue some other error (e.g. NameError) _get_value won't catch it, and 
you'll get the full error stack and no 'usage'.  You'd have to wrap the 
'parse_args' call in your own try/except block.

I would think than any anticipated error raised by the type callable will be 
related to the argument's type.  What other errors do you have in mind?  

I did not mean to say in http://bugs.python.org/issue20039 that you shouldn't 
use it.  The documentation could be better, but it is available.  If it works 
for you, use it.

--
nosy: +paul.j3

___
Python tracker 

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



[issue21790] Change blocksize in http.client to the value of resource.getpagesize

2017-05-01 Thread Martin Panter

Martin Panter added the comment:

For plain-text (non-SSL) HTTP uploads, perhaps using “socket.sendfile” would 
help: Issue 13559.

Another idea would be to expose and document the low-level socket (or SSL 
wrapper) and let the user copy data with whatever chunk size they desire.

--
nosy: +martin.panter

___
Python tracker 

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



[issue29992] Expose parse_string in JSONDecoder

2017-05-01 Thread Levi Cameron

Levi Cameron added the comment:

A less exotic use case than oberstet's: Converting code from python 2 -> 3 and 
trying to maintain python 2 behaviour of returning all strings as bytes rather 
than unicode strings.

obsertet's solution works but is very much tied to the current implementation.

--
nosy: +Levi Cameron

___
Python tracker 

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



[issue26362] Approved API for creating a temporary file path

2017-05-01 Thread Eryk Sun

Eryk Sun added the comment:

> the lack of Windows' os.rename() atomicity

rename/replace is two system calls: NtOpenFile to get a handle for the source 
file and NtSetInformationFile to rename it. The difference is only that 
replace() sets the ReplaceIfExists field in the FileRenameInformation. The 
rename operation should be atomic.

If the source file is already open without delete/rename sharing, opening it to 
rename it will fail with sharing violation. After the handle is open, another 
thread could set the delete disposition on the source file (i.e. flag it to be 
unlinked), which will cause the rename to fail with access denied. The relative 
timing of the threads is the difference between getting a FileNotFoundError 
versus a PermissionError. The other thread could also open a handle to the 
destination file at this point, which also causes the rename to fail with 
access denied, but that's no different from what would happen if it were 
already open.

--

___
Python tracker 

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



[issue26362] Approved API for creating a temporary file path

2017-05-01 Thread Ben Finney

Ben Finney added the comment:

On 01-May-2017, Serhiy Storchaka wrote:

> tempfile.mktemp() is not much more useful that just a function that
> generates some names which unlikely matches the names of existing
> files the directory.

Yes. That is already useful enough to be in the standard library, and
it is there.

It is also maintained and implemented in one place, behind an
unpublished API (by using ‘next(tempfile._get_candidate_names())’).

Don't get distracted by the way ‘tempfile.mktemp’ creates files;
that's irrelevant to this issue. None of the use cases presented here
care at all about the file created, and never use that file. They
*only* want the name, generated by that standard-library algorithm.

The proposal in this issue is to have a public standard library API,
which I'm calling ‘tempfile.makepath’, to access that existing
maintained standard-library functionality.

--

___
Python tracker 

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



[issue30221] Deprecate assertNotAlmostEqual

2017-05-01 Thread Robert Collins

Robert Collins added the comment:

We've now spent more time debating the deprecation that we would have saved if 
it had been deprecated.

Deprecations cost user good will. Whilst I very much want to delete all 
assertions in favour of matchers, which would allow composed symmetry rather 
than the manual symmetry we have today.

Like michael I don't see any benefit in getting rid of it either. I don't 
believe it will make the API substantially easier to learn: the lack of 
symmetry increases special cases, so it will IMO make it harder to learn.

Unless you've new arguments to make about this, I think the ticket can be 
closed WONTFIX.

--

___
Python tracker 

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



[issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux

2017-05-01 Thread Christian Heimes

Changes by Christian Heimes :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue30192] hashlib module breaks with 64-bit kernel and 32-bit user space

2017-05-01 Thread Christian Heimes

Christian Heimes added the comment:

The issues seems to be resolved. In the future please add the expert for a 
topic or maintainer of a module to the nosy list of the ticket.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux

2017-05-01 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
pull_requests: +1479

___
Python tracker 

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



[issue30205] socket.getsockname() type mismatch with AF_UNIX on Linux

2017-05-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Amusingly, binding to the empty string produces something different:

>>> s = socket.socket(socket.AF_UNIX)
>>> s.getsockname()
b''
>>> s.bind(b'')
>>> s.getsockname()
b'\x05d'

while binding to the nul byte string produces the expected result:

>>> s = socket.socket(socket.AF_UNIX)
>>> s.bind(b'\x00')
>>> s.getsockname()
b'\x00'

--
components: +Library (Lib)
nosy: +pitrou
stage:  -> needs patch
type:  -> behavior
versions: +Python 3.5, Python 3.6, Python 3.7 -Python 2.7

___
Python tracker 

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



[issue20401] inspect.signature removes initial starred method params (bug)

2017-05-01 Thread Yury Selivanov

Yury Selivanov added the comment:

> Is there any reason that the second case Terry provide still will failed with 
> ValueError?

> class C:
>def meth2(**kwds): pass


> ip.signature(C().meth2)

Yes, the reason is that `C().meth2` is an invalid method that can't be called. 
Try calling `C().meth2()` and you will get a TypeError.

There is no bug here.

--

___
Python tracker 

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



[issue30214] make_zip.py lacks command a few line options.

2017-05-01 Thread Steve Dower

Steve Dower added the comment:

I disagree with this going into the core repo - this script is meant for 
producing our official packages, and is not a general purpose tool.

If someone does make changes, please backport them as far as possible (so that 
bug fixes are easy to cherry pick) and don't break the core use case.

--

___
Python tracker 

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



[issue22385] Define a binary output formatting mini-language for *.hex()

2017-05-01 Thread Eric V. Smith

Eric V. Smith added the comment:

The Unix "od" command pretty much has all of the possibilities covered.

https://linuxconfig.org/od-1-manual-page

Although "named characters" might be going a bit far. Float, too.

--

___
Python tracker 

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



[issue27618] docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently)

2017-05-01 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
stage:  -> patch review
versions: +Python 2.7, Python 3.7 -Python 3.3, Python 3.4

___
Python tracker 

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



[issue30221] Deprecate assertNotAlmostEqual

2017-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Google finds only 16 books for me. I have reviewed them, and all of them just 
list assertion methods, copying the official documentation or one other. Often 
the book contains just one mention of assertNotAlmostEqual (not including the 
contents and the index). No books contain an example for assertNotAlmostEqual. 
They even don't mention the delta parameter added in 3.2.

--

___
Python tracker 

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



[issue26362] Approved API for creating a temporary file path

2017-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

>  temp_name = tempfile.mktemp(dir=".")
>  os.link("a", temp_name)

There is a race condition between generating file name and using it. 
tempfile.mktemp() is not much more useful that just a function that generates 
some names which unlikely matches the names of existing files the directory. In 
any case you should catch an error and repeat an attempt with different name. 
How much attempts to do and what additional checks to do is an application 
specific.

--

___
Python tracker 

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



[issue30221] Deprecate assertNotAlmostEqual

2017-05-01 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy:  -skrah

___
Python tracker 

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



[issue30214] make_zip.py lacks command a few line options.

2017-05-01 Thread Decorater

Decorater added the comment:

Alright moved the bug part to http://bugs.python.org/issue30222.

--

___
Python tracker 

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



[issue30221] Deprecate assertNotAlmostEqual

2017-05-01 Thread Stefan Krah

Stefan Krah added the comment:

> Do these books have any use cases for assertNotAlmostEqual() or just 
> enumerate the list of TestCase methods?

I think this should be researched by the proponent of the change.

--

___
Python tracker 

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



[issue30222] make_zip.py had a bug when setting up full 64 bit distribution.

2017-05-01 Thread Decorater

New submission from Decorater:

Basically running make_zip like this:

".\PCbuild\amd64\python.exe" ".\Tools\msi\make_zip.py" -a x64 -o 
".\python36-x86-x64"

Cuases make_zip mess up where none of the libs\*.lib, nor any of the assemblies 
are copied. And is reproducible on me.

However doing something like this on the 32 bit version of python does not get 
this issue.

--
components: Demos and Tools, Windows
messages: 292694
nosy: Decorater, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: make_zip.py had a bug when setting up full 64 bit distribution.
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters

2017-05-01 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

The relevant discussion of this bug is happening in 
https://github.com/python/cpython/pull/1214.

--

___
Python tracker 

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



[issue30214] make_zip.py lacks command a few line options.

2017-05-01 Thread Decorater

Decorater added the comment:

Alright renamed it.

--

___
Python tracker 

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



[issue30214] make_zip.py lacks command a few line options.

2017-05-01 Thread Decorater

Changes by Decorater :


--
title: make_zip.py lacks command a few line options and has a bug. -> 
make_zip.py lacks command a few line options.

___
Python tracker 

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



[issue30221] Deprecate assertNotAlmostEqual

2017-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Any peculiarity that applies to assertNotAlmostEqual also applies to 
> assertAlmostEqual, so I'm not sure how removing one but keeping the other 
> would simplify anything.

There are use cases for assertAlmostEqual(). You can find examples in the 
CPython tests and in other open sources. Do you have use cases for 
assertNotAlmostEqual()?

> Furthermore, such symmetry between positive and negative asserts is 
> widespread in the unittest API, so this dual API is quite expected and 
> nothing to be surprised about.

This symmetry is not absolute. There are no asserts opposite to assertRaises(), 
assertWarns(), assertLogs() and assertCountEqual(), assertMultiLineEqual(), 
assertSequenceEqual(), etc. Some asserts are not symmetric by its nature. 
assertNotRaises() would be useless.

> There are 100 results in Google books alone. Are the books wrong (honest 
> question, I did not check)?

Do these books have any use cases for assertNotAlmostEqual() or just enumerate 
the list of TestCase methods?

--

___
Python tracker 

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



[issue26362] Approved API for creating a temporary file path

2017-05-01 Thread Tim Chase

Tim Chase added the comment:

I do have a workaround thanks to Gregory Ewing
https://mail.python.org/pipermail/python-list/2017-May/721649.html
which suffices for my particular use-case (generating a link to a file with a 
unique filename).

As my use-case is predominantly for *nix environments, the lack of Windows' 
os.rename() atomicity is merely a 
would-be-nice-for-other-people-if-it-was-available. But I'll update my 
documentation to reflect the edge-case. Thanks, Eryk.

--

___
Python tracker 

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



[issue30221] Deprecate assertNotAlmostEqual

2017-05-01 Thread Stefan Krah

Stefan Krah added the comment:

There are 100 results in Google books alone. Are the books wrong (honest 
question, I did not check)?

They will be wrong if we remove it. ;)


I agree with Michael that assertNotAlmostEqual() doesn't hurt.

--
nosy: +skrah

___
Python tracker 

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



[issue21790] Change blocksize in http.client to the value of resource.getpagesize

2017-05-01 Thread Clay Gerrard

Clay Gerrard added the comment:

I don't think the default is bad/wrong so much as it's an inflexible magic 
number.

I think blocksize should be parameterized as an attribute on the connection - 
or at least a class attribute or module level constant so we can monkey patch 
it without having to create a subclass and redefine the *entire* send method 
(!?).

Not having a good string to pull at here is causing a non-trivial amount of 
pain:

https://github.com/sigmavirus24/requests-toolbelt/pull/84/files
https://github.com/sigmavirus24/requests-toolbelt/issues/75
https://webcache.googleusercontent.com/search?q=cache:WPSngjyUzg4J:https://technology.jana.com/2015/12/30/dont-use-python-httplib-or-any-library-that-uses-it-to-transfer-large-files-especially-to-china/+=5=en=clnk=us
https://bugs.launchpad.net/python-swiftclient/+bug/1671621

--
nosy: +Clay Gerrard

___
Python tracker 

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



[issue30221] Deprecate assertNotAlmostEqual

2017-05-01 Thread R. David Murray

R. David Murray added the comment:

Not only is not something to be surprised about, it would be surprising for it 
to be absent.  So the user cognitive overhead of removing it is quite possibly 
higher than that of it being there.

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



[issue30221] Deprecate assertNotAlmostEqual

2017-05-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Any peculiarity that applies to assertNotAlmostEqual also applies to 
assertAlmostEqual, so I'm not sure how removing one but keeping the other would 
simplify anything.

Furthermore, such symmetry between positive and negative asserts is widespread 
in the unittest API, so this dual API is quite expected and nothing to be 
surprised about.

--

___
Python tracker 

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



[issue30145] Create a How to or Tutorial documentation for asyncio

2017-05-01 Thread STINNER Victor

STINNER Victor added the comment:

Le 1 mai 2017 19:06, "Mariatta Wijaya"  a écrit :

Mariatta Wijaya added the comment:

Sounds great! Thanks, Yury!

Victor, do you think it's worth including a link to
http://asyncio.readthedocs.io/en/latest/ somewhere in the docs, if we
haven't already?

Yes!

--

___
Python tracker 

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



[issue30214] make_zip.py lacks command a few line options and has a bug.

2017-05-01 Thread Brett Cannon

Brett Cannon added the comment:

Can you separate out the bug report from the feature request as two separate 
issues? You can keep one here and rename the title if you want.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue24119] Carry comments with the AST

2017-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Where would comment be attached in the following case?

a = ('start' # comment 1
 'continuation') # comment 2

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue24119] Carry comments with the AST

2017-05-01 Thread Brett Cannon

Brett Cannon added the comment:

There's potentially some usefulness from other tools, but Raymond is right that 
the main motivation is definitely gone long-term. Dropping this down to "low" 
priority simply because others have asked for this kind of support before.

--
priority: normal -> low

___
Python tracker 

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



[issue30221] Deprecate assertNotAlmostEqual

2017-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This will save time and memory of unittest users for reading the documentation, 
remembering it and trying to understand in which cases assertNotAlmostEqual() 
can be used. This will prevent them from using unsuitable method.

I found only one case of using assertNotAlmostEqual() in the wild, and it 
doesn't look a proper use. Do you have any cases in which it is useful?

Recently I did have a discussion with Giampaolo about changes to 
assertAlmostEqual() and assertNotAlmostEqual() [1]. If assertNotAlmostEqual() 
didn't exist this discussion would even not started. So this would save my and 
Giampaolo's time.

[1] https://github.com/python/cpython/pull/1331

--

___
Python tracker 

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



[issue30221] Deprecate assertNotAlmostEqual

2017-05-01 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Agreed with Michael.

--
nosy: +pitrou

___
Python tracker 

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



[issue30207] Rename test.test_support to test.support in 2.7

2017-05-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
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



[issue30221] Deprecate assertNotAlmostEqual

2017-05-01 Thread Michael Foord

Michael Foord added the comment:

I agree it's not *very* useful, but I don't see any benefit in getting rid of 
it either.

--

___
Python tracker 

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



[issue30208] Small typos in IDLE doc

2017-05-01 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

One PR per branch is correct.

For future reference, preferably the commit hash to be cherry-picked is the one 
that is merged into CPython's master branch. It can be found at the original PR 
where it says  merged commit  into python:master. For PR 
1353, it is 9dc2b38. 

For this issue, it doesn't make much difference since the PR contains only one 
commit. For PRs that contain multiple commits, it makes more sense to 
cherry-pick the squashed commit to master :)

Thanks :)

--
nosy: +Mariatta

___
Python tracker 

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



[issue29606] urllib FTP protocol stream injection

2017-05-01 Thread ecbftw

ecbftw added the comment:

It was just pointed out by @giampaolo in 
(https://github.com/python/cpython/pull/1214) that an escaping mechanism does 
actually exist for FTP, as defined in RFC-2640.  The relevant passage is as 
follows:

   When a  character is encountered as part of a pathname it MUST be
   padded with a  character prior to sending the command. On
   receipt of a pathname containing a  sequence the 
   character MUST be stripped away. This approach is described in the
   Telnet protocol [RFC854] on pages 11 and 12. For example, to store a
   pathname fooboo.bar the pathname would become
   fooboo.bar prior to sending the command STOR
   fooboo.bar. Upon receipt of the altered
   pathname the  character following the  would be stripped
   away to form the original pathname.


It isn't clear how good FTP server support for this is, or if firewalls 
recognize this escaping as well.  In the case of firewalls, one could argue 
that if they don't account for it, the vulnerability lies in them.

--

___
Python tracker 

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



[issue30145] Create a How to or Tutorial documentation for asyncio

2017-05-01 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Sounds great! Thanks, Yury!

Victor, do you think it's worth including a link to 
http://asyncio.readthedocs.io/en/latest/ somewhere in the docs, if we haven't 
already?

--

___
Python tracker 

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



[issue30207] Rename test.test_support to test.support in 2.7

2017-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 6bed8f95d72f622cb916bcebad651ccd3de6fe9d by Serhiy Storchaka in 
branch '2.7':
bpo-30207: Install the Lib/test/support directory. (#1369)
https://github.com/python/cpython/commit/6bed8f95d72f622cb916bcebad651ccd3de6fe9d


--

___
Python tracker 

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



[issue30221] Deprecate assertNotAlmostEqual

2017-05-01 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The purpose of the assertNotAlmostEqual() method of TestCase is not clear. This 
method is never used in the CPython testsuite (except tests for it itself), it 
is never mentioned in the bug tracker (except one general issue about mass 
renaming methods in TestCase). I have found only one usage of 
assertNotAlmostEqual() which is not testing its itself on GitHub [1], and in 
that case it would be better to use assertAlmostEqual() with correct expected 
result instead.

It seems to me that assertNotAlmostEqual() was added just "for symmetry", and 
there are no real cases for it. Deprecating and following removing it will make 
the API simpler.

[1] 
https://github.com/BrechtDeVlieger/Altran_courses/blob/d983b30b4dc1eac6905a71209037ed082330f7fe/Python%20fundamentals/Day1/Functions/test_temperature_ori.py

--
components: Library (Lib)
messages: 292674
nosy: ezio.melotti, michael.foord, rbcollins, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Deprecate assertNotAlmostEqual
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



[issue30220] Why are the custom messages for ValueError and TypeError suppressed in argparse?

2017-05-01 Thread Pedro

Pedro added the comment:

You can get around the message suppression by raising anything that isn't a 
ValueError, TypeError, or subclass thereof. It will propagate up past 
_get_value(). I still don't see the reason for giving special treatment to 
ValueError and TypeError.

--

___
Python tracker 

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



[issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial

2017-05-01 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Jaysinh, are you up for preparing a PR based on you patch?
Start with the master branch. 
Thanks.

--

___
Python tracker 

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



[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows

2017-05-01 Thread Jelmer Vernooij

Changes by Jelmer Vernooij :


--
nosy: +Jelmer Vernooij, jelmer

___
Python tracker 

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



[issue22385] Define a binary output formatting mini-language for *.hex()

2017-05-01 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Based on the ideas thread it isn't obvious that chunk size means "per byte".  I 
suggest either specifying the number of base digits per delimiter.  Or using a 
name other than chunk that indicates it means bytes.

If we're going to do this, it should also be done for octal formatting (the 'o' 
code) for consistency.

Also, per the python-ideas thread, via parameters to the .hex() method on 
bytes/bytearray/memoryview.

I'm inclined to leave 'A' printable-ascii formatting out.  Or at least consider 
that it could also work on unicode str.

--
nosy: +gregory.p.smith
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue30207] Rename test.test_support to test.support in 2.7

2017-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for noticing this Zachary.

--

___
Python tracker 

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



[issue30207] Rename test.test_support to test.support in 2.7

2017-05-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution: fixed -> 
stage: resolved -> patch review
status: closed -> open

___
Python tracker 

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



[issue30207] Rename test.test_support to test.support in 2.7

2017-05-01 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1478

___
Python tracker 

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



[issue30220] Why are the custom messages for ValueError and TypeError suppressed in argparse?

2017-05-01 Thread Pedro

New submission from Pedro:

ArgumentParser._get_value() has two exception handlers: one for 
ArgumentTypeError, and one for (TypeError, ValueError). But in the latter case, 
any custom message I include the TypeError or ValueError is ignored and 
replaced with a generic "invalid value" message.

I don't see why the module wouldn't first check for a custom message in a 
TypeError or ValueError exception, as it does for ArgumentTypeError, and only 
use the generic message if a custom one is not specified. The current behavior 
does not let you to give the user a detailed reason for the exception unless 
you raise ArgumentTypeError, which is considered an implementation detail as 
mentioned in #20039, and also doesn't feel right for errors that are not 
related to the argument's type.


Code to reproduce:

import argparse

def nonnegative_not_suppressed(arg):
  try:
x = int(arg)
if x >= 0:
  return x
else:
  raise argparse.ArgumentTypeError('Enter a nonnegative integer')
  except:
raise argparse.ArgumentTypeError('Enter a nonnegative integer')

def nonnegative_suppressed(arg):
  try:
x = int(arg)
if x >= 0:
  return x
else:
  raise ValueError('Enter a nonnegative integer')
  except:
raise ValueError('Enter a nonnegative integer')

p = argparse.ArgumentParser('parser')
p.add_argument('--no-suppress', type=nonnegative_not_suppressed)
p.add_argument('--suppress', type=nonnegative_suppressed)
p.parse_args(['--no-suppress', '-4']) # Displays "Enter a nonnegative integer"
p.parse_args(['--suppress', '-4']) # Displays "invalid nonnegative_suppressed 
value: '-4'"

--
components: Extension Modules
messages: 292669
nosy: pgacv2
priority: normal
severity: normal
status: open
title: Why are the custom messages for ValueError and TypeError suppressed in 
argparse?
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue30190] unittest's assertAlmostEqual improved error message

2017-05-01 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:


New changeset 5d7a8d0c13737fd531b722ad76c505ef47aac96a by Giampaolo Rodola in 
branch 'master':
bpo-30190: improved error msg for assertAlmostEqual(delta=...) (#1331)
https://github.com/python/cpython/commit/5d7a8d0c13737fd531b722ad76c505ef47aac96a


--

___
Python tracker 

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



[issue30219] webbrowser.open outputs xdg-open deprecation warning

2017-05-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Seems it outputs the warning only on Gnome. Actually, xdg-open tries to run 
gvfs-open if it is installed and it is the tool now depreciated. This issue is 
fixed in mainstream. [1]

[1] 
https://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=0d6eebb27c562e8644ccf616ebdbddf82d0d2dd8

--
resolution:  -> third party

___
Python tracker 

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



[issue30160] BaseHTTPRequestHandler.wfile: supported usage unclear

2017-05-01 Thread Mike

Mike added the comment:

My CLA signature has been verified, but based on the most recent comments, I'm 
not sure if something needs to change in this patch. Is there anything I can 
doto help this land?

--

___
Python tracker 

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



[issue15987] Provide a way to compare AST nodes for equality recursively

2017-05-01 Thread Louie Lu

Louie Lu added the comment:

Provide a recursive way to compare AST nodes, it will compare with fields, but 
no attributes.


The performance compare with ast.dump methods in unittest


# Recursive compare
./python -m unittest test.test_ast.ASTCompareTest
..
--
Ran 6 tests in 0.669s

OK

# ast.dump compare
./python -m unittest test.test_ast.ASTCompareTest
..
--
Ran 6 tests in 2.192s

--

___
Python tracker 

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



[issue15987] Provide a way to compare AST nodes for equality recursively

2017-05-01 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +1477

___
Python tracker 

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



[issue30219] webbrowser.open outputs xdg-open deprecation warning

2017-05-01 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30207] Rename test.test_support to test.support in 2.7

2017-05-01 Thread Zachary Ware

Zachary Ware added the comment:

I like this change, but the install target in Makefile.pre.in needs to be 
adjusted accordingly: 
http://buildbot.python.org/all/builders/x86%20Gentoo%20Installed%20with%20X%202.7/builds/120

--
nosy: +zach.ware

___
Python tracker 

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



[issue22385] Define a binary output formatting mini-language for *.hex()

2017-05-01 Thread Nick Coghlan

Nick Coghlan added the comment:

Copying the amended proposal from that python-ideas thread into here:

Start with a leading base format character (chosen to be orthogonal to the 
default format characters):

"h": lowercase hex
"H": uppercase hex
"A": ASCII (using "." for unprintable & extended ASCII)

format(b"xyz", "A") -> 'xyz'
format(b"xyz", "h") -> '78797a'
format(b"xyz", "H") -> '78797A'

Followed by a separator and "chunk size":

format(b"xyz", "h 1") -> '78 79 7a'
format(b"abcdwxyz", "h 4") -> '61626364 7778797a'

format(b"xyz", "h,1") -> '78,79,7a'
format(b"abcdwxyz", "h,4") -> '61626364,7778797a'

format(b"xyz", "h:1") -> '78:79:7a'
format(b"abcdwxyz", "h:4") -> '61626364:7778797a'

In the "h" and "H" cases, allow requesting a preceding "0x" on the chunks:

format(b"xyz", "h#") -> '0x78797a'
format(b"xyz", "h# 1") -> '0x78 0x79 0x7a'
format(b"abcdwxyz", "h# 4") -> '0x61626364 0x7778797a'

In the thread, I suggested the section before the format character would use 
the standard string formatting rules (alignment, fill character, width, 
precision), but I now think that would be ambiguous and confusing, and would be 
better left as a post-processing step on the rendered text.

--

___
Python tracker 

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



[issue26362] Approved API for creating a temporary file path

2017-05-01 Thread Eryk Sun

Eryk Sun added the comment:

For Windows, use os.replace instead of os.rename, which will replace the 
destination file if it exists. However, a request to replace an existing file 
will be denied access if the file is currently open. Unlinking an open file 
isn't allowed, even if it's open with delete sharing.

--
nosy: +eryksun

___
Python tracker 

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



[issue24119] Carry comments with the AST

2017-05-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

After PEP 526, the need for this proposal may have evaporated.

--
nosy: +rhettinger

___
Python tracker 

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



[issue26362] Approved API for creating a temporary file path

2017-05-01 Thread R. David Murray

R. David Murray added the comment:

Yes, and I'm saying his example doesn't work on Windows (on windows, it does 
not accomplish his goal).  So I'm not sure it is a use case appropriate for the 
standard library.  I'm not saying it definitely isn't, I'm just raising a doubt.

--

___
Python tracker 

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



[issue30219] webbrowser.open outputs xdg-open deprecation warning

2017-05-01 Thread desbma

Changes by desbma :


--
type:  -> behavior

___
Python tracker 

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



[issue30219] webbrowser.open outputs xdg-open deprecation warning

2017-05-01 Thread desbma

New submission from desbma:

Python 3.6.1 (default, Mar 27 2017, 00:27:06) 
[GCC 6.3.1 20170306] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import webbrowser
>>> webbrowser.open("https://www.google.com;)
True
>>> This tool has been deprecated, use 'gio open' instead.
See 'gio help open' for more info.

A quick test reveals it is the invocation of xdg-open that outputs the warning:

$ xdg-open --version
xdg-open 1.1.0 rc3
$ xdg-open https://www.google.com
This tool has been deprecated, use 'gio open' instead.
See 'gio help open' for more info.

It can be quite annoying because in my program the message is outputted in a 
ncurses UI and it messes the display.

Possible changes to fix this:
* Silence xdg-open output (pass stdout=subprocess.DEVNULL, 
stderr=subprocess.DEVNULL in Popen call)
* Detect and use "gio open" if available

--
components: Library (Lib)
messages: 292659
nosy: desbma
priority: normal
severity: normal
status: open
title: webbrowser.open outputs xdg-open deprecation warning
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



[issue26362] Approved API for creating a temporary file path

2017-05-01 Thread Ben Finney

Ben Finney added the comment:

On 01-May-2017, R. David Murray wrote:
> You are depending on a non-portable feature of os.rename there

What's the non-portable dependency?

If you mean the expectation that ‘os.rename’ will be atomic on
success: the documentation promises “If successful, the renaming will
be an atomic operation”, without any non-compatibility caveat
.

If you mean the ‘except OSError’ clause: that's not a dependency of
this example. It is handling a case that is documented to occur on
some platforms. On platforms that don't have that behaviour, the
clause is not a dependency of this use case.

Neither of those is germane to the use case being demonstrated: the
need for a temporary filesystem path as generated by ‘tempfile.mktemp’.

> so I'm not convinced this makes a good use case for the Python
> stdlib.

Note that Tim Chase is *not* presenting a use case for ‘os.rename’,
but rather a use case for ‘tempfile.mktemp’. For that purpose it seems
a valid use case.

--

___
Python tracker 

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



[issue26362] Approved API for creating a temporary file path

2017-05-01 Thread R. David Murray

R. David Murray added the comment:

You are depending on a non-portable feature of os.rename there, so I'm not 
convinced this makes a good use case for the Python stdlib.

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



[issue15987] Provide a way to compare AST nodes for equality recursively

2017-05-01 Thread Louie Lu

Louie Lu added the comment:

If we only need a binary True/False result, could we just return a compare of 
dump(a) == dump(b)?

This can also add the include_attributes flags for need.

--
nosy: +louielu

___
Python tracker 

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



[issue24119] Carry comments with the AST

2017-05-01 Thread Louie Lu

Louie Lu added the comment:

Brett, which implement method will you prefer?

If we want to carry comment at builtin_compile_impl, it will need to change the 
grammar since tokenize just drop the comment when dealing with source code.

But if just using regex, will it be more easy with just combine the exists 
tokenize and ast module?

--
nosy: +louielu

___
Python tracker 

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



[issue30181] Correct the parsing of a test case docstring.

2017-05-01 Thread Louie Lu

Louie Lu added the comment:

Ben, if you have any problem about how to get on with GitHub, I can help you at 
#python-dev @ freenode, ping louielu on the chatroom.

--

___
Python tracker 

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



[issue30200] tkinter ListboxSelect

2017-05-01 Thread Frank Pae

Frank Pae added the comment:

Here some detailed information about Tcl / Tk versions:

platform   Windows-10-10.0.14393   AMD64

python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit 
(AMD64)]
tkinterTcl/Tk  8.6.6 / 8.6.6

python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 16:02:32) [MSC v.1900 64 
bit (AMD64)]
tkinterTcl/Tk  8.6.4 / 8.6.4

python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 
bit (AMD64)]
tkinterTcl/Tk  8.5.15 / 8.5.15

--

___
Python tracker 

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



[issue30181] Correct the parsing of a test case docstring.

2017-05-01 Thread Louie Lu

Louie Lu added the comment:

> Thank you. I'll re-base my branch onto the master branch found at the GitHub 
> repository.

You may re-clone a GitHub repository instead of rebase bitbucket repo.


> I don't maintain repositories at GitHub. Does that mean the contribution must 
> be rejected?

No, your contribution will not be rejected by "you don't maintain the repo on 
GitHub", everyone can send the patch (PR) to python/cpython.

you will need to fork python/cpython from GitHub first, this will create a fork 
in your GitHub account, maybe benf/cpython if your GitHub account is benf, and 
then clone this repo (benf/cpython), the rest step please see the instruction 
in devguide !

--

___
Python tracker 

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



[issue30181] Correct the parsing of a test case docstring.

2017-05-01 Thread Ben Finney

Ben Finney added the comment:

On 2017-05-01 17:45, Louie Lu wrote:
> Ben, the process of submitting PR was migrated to GitHub

Thank you. I'll re-base my branch onto the master branch found at the GitHub 
repository.

> you will need to use a GitHub account to do it

I don't maintain repositories at GitHub. Does that mean the contribution must 
be rejected?

--

___
Python tracker 

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



[issue30181] Correct the parsing of a test case docstring.

2017-05-01 Thread Louie Lu

Louie Lu added the comment:

Ben, the process of submitting PR was migrated to GitHub, you will need to use 
a GitHub account to do it.

You can refer to devguide for how to submit a PR here:

http://cpython-devguide.readthedocs.io/pullrequest.html

--

___
Python tracker 

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



[issue30181] Correct the parsing of a test case docstring.

2017-05-01 Thread Ben Finney

Ben Finney added the comment:

Howdy R. David,

Okay, I have put together a series of commits to address this bug. The
changes are in my personal fork of the ‘cpython’ repository, so this is
a pull request from ‘wip/issue/issue30181_parse-docstring-using-pydoc’
in that repository.

The following changes since commit 8550803dfba4cf7018ee7415593ceb34c52923e6:

  Backed out changeset f23fa1f7b68f (2017-02-10 14:19:36 +0100)

are available in the git repository at:

  https://benf_wspdigi...@bitbucket.org/benf_wspdigital/cpython.git

for you to fetch changes up to c2de731582a9da1147a300a991890ff663891e75:

  Parse the test case docstring using `pydoc.splitdoc`. (2017-05-01 16:55:52 
+1000)


(from the branch description for 
wip/issue/issue30181_parse-docstring-using-pydoc local branch)

Correct the parsing of a test case docstring.


Ben Finney (4):
  Add test cases for single-line test case docstring.
  Add test cases for stripping surrounding space for shortDescription.
  Add test cases for test case docstring with surrounding newlines.
  Parse the test case docstring using `pydoc.splitdoc`.

 Lib/unittest/case.py   | 34 --
 Lib/unittest/test/test_case.py | 42 ++
 Lib/unittest/test/test_functiontestcase.py | 58 +-
 3 files changed, 115 insertions(+), 19 deletions(-)

--
title: Incorrect parsing of test case docstring -> Correct the parsing of a 
test case docstring.

___
Python tracker 

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



[issue30180] PyArg_ParseTupleAndKeywords supports required keyword only arguments

2017-05-01 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +xiang.zhang

___
Python tracker 

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