[issue29807] ArgParse page in library reference rewrite

2017-03-13 Thread Steve Carter

New submission from Steve Carter:

Originally raise as https://github.com/python/pythondotorg/issues/1059

Although it's a reference page, it is clouded by too many examples and too 
little reference material. Moreover, the examples are not real-world 
applications of argument parsing.

I propose removing the "process some integers" example, replacing it with 
something more typically gnu style, e.g., myapp.py [--quiet] [--log-level _n_] 
[--title=STR] {get | put} [FSPEC [, FSPEC...]]. This shows the user how to to 
many of the common command-line tasks.

[I'm tentatively offering to do this, but I haven't yet found the content I 
need to revise.]

--
assignee: docs@python
components: Documentation
messages: 289569
nosy: docs@python, sweavo
priority: normal
severity: normal
status: open
title: ArgParse page in library reference rewrite
versions: Python 2.7

___
Python tracker 

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



[issue24622] tokenize.py: missing EXACT_TOKEN_TYPES

2017-03-13 Thread Vedran Čačić

Vedran Čačić added the comment:

We obviously missed this, at least for 3.5... any chance of having it for 3.7?

--
nosy: +veky

___
Python tracker 

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



[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-03-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If the example worked on old versions of Python, perhaps this is a regression. 
Either WeakSet was pickleable or it was not used in that 
asyncio/multiprocessing use. If this is a regression in the stdlib it should be 
fixed.

--
nosy: +fdrake, giampaolo.rodola, haypo

___
Python tracker 

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



[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It would be nice if you provided the solution with %S. But if you don't do 
this, and nobody other provide other pull request, I'll merge the current 
solution.

When the dictionary keys are changed during iteration PyDict_Next() can skip 
some key-value pairs or return some key-value pairs multiple times. It never 
raises an exception, crashes or hangs in infinite loop. This is appropriate.

The problem is that after calling __str__ for the key, the borrowed reference 
to the value can become invalid, and __repr__ will be called for destroyed 
object. This can cause an undefined behavior, in particular a crash.

--
stage:  -> needs patch

___
Python tracker 

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



[issue27880] cPickle fails on large objects (still - 2011 and counting)

2017-03-13 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



[issue27880] cPickle fails on large objects (still - 2011 and counting)

2017-03-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Xiang!

--

___
Python tracker 

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



[issue29540] Add compact=True flag to json.dump/dumps

2017-03-13 Thread Raymond Hettinger

Raymond Hettinger added the comment:

[Serhiy]
> Personally I dislike any complication of json API. 
> Likely it is already the most complicated API in the stdlib.

[Bob Ippolito]
> the interface here is already a bit too complex 
> and the benefit is pretty minimal

I concur with those sentiments and am going to mark this as closed.  We already 
have a way to do it.  That way may not be ideal but putting in an additional 
way is likely to result in a net increase in complexity.

If some counter-consensus arises on one of the mailing lists, this tracker 
issue can be re-opened and the discussion can continue.

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



[issue27880] cPickle fails on large objects (still - 2011 and counting)

2017-03-13 Thread Xiang Zhang

Xiang Zhang added the comment:

>>> import cPickle
[45575 refs]
>>> cPickle.dumps('a' * (2 ** 31),-1)
Traceback (most recent call last):
  File "", line 1, in 
OverflowError: cannot serialize a string larger than 2 GiB
[45606 refs]
>>> 

:-)

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue29806] Requesting version info with lowercase -v or -vv causes an import crash

2017-03-13 Thread Ned Deily

Changes by Ned Deily :


--
stage:  -> resolved
status: open -> closed
type: crash -> 

___
Python tracker 

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



[issue29806] Requesting version info with lowercase -v or -vv causes an import crash

2017-03-13 Thread INADA Naoki

INADA Naoki added the comment:

> 1.On both  Amazon Linux AMI Python 2.7.12 and also Anaconda Python 3.6.0, 
> using lowercase v's causes a crash on some kind of import.

Lowercase -v is not version, it's "verbose". and -vv is "very verbose".
So it's not crash, just a verbose message about importing.

> 2.Anaconda does not provide more information. Is that expected?

output of -V and -VV is implementation detail.  No standard format is specified 
by Python language.
PyPy has different output too.

--
nosy: +inada.naoki
resolution:  -> not a bug

___
Python tracker 

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



[issue29806] Requesting version info with lowercase -v or -vv causes an import crash

2017-03-13 Thread Anne Moroney

New submission from Anne Moroney:

In trying to test the new feature in 3.6.0, 
$ python -VV  # get more info than python -V or python --version 
I found several oddities. 

1.On both  Amazon Linux AMI Python 2.7.12 and also Anaconda Python 3.6.0, using 
lowercase v's causes a crash on some kind of import.

1a.AWS first lines are:
[ec2-user@ip-172-31-2-101 ~]$ python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib64/python2.7/site.pyc matches /usr/lib64/python2.7/site.py
import site # precompiled from /usr/lib64/python2.7/site.pyc

1b.Conda first lines are:
(py36aws)me:tool-aws me$ python -v
import _frozen_importlib # frozen
import _imp # builtin
import sys # builtin
import '_warnings' # 
//etc 

1c.In both cases, after lots of stuff, must quit python with 
quit()

2.Anaconda does not provide more information. Is that expected?
(py36aws) $ python -VV
Python 3.6.0 :: Continuum Analytics, Inc.
(py36aws)$ python -V
Python 3.6.0 :: Continuum Analytics, Inc.
(py36aws)$ python --version
Python 3.6.0 :: Continuum Analytics, Inc.

--
assignee: docs@python
components: Documentation
messages: 289561
nosy: AnneTheAgile, docs@python
priority: normal
severity: normal
status: open
title: Requesting version info with lowercase -v or -vv causes an import crash
type: crash
versions: Python 2.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



[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-03-13 Thread DAVID ALEJANDRO Pineda

DAVID ALEJANDRO Pineda added the comment:

Hello Again.

The problem can be replicated in the same structure when call the 
'functools.partial' feature

I wrote a simple example. It uses the asyncio and multiprocessing structure.

https://github.com/dpineiden/async_multiprocessing

With this dependences:

https://gitlab.com/pineiden/tasktools
https://gitlab.com/pineiden/networktools

In python 3.5.1 works fine even if in the mprocess file uncomment the 
'functools.partial'. But when i use a larger version, like 3.6, fails with the 
'weakref'

--

___
Python tracker 

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



[issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different

2017-03-13 Thread Eryk Sun

Eryk Sun added the comment:

Moving a file across volumes isn't atomic. Getting an exception in this case 
can be useful. There could be a "strict" keyword-only parameter that defaults 
to False. If it's true, then replace() won't try to move the file.

--
nosy: +eryksun

___
Python tracker 

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



[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-13 Thread Michael Seifert

Michael Seifert added the comment:

Given that this my first contribution to CPython I'm not too sure about the 
etiquette. When do I know (or who decides) when an agreement on a fix is 
reached? I wouldn't mind retracting the pull request if someone else wants to 
fix it differently.

I actually used the PyUnicode_Check on purpose because I always viewed the 
representation should be either unreadably (like objectxyz at 0xwhatever) or 
something that can should be copy&pasted-able. Returning something that will 
definetly throw an exception when copied seemed inappropriate.

But the %S change definetly has it's attraction: shorter, also fixes the 
segfault and no need for type checking.

Given Serhiy's answer it seems to me there could be another lurking problem 
because any %R or %S is potentially a problem within PyDict_Next - because this 
C-API-Function states that "The dictionary p should not be mutated during 
iteration. It is safe to modify the values of the keys as you iterate over the 
dictionary, but only so long as the set of keys does not change." But arbitary 
__str__ or __repr__ functions could do just that. I'm mostly an end-user so I'm 
not sure if I understand that right?

--

___
Python tracker 

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



[issue27657] urlparse fails if the path is numeric

2017-03-13 Thread Tim Graham

Tim Graham added the comment:

Based on discussion in issue 16932, I agree that reverting the parsing 
decisions from issue 754016 (as Martin suggested in msg271719) seems 
appropriate. I created a pull request that does that.

--
nosy: +Tim.Graham

___
Python tracker 

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



[issue19675] Pool dies with excessive workers, but does not cleanup

2017-03-13 Thread ppperry

ppperry added the comment:

Can't you just mock the Process class to have a start method that always raises 
an error?

--
nosy: +ppperry

___
Python tracker 

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



[issue29715] Arparse improperly handles "-_"

2017-03-13 Thread paul j3

paul j3 added the comment:

The change to `_parse_optional` that did go through is the ability to turn off 
abbreviations

http://bugs.python.org/issue14910

Even that has had a few complaints, http://bugs.python.org/issue29777

--

___
Python tracker 

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



[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-13 Thread Łukasz Langa

Łukasz Langa added the comment:

I'd also prefer %S instead of a hard-coded check.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-03-13 Thread Yury Selivanov

Yury Selivanov added the comment:

> AttributeError: Can't pickle local object 'WeakSet.__init__.._remove'

Well, I don't think we can do something about it. Just re-pack your arguments 
from WeakSet to a regular set.

--

___
Python tracker 

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



[issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different

2017-03-13 Thread Laurent Mazuel

Laurent Mazuel added the comment:

Just to confirm, I was able to workaround it with Py3.6:

# client_generated_path.replace(destination_folder)
shutil.move(client_generated_path, destination_folder)

It is reasonable to think about adding a similar feature to pathlib if it 
doesn't support it and just special-case the drive-to-drive scenario for Windows

--

___
Python tracker 

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



[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-03-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Please provide your code as a text, not a picture.

--

___
Python tracker 

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



[issue27880] cPickle fails on large objects (still - 2011 and counting)

2017-03-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

PR 662 presumably fixes this issue.

Could anyone please check that the test case is fixed? I have no enough memory 
for testing.

--
assignee:  -> serhiy.storchaka
nosy: +alexandre.vassalotti, serhiy.storchaka
stage:  -> patch review

___
Python tracker 

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



[issue27880] cPickle fails on large objects (still - 2011 and counting)

2017-03-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +545

___
Python tracker 

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



[issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different

2017-03-13 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different

2017-03-13 Thread Brett Cannon

Changes by Brett Cannon :


--
components: +Library (Lib) -IO

___
Python tracker 

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



[issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different

2017-03-13 Thread Laurent Mazuel

New submission from Laurent Mazuel:

Trying to use Pathlib and Path.replace on Windows if drive are different leads 
to an issue:

  File "D:\myscript.py", line 184, in update
client_generated_path.replace(destination_folder)
  File "c:\program files (x86)\python35-32\Lib\pathlib.py", line 1273, in 
replace
self._accessor.replace(self, target)
  File "c:\program files (x86)\python35-32\Lib\pathlib.py", line 377, in wrapped
return strfunc(str(pathobjA), str(pathobjB), *args)
OSError: [WinError 17] The system cannot move the file to a different disk 
drive: 'C:\\MyFolder' -> 'D:\\MyFolderNewName'

This is a known situation of os.rename, and workaround I found is to use shutil 
or to copy/delete manually in two steps (e.g. 
http://stackoverflow.com/questions/21116510/python-oserror-winerror-17-the-system-cannot-move-the-file-to-a-different-d)

When using Pathlib, it's not that easy to workaround using shutil (even if 
thanks to Brett Cannon now shutil accepts Path in Py3.6, not everybody has 
Py3.6). At least this should be documented with a recommendation for that 
situation. I love Pathlib and it's too bad my code becomes complicated when it 
was so simple :(

--
components: IO, Windows
messages: 289549
nosy: Laurent.Mazuel, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Pathlib.replace cannot move file to a different drive on Windows if 
filename different
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue754016] urlparse goes wrong with IP:port without scheme

2017-03-13 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue17560] problem using multiprocessing with really big objects?

2017-03-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Pickle currently handle byte strings and unicode strings larger than 4GB only 
with protocol 4. But multiprocessing currently uses the default protocol which 
currently equals 3. There was suggestions to change the default pickle protocol 
(issue23403), the pickle protocol for multiprocessing (issue26507) or customize 
the serialization method for multiprocessing (issue28053). There is also a 
patch that implements the support of byte strings and unicode strings larger 
than 4GB with all protocols (issue25370).

Beside this I think that using some kind of shared memory is better way for 
transferring large data between subprocesses.

--
nosy: +serhiy.storchaka
versions: +Python 3.7 -Python 3.4

___
Python tracker 

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



[issue29540] Add compact=True flag to json.dump/dumps

2017-03-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I expressed my opinion, but I am ready to change it if this proposal meets the 
support of other core developers after discussion on the mailing list.

--

___
Python tracker 

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



[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

PyUnicode_FromFormat() crashes in debug build if the argument for %U is not a 
unicode string.

I thought about using %S. This would correspond possible Python implementation 
(`'%s=%r' % (key, value)`). But in that case we should increase refcounts of 
key and value (and maybe even pto->kw) since custom __str__ of the key can 
remove the value from the dict and make the value variable the hanging 
reference.

I would prefer never failing __repr__, but other core developers have other 
opinion. Currently partial.__repr__ raises an exception on deep recursion and 
when the repr of any argument raises an exception.

Current Michael's patch LGTM, but if his want to suggest the solution with %S 
it would LGTM too.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue15564] cgi.FieldStorage should not call read_multi on files

2017-03-13 Thread Joshua Shields

Joshua Shields added the comment:

I ran into this issue as well. I think it is something cgi.py will need to 
handle correctly when this type of file is uploaded from a browser's file input.

--
nosy: +jshields

___
Python tracker 

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



[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-13 Thread Josh Rosenberg

Josh Rosenberg added the comment:

I feel like adding a type check to partial_repr might not be the correct fix 
here. If PyUnicode_FromFormat returned NULL and set an exception here, then the 
existing code would work as written (raising an exception, but not segfaulting).

Alternatively, if the code in question used %S for the key instead of %U, it 
would also work as written (not raising an exception or segfaulting).

It's extremely strange to have something accepted, then raise exceptions in the 
repr of all places, and adding extra special purpose code for that specific 
purpose seems odd, to say the least.

I think I'd be in favor of using %S personally, since %U should only be used 
when you have absolute guarantees that the object is a Unicode object, which we 
can't give here. Sure, an invalid state passes without notice in the repr, but 
I'm not sure that bothers me so much; if they actually try to call the invalid 
partial they'll get the TypeError they deserve at a time when the type finally 
matters.

--
nosy: +josh.r

___
Python tracker 

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



[issue29540] Add compact=True flag to json.dump/dumps

2017-03-13 Thread Brett Cannon

Brett Cannon added the comment:

So new options sounds like a no-go, but what about the COMPACT attribute on the 
json module as per https://github.com/python/cpython/pull/72?

--

___
Python tracker 

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



[issue27657] urlparse fails if the path is numeric

2017-03-13 Thread Tim Graham

Changes by Tim Graham :


--
pull_requests: +543

___
Python tracker 

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



[issue754016] urlparse goes wrong with IP:port without scheme

2017-03-13 Thread Tim Graham

Changes by Tim Graham :


--
pull_requests: +544

___
Python tracker 

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



[issue16932] urlparse fails at parsing "www.python.org:80/"

2017-03-13 Thread Tim Graham

Changes by Tim Graham :


--
pull_requests: +542

___
Python tracker 

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



[issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture

2017-03-13 Thread Iryna

Changes by Iryna :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue28856] %b format for bytes does not support objects that follow the buffer protocol

2017-03-13 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

@xiang.zhang - I am the OP for this issue, so naturally I expect this to be 
fixed.  I have a work-around in place for my own code, so I have no opinion on 
the particular versions.  I guess the normal policy on bug fixes should apply.

--

___
Python tracker 

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



[issue29787] Internal importlib frames visible when module imported by import_module throws exception

2017-03-13 Thread Brett Cannon

Brett Cannon added the comment:

That's because the frame-stripping trick is done through import.c which 
importlib.import_module() doesn't pass through. So thanks for the report, 
Ulrich, but it is working as expected and we won't be changing import_module() 
to pass through the C code to keep the C code to a minimum.

--
nosy: +brett.cannon
resolution:  -> not a bug
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



[issue29688] Add support for Path.absolute()

2017-03-13 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee: brett.cannon -> 

___
Python tracker 

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



[issue28856] %b format for bytes does not support objects that follow the buffer protocol

2017-03-13 Thread Ethan Furman

Ethan Furman added the comment:

I suspect it was a simple oversight, and should be added now.  Since it's been 
missing for so long I think we should put it in 3.7, maybe put it in 3.6 (maybe 
not, since it has two point releases out now), but definitely not in 3.5.

--

___
Python tracker 

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



[issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture

2017-03-13 Thread Iryna

New submission from Iryna:

I am trying to build Python 3.6.1rc1 on Fedora, and have the following test 
failing on arm64 (aarch64) architecture:

==
FAIL: test_pass_by_value (ctypes.test.test_structures.StructureTestCase)
--
Traceback (most recent call last):
  File 
"/builddir/build/BUILD/Python-3.6.1rc1/Lib/ctypes/test/test_structures.py", 
line 413, in test_pass_by_value
self.assertEqual(s.first, 0xdeadbeef)
AssertionError: 195948557 != 3735928559
--

The build log is attached.
The test was added in this commit [1] as a fix for bpo-29565.

Any idea what this can be related to?


[1] 
https://github.com/python/cpython/commit/3cc5817cfaf5663645f4ee447eaed603d2ad290a

--
components: Tests, ctypes
files: Python3.6.1rc1_build_log.txt
messages: 289539
nosy: ishcherb
priority: normal
severity: normal
status: open
title: test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture
versions: Python 3.6
Added file: http://bugs.python.org/file46724/Python3.6.1rc1_build_log.txt

___
Python tracker 

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



[issue29770] Executable help output (--help) at commandline is wrong for option -B

2017-03-13 Thread Wolfgang Langner

Wolfgang Langner added the comment:

Thanks for fixing this so fast. Good work.

--

___
Python tracker 

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



[issue3353] make built-in tokenizer available via Python C API

2017-03-13 Thread Dustin J. Mitchell

Dustin J. Mitchell added the comment:

If the patch still applies cleanly, I have no issues with you or anyone opening 
a PR.  I picked this up several years ago at the PyCon sprints, and don't 
remember a thing about it, nor have I touched any other bit of the CPython 
source since then.  So any merge conflicts would be very difficult for me to 
resolve.

--

___
Python tracker 

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



[issue12284] argparse.ArgumentParser: usage example option

2017-03-13 Thread Martin Panter

Changes by Martin Panter :


--
resolution:  -> works for me
stage: needs patch -> 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



[issue29715] Arparse improperly handles "-_"

2017-03-13 Thread Martin Panter

Martin Panter added the comment:

Max, I’m not sure if you saw the double-dash (--) workaround. IMO that is the 
“correct” way to do this for Unix command lines, and for the current version of 
“argparse”. But I guess that may be too inconvenient for your Morse Code case. 
Perhaps you can write your own custom sys.argv parser, or find some other 
argument handling library out there that doesn’t follow the usual Unix 
conventions.

I don’t really like the proposal from Issue 9334 (classifying CLI arguments 
based on registered options). It seems hard to predict and specify (too 
complex) for only a minor use case. Although it does fix part of the other 
problem with option arguments, it is not a general solution.

Assuming “-h” and “--help” are registered by default, how would an invocation 
like “prog.py -hi” be treated under the proposal (currently an error because -h 
does not accept an argument)? What about “prog.py -help”? What about “prog.py 
--h”, currently treated as an abbreviation of “--help”?

--

___
Python tracker 

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



[issue3353] make built-in tokenizer available via Python C API

2017-03-13 Thread Jim Fasarakis-Hilliard

Jim Fasarakis-Hilliard added the comment:

Could you submit a PR for this? 

I haven't seen any objections to this change, a PR will expose this to more 
people and a clear decision on whether this change is warranted can be finally 
made (I hope).

--
nosy: +Jim Fasarakis-Hilliard

___
Python tracker 

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



[issue29802] A possible null-pointer dereference in struct.s_unpack_internal()

2017-03-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
components: +Extension Modules
nosy: +serhiy.storchaka
stage:  -> patch review

___
Python tracker 

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



[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-03-13 Thread Nick Coghlan

Nick Coghlan added the comment:

OK, the PEP 538 reference implementation has reached the point where I was 
willing to create a PR for it: https://github.com/python/cpython/pull/659

That PR/branch also includes the necessary changes to always force the C.UTF-8 
locale on Android rather than defaulting to the C locale.

I believe the only thing missing at this point is the configure.ac dance to 
ensure that PY_WARN_ON_C_LOCALE and PY_COERCE_C_LOCALE never get set on Mac OS 
X.

--

___
Python tracker 

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