[issue22687] horrible performance of textwrap.wrap() with a long word

2014-11-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Current regex produces insane result.

$ ./python -c "import textwrap; print(textwrap.wrap('this-is-a-useful-feature', 
width=1, break_long_words=False))"
['this-', 'is-a', '-useful-', 'feature']

Antoine's regex produces more correct result for this case: ['this-', 'is-', 
'a-', 'useful-', 'feature']. But this is not totally correct, one-letter word 
should not be separated. This can be easy fixed.

--

___
Python tracker 

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



[issue22687] horrible performance of textwrap.wrap() with a long word

2014-11-12 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> But this is not totally correct, one-letter word should not be
> separated.

Why not? I guess it depends on English's rules for word splitting, which I 
don't know.
In any case, this issue is not about improving correctness, only performance.

--

___
Python tracker 

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



[issue22687] horrible performance of textwrap.wrap() with a long word

2014-11-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Why not? I guess it depends on English's rules for word splitting, which I
> don't know.

I suppose this is common rule in many languages. And current code supports it 
(there is a special code in the regex to ensure this rule).

> In any case, this issue is not about improving correctness,
> only performance.

But the patch shouldn't add a regression.

$ ./python -c "import textwrap; print(textwrap.wrap('this-is-a-useful', 
width=1, break_long_words=False))"

Current code: ['this-', 'is-a-useful']
Patched: ['this-', 'is-', 'a-', 'useful']

Just use lookahead assertion to ensure that the hyphen is followed by at least 
two letters.

My previous message is about that current code is not always correct so it is 
acceptable to replace it with not absolutely equivalent code.

--

___
Python tracker 

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



[issue22687] horrible performance of textwrap.wrap() with a long word

2014-11-12 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> I suppose this is common rule in many languages.

I frankly don't know about this rule. And the tests don't check for it, so for 
me it's not broken.

--

___
Python tracker 

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



[issue22851] core crashes

2014-11-12 Thread Matthias Klose

New submission from Matthias Klose:

seen with the current 2.7 branch:

$ cat > x.py
def foo(): yield
gen = foo()
print gen.gi_frame.f_restricted
for i in gen: pass
print gen.gi_frame
gen = foo()
print gen.next()
print gen.gi_frame.f_restricted

$ python x.py 
False
None
None
Segmentation fault

Program received signal SIGSEGV, Segmentation fault.
0x00462b44 in frame_getrestricted (
f=Frame 0x77f58410, for file x.py, line 1, in foo (), closure=0x0)
at ../Objects/frameobject.c:383
383 ../Objects/frameobject.c: No such file or directory.
(gdb) bt
#0  0x00462b44 in frame_getrestricted (
f=Frame 0x77f58410, for file x.py, line 1, in foo (), closure=0x0)
at ../Objects/frameobject.c:383

--
components: Interpreter Core
messages: 231069
nosy: doko
priority: normal
severity: normal
status: open
title: core crashes
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



[issue22852] urllib.parse wrongly strips empty #fragment

2014-11-12 Thread Stian Soiland-Reyes

New submission from Stian Soiland-Reyes:

urllib.parse can't handle URIs with empty #fragments. The fragment is removed 
and not reconsituted.

http://tools.ietf.org/html/rfc3986#section-3.5 permits empty fragment strings:


  URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]
  fragment= *( pchar / "/" / "?" )

And even specifies component recomposition to distinguish from not being 
defined and being an empty string:

http://tools.ietf.org/html/rfc3986#section-5.3


   Note that we are careful to preserve the distinction between a
   component that is undefined, meaning that its separator was not
   present in the reference, and a component that is empty, meaning that
   the separator was present and was immediately followed by the next
   component separator or the end of the reference.


This seems to be caused by missing components being represented as '' instead 
of None.

>>> import urllib.parse
>>> urllib.parse.urlparse("http://example.com/file#";)
ParseResult(scheme='http', netloc='example.com', path='/file', params='', 
query='', fragment='')
>>> urllib.parse.urlunparse(urllib.parse.urlparse("http://example.com/file#";))
'http://example.com/file'

>>> urllib.parse.urlparse("http://example.com/file#";).geturl()
'http://example.com/file'

>>> urllib.parse.urlparse("http://example.com/file# ").geturl()
'http://example.com/file# '

>>> urllib.parse.urlparse("http://example.com/file#nonempty";).geturl()
'http://example.com/file#nonempty'

>>> urllib.parse.urlparse("http://example.com/file#";).fragment
''

The suggested fix is to use None instead of '' to represent missing components, 
and to check with "if fragment is not None" instead of "if not fragment".


The same issue applies to query and authority. E.g.

http://example.com/file? != http://example.com/file

... but be careful about the implications of

file:///file != file:/file

--
components: Library (Lib)
messages: 231070
nosy: soilandreyes
priority: normal
severity: normal
status: open
title: urllib.parse wrongly strips empty #fragment
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



[issue22851] core crashes

2014-11-12 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue22852] urllib.parse wrongly strips empty #fragment

2014-11-12 Thread Georg Brandl

Changes by Georg Brandl :


--
nosy: +orsenthil

___
Python tracker 

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



[issue22687] horrible performance of textwrap.wrap() with a long word

2014-11-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Tests are not perfect. But this is intentional design. The part of initial 
regex:

r'\w{2,}-(?=\w{2,})|' # hyphenated words

Now it is more complicated. Note '(?=\w{2,})'.

--

___
Python tracker 

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



[issue22851] core crashes

2014-11-12 Thread eryksun

eryksun added the comment:

This is related to the fix for issue 14432. gen_send_ex sets f->f_tstate to 
NULL, so PyFrame_IsRestricted segfaults: 

#define PyFrame_IsRestricted(f) \
((f)->f_builtins != (f)->f_tstate->interp->builtins)

--
nosy: +eryksun

___
Python tracker 

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



[issue22853] Multiprocessing.Queue._feed deadlocks on import

2014-11-12 Thread Florian Finkernagel

New submission from Florian Finkernagel:

If you import a module that creates a multiprocessing.Queue, puts a value, and 
then waits for to be received again from the queue, you run into a deadlock.

The issue is that Queue._feed does 'from .util import is_existing' - which 
needs the import lock, but is still being held by the main thread.

Attached a script that illustrates this.

Patch is a two line change, import is_exiting in line 49, remove the import 
inside the thread:

49c49
< from multiprocessing.util import debug, info, Finalize, register_after_fork
---
> from multiprocessing.util import debug, info, Finalize, register_after_fork, 
> is_exiting
232d231
< from .util import is_exiting

--
files: show_queue_import_bug.py
messages: 231073
nosy: ffinkernagel
priority: normal
severity: normal
status: open
title: Multiprocessing.Queue._feed deadlocks on import
versions: Python 2.7
Added file: http://bugs.python.org/file37185/show_queue_import_bug.py

___
Python tracker 

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



[issue22850] Backport ensurepip Windows installer changes to 2.7

2014-11-12 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I'm not working on Python 2.7 anymore, so I can't offer help.

--

___
Python tracker 

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



[issue22851] core crashes

2014-11-12 Thread STINNER Victor

STINNER Victor added the comment:

Related change:

New changeset aa324af42c0e by Victor Stinner in branch '2.7':
Issue #14432: Generator now clears the borrowed reference to the thread state
http://hg.python.org/cpython/rev/aa324af42c0e

--

___
Python tracker 

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



[issue19494] Add urllib2.HTTPBasicPriorAuthHandler for use with APIs that don't return 401 errors

2014-11-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fb3061ba6fd2 by Nick Coghlan in branch 'default':
Close #19494: add urrlib.request.HTTPBasicPriorAuthHandler
https://hg.python.org/cpython/rev/fb3061ba6fd2

--
nosy: +python-dev
resolution:  -> fixed
stage: commit 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



[issue22827] Backport ensurepip to 2.7 (PEP 477)

2014-11-12 Thread Nick Coghlan

Nick Coghlan added the comment:

The Windows installer integration backport is in issue 22850.

Reviewing that made me release that the parallel version section in 
https://docs.python.org/3/installing/#work-with-multiple-versions-of-python-installed-in-parallel
 may need tweaking to account for the fact that the "py" launcher only comes 
with Python 3.

That said, it's unlikely anyone will be wanting to switch between 2.6 and 2.7 
on Windows at this point, so maybe we should just ignore it and wait and see if 
anyone complains.

--

___
Python tracker 

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



[issue22850] Backport ensurepip Windows installer changes to 2.7

2014-11-12 Thread Nick Coghlan

Nick Coghlan added the comment:

After digging a little further, I see Brian backported the PATH modification 
support from issue #3561 in https://hg.python.org/cpython/rev/a9d34685ec47

This should probably be noted in the What's New document - while it's not 
technically part of PEP 477, that's still a good home for it in the What's New 
doc.

The lack of the Python launcher in Python 2 likely isn't a problem - at this 
point in history, switching between Python 2 and 3 is the most likely scenario, 
and in that situation, the launcher would have been installed together with the 
Python 3 installation.

--

___
Python tracker 

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



[issue22854] Documentation/implementation out of sync for IO

2014-11-12 Thread Stanislaw Pitucha

New submission from Stanislaw Pitucha:

The docstring on for fileno() method says:

"An IOError is raised if the IO object does not use a file descriptor."

In reality, UnsupportedOperation is raised instead:

```
: io.StringIO().fileno()
UnsupportedOperation: fileno
```

--
components: IO
messages: 231079
nosy: viraptor
priority: normal
severity: normal
status: open
title: Documentation/implementation out of sync for IO
type: behavior
versions: Python 2.7, Python 3.2, 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



[issue22854] Documentation/implementation out of sync for IO

2014-11-12 Thread Stanislaw Pitucha

Stanislaw Pitucha added the comment:

Just in case: yes, UnsupportedOperation is an IOError - but shouldn't docstring 
here be more specific?

--

___
Python tracker 

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



[issue22849] Double DECREF in TextIOWrapper

2014-11-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ec1948191461 by Benjamin Peterson in branch '3.4':
fix possible double free in TextIOWrapper.__init__ (closes #22849)
https://hg.python.org/cpython/rev/ec1948191461

New changeset a664b150b6c2 by Benjamin Peterson in branch 'default':
merge 3.4 (#22849)
https://hg.python.org/cpython/rev/a664b150b6c2

--
nosy: +python-dev
resolution:  -> fixed
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



[issue22849] Double DECREF in TextIOWrapper

2014-11-12 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Thanks for the excellent bug report!

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue22855] csv writer with blank lineterminator breaks quoting

2014-11-12 Thread Eric Haszlakiewicz

New submission from Eric Haszlakiewicz:

I'm trying to emit a single line of csv without any line terminators, but 
specifying lineterminator=None results in a "lineterminator must be set" error, 
and setting lineterminator='' results in lack of quotes around certain fields.

with open("foo.csv", "wb") as csvfile:
csvw = csv.writer(csvfile, quoting=csv.QUOTE_MINIMAL, lineterminator='')
csvw.writerow(["col1","col2\ndata", "col3"])

I expected the contents of the file to be:
col1,"col2
data",col3

It should be possible to change the lineterminator without changing the quoting 
behavior.
At the very least, the documentation needs to explain better what logic is used 
to determine whether something gets quoted, and what affects that.

--
components: Library (Lib)
messages: 231083
nosy: Eric.Haszlakiewicz
priority: normal
severity: normal
status: open
title: csv writer with blank lineterminator breaks quoting
type: behavior
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



[issue22856] Function Summons

2014-11-12 Thread shayan

New submission from shayan:

Hi Everybody...
I'm SH4Y4N From Ashiyane Digital Security Team
I found the Bug "Function Summons" From Python 2.7...
When You Try To  Summons some Function It's Regular...
But What Happend When You're Calling two Function Simultaneous?
Your 2 Functions Run But the thing is that It contain some Error...
That's Strange To Run Some Code Within Some Traceback Error
I Could Take You SOme Tips To Prevent this Action...
=-=-=-=
def Ashiyane():
  print 'Ashiyane Digital Security Team'

def Shayan():
  print "Bug Hunter For Ever"

print Shayan()+Ashiyane()

Show :
Bug Hunter For Ever
Ashiyane Digital Security Team

Traceback (most recent call last):
  File "", line 1, in 
k()+h()
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'
=-=-=-=
You See The result
=-=-=-=
Special Tnx To : Angel--D3m0n , C4T , MR.CICILI

--
components: Build
files: bug.py
messages: 231084
nosy: SH4Y4N
priority: normal
severity: normal
status: open
title: Function Summons
versions: Python 2.7
Added file: http://bugs.python.org/file37186/bug.py

___
Python tracker 

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



[issue22855] csv writer with blank lineterminator breaks quoting

2014-11-12 Thread R. David Murray

R. David Murray added the comment:

If the line terminator is not \n, there is no reason to quote values with \n in 
them.  (Try your code with lineterminator set to 'd' to see what I mean.)

--
nosy: +r.david.murray
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



[issue22857] strftime should support %f to print milliseconds

2014-11-12 Thread Артём Скорецкий

New submission from Артём Скорецкий:

Now you cannot get milli (micro) seconds using strftime. It should be fixed.

AFAIK %f should be the right pattern for this

--
messages: 231085
nosy: tonn81
priority: normal
severity: normal
status: open
title: strftime should support %f to print milliseconds
type: enhancement

___
Python tracker 

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



[issue16991] Add OrderedDict written in C

2014-11-12 Thread Артём Скорецкий

Артём Скорецкий added the comment:

Any progress? It was planned for 3.5 release

--
nosy: +tonn81

___
Python tracker 

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



[issue22855] csv writer with blank lineterminator breaks quoting

2014-11-12 Thread R. David Murray

R. David Murray added the comment:

Also, it is hard to see how to make this clearer:

csv.QUOTE_MINIMAL
Instructs writer objects to only quote those fields which contain special 
characters such as delimiter, quotechar or any of the characters in 
lineterminator.

Hmm.  Perhaps it would be a bit clearer if it said "... which contain the 
special characters delimiter, quotechar, ..."

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python
resolution: not a bug -> 
stage: resolved -> 
status: closed -> open

___
Python tracker 

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



[issue22855] csv writer with blank lineterminator breaks quoting

2014-11-12 Thread R. David Murray

Changes by R. David Murray :


--
versions: +Python 3.4, Python 3.5

___
Python tracker 

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



[issue22856] Function Summons

2014-11-12 Thread R. David Murray

R. David Murray added the comment:

I have to tell you, I almost closed this as spam due to the spamish prose 
styling of the text.

Please read the python tutorial, or email the python-tutors list if you want to 
learn more about why your code produced the results it did.

--
nosy: +r.david.murray
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



[issue22843] doc error: 6.2.4. Match Objects

2014-11-12 Thread Ben Finney

Ben Finney added the comment:

The current wording of the passage “Match objects always have a boolean value 
of True” implies that the value compares equal to the ‘True’ constant. That 
implication is incorrect.

I disagree with R. David Murray; if we want to say that a value is considered 
true *in a boolean context*, that's very different from saying it has the 
“True” value.

Georg, “evaluates true in a boolean context” has the meaning you're seeking; it 
is chosen precisely because it does *not* imply equality to the True constant.

--
nosy: +bignose

___
Python tracker 

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



[issue22857] strftime should support %f to print milliseconds

2014-11-12 Thread R. David Murray

R. David Murray added the comment:

You are talking about time.strftime, I presume.  datetime supports %f.  
time.strftime does not, because it wraps the system strftime, and that does not 
support %f (at least not on my linux system).

--
nosy: +r.david.murray
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



[issue22848] Subparser help does not respect SUPPRESS argument

2014-11-12 Thread Brett Hannigan

Changes by Brett Hannigan :


--
keywords: +patch
Added file: http://bugs.python.org/file37187/argparse.patch

___
Python tracker 

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



[issue22853] Multiprocessing.Queue._feed deadlocks on import

2014-11-12 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +sbt

___
Python tracker 

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



[issue12499] textwrap.wrap: add control for fonts with different character widths

2014-11-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Both approaches can be combined. It could be a regular overridable method, and 
it could be overridded for an instance if corresponding argument is specified. 
See the default method and parameter of JSON encoder.

I slightly hesitate about the name. Is "width_func" the best of names?

--
nosy: +serhiy.storchaka
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue21090] File read silently stops after EIO I/O error

2014-11-12 Thread STINNER Victor

STINNER Victor added the comment:

On IRC, buck1 asked why the following code behaves differently on Python < 3.4 
and Python >= 3.4. It is related to this issue in fact.

Code:
---
from __future__ import print_function

from os import openpty
read, write = openpty()

from subprocess import Popen
proc = Popen(
('echo', 'ok'),
stdout=write,
close_fds=True,
)

from os import fdopen
fdopen(write, 'w').close()
with fdopen(read) as stdout:
print('STDOUT', stdout.read())

print('exit code:', proc.wait())
---

Simplified example:
---
import io, os
read, write = os.openpty()
os.write(write, b'ok\n')
os.close(write)
with io.FileIO(read, closefd=False) as fp:
print(fp.readall())
---

On Python < 3.4, it displays "ok", whereas Python 3.4 and later fail with 
OSError(5, 'Input/output error' on readall().

Another example:
---
import os
read, write = os.openpty()
os.write(write, b'ok\n')
os.close(write)
print("read: %r" % os.read(read, 4096))
print("read: %r" % os.read(read, 4096))
---

The first read syscall succeed, even if the write end is already called. But 
the second read syscall fails with EIO.

--

___
Python tracker 

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



[issue22850] Backport ensurepip Windows installer changes to 2.7

2014-11-12 Thread Steve Dower

Steve Dower added the comment:

Yes, I'll add Scripts into the PATH when that option is enabled too. I ignored 
that from the changeset I merged from, forgetting that that's where pip.exe 
will end up.

I'd rather not bundle the launcher with Python 2 right now (if ever). With the 
3.5 installer it's going to be a much smoother ride as far as upgrades go (or 
having a standalone installer, which is basically what it is), and the more 
versions that try to fight with that one the harder people will find things.

Hopefully I have time to finish this off tonight, otherwise it may not be done 
until next week, as I'm very busy the next few days.

(Thanks Brian for the feedback on the review.)

--

___
Python tracker 

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



[issue22852] urllib.parse wrongly strips empty #fragment

2014-11-12 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +vadmium

___
Python tracker 

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



[issue22854] Documentation/implementation out of sync for IO

2014-11-12 Thread Martin Panter

Martin Panter added the comment:

Similarly for the readable(), seekable() and writable() documentation

--
nosy: +vadmium

___
Python tracker 

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



[issue22848] Subparser help does not respect SUPPRESS argument

2014-11-12 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +paul.j3

___
Python tracker 

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



[issue22827] Backport ensurepip to 2.7 (PEP 477)

2014-11-12 Thread Nick Coghlan

Nick Coghlan added the comment:

Ned pointed out the wording regarding the Makefile changes in PEP 477 was 
ambiguous.

My intent was for the changes to be backported, just with ENSUREPIP defaulting 
to "no" rather than "upgrade".

So that part of the backport is still on the todo list (Ned's offered to handle 
that in addition to the Mac OS X installer changes)

--

___
Python tracker 

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



[issue22850] Backport ensurepip Windows installer changes to 2.7

2014-11-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c248a6bdc1d7 by Steve Dower in branch '2.7':
Issue #22850: Backport ensurepip Windows installer changes to 2.7
https://hg.python.org/cpython/rev/c248a6bdc1d7

--
nosy: +python-dev

___
Python tracker 

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



[issue22848] Subparser help does not respect SUPPRESS argument

2014-11-12 Thread paul j3

paul j3 added the comment:

A notational point - you are adding a subparser, not an argument, to the 
subparsers action.  

Why would a user want to use `help=argparse.SUPPRESS`, as  opposed to simply 
omitting the `help` parameter?  The effect would be the same as your patch.

Another possibility is to interpret this SUPPRESS as meaning, omit the 
subparser (and it's aliases?) from the choices list(s) as well.  In other 
words, make this an entirely stealth choice.

usage: test [-h] {foo} ...
positional arguments:
  {foo}
foo   This is help for foo
...

'test bar -h' would still display a help for that subparser (unless given a 
`add_help=False` parameter).

I don't know how much work this stronger SUPPRESS would required, or whether 
such an interpretation would be intuitive to most users.  There isn't a 
mechanism to omit a regular argument from the usage, so why should there be a 
mechanism for omitting a subparsers choice from usage?

With the weaker interpretation, this patch fills in a hole in the logic, but 
doesn't add any functionality (that I can think of).

--

___
Python tracker 

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