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:
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.
--
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
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 rep...@bugs.python.org
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
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 ]
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22851
___
___
Python-bugs-list
Changes by Georg Brandl ge...@python.org:
--
nosy: +orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22852
___
___
Python-bugs-list mailing
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
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
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
Martin v. Löwis added the comment:
I'm not working on Python 2.7 anymore, so I can't offer help.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22850
___
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
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:
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
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
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
Stanislaw Pitucha added the comment:
Just in case: yes, UnsupportedOperation is an IOError - but shouldn't docstring
here be more specific?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22854
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
Benjamin Peterson added the comment:
Thanks for the excellent bug report!
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22849
___
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,
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
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
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
Артём Скорецкий added the comment:
Any progress? It was planned for 3.5 release
--
nosy: +tonn81
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16991
___
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
Changes by R. David Murray rdmur...@bitdance.com:
--
versions: +Python 3.4, Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22855
___
___
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:
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
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
Changes by Brett Hannigan bhanni...@dnanexus.com:
--
keywords: +patch
Added file: http://bugs.python.org/file37187/argparse.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22848
___
Changes by Ned Deily n...@acm.org:
--
nosy: +sbt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22853
___
___
Python-bugs-list mailing list
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
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
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
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22852
___
___
Python-bugs-list
Martin Panter added the comment:
Similarly for the readable(), seekable() and writable() documentation
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22854
___
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +paul.j3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22848
___
___
Python-bugs-list
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
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
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
41 matches
Mail list logo