paul j3 added the comment:
This patch removes only one '--', the one that put a '-' in the
'arg_strings_pattern'. It does this in 'consume_positionals' right before
calling 'take_action'. As before it does not do this if nargs is PARSER or
REMAINDER.
test_argparse.py has two
Alexandre Vassalotti added the comment:
Alright alright! Here's a less bogus patch. :)
--
stage: needs patch - patch review
Added file: http://bugs.python.org/file29846/fix_loads_appends.patch
___
Python tracker rep...@bugs.python.org
New submission from Kyle Simpson:
The second sentence in http://docs.python.org/3/extending/index.html says:
Those modules can define new functions but also new
object types and their methods.
The word but doesn't make sense here. I suppose that the
author meant to write:
Those modules
Nick Coghlan added the comment:
Thanks for working through that Phillip - falling back to sys.modules when the
expected attribute was missing is actually something I suggested as a
possibility years ago, and Guido's response at the time was If it was that
easy, someone would have done it
Kyle Simpson added the comment:
I have provided a patch.
--
keywords: +patch
Added file: http://bugs.python.org/file29847/issue17725.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17725
Nick Coghlan added the comment:
The implementation of issue #17636 (making IMPORT_FROM fall back to sys.modules
when appropriate) will make import x.y and from x import y equivalent for
resolution purposes during import.
That covers off the subset of circular references that we want to allow,
Nick Coghlan added the comment:
The interpreter level problem covered by the current issue is that the
difference between import mypkg.module_a and from mypkg import module_a is
masking the fact that it is the original import mypkg that failed, and may
still fail on the second and subsequent
Changes by Mike Hoy mho...@gmail.com:
--
nosy: +mikehoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17668
___
___
Python-bugs-list mailing list
New submission from Tshepang Lekhonkhobe:
I puzzled a bit on what that sentence meant.
--
assignee: docs@python
components: Documentation
files: diff
messages: 186891
nosy: docs@python, tshepang
priority: normal
severity: normal
status: open
title: faq/design: improve clarity
versions:
Nick Coghlan added the comment:
More generally, I think we may have to revisit the question of what we remove
from sys.modules on failure if, as a side effect of the import, a child module
was imported successfully.
In this situation, the possibilities are:
1. Remove the parent module, and
Roundup Robot added the comment:
New changeset ab35b5e81317 by Georg Brandl in branch '2.7':
Closes #17726: small clarification in design FAQ.
http://hg.python.org/cpython/rev/ab35b5e81317
New changeset f6fdf3457f74 by Georg Brandl in branch '3.3':
Closes #17726: small clarification in design
Serhiy Storchaka added the comment:
I think a string with character codes 256 will be better for
test_protocol0_is_ascii_only(). It can be latin1 encoded (Python 2 allows any
8-bit strings).
PyUnicode_AsASCIIString() can be slower than _PyUnicode_AsStringAndSize()
(actually
Georg Brandl added the comment:
Fixed, thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17661
___
___
Python-bugs-list mailing list
Roundup Robot added the comment:
New changeset dd5e7aef4d5b by Georg Brandl in branch '2.7':
Closes #17661: fix references to repr() going to module repr.
http://hg.python.org/cpython/rev/dd5e7aef4d5b
--
nosy: +python-dev
resolution: - fixed
stage: needs patch - committed/rejected
New submission from Georg Brandl:
From the docs@ list:
Dear all,
the first paragraph of the documentation for the site module states that
site.py constructs four directories using a head and tail part, and that
one of the tail parts would be lib/pythonX.Y/site-packages on UNIX/Mac.
However,
Serhiy Storchaka added the comment:
I want to see both algorithms to be similar so far as it is possible. It might
be worth extract and reuse a common code. Mercurial's code looks far more
optimal (for example a85encode has a quadratic complexity in result
accumulating).
--
Roundup Robot added the comment:
New changeset 4cc94d30926f by Georg Brandl in branch '2.7':
Closes #13638: document PyErr_SetFromErrnoWithFilenameObject,
http://hg.python.org/cpython/rev/4cc94d30926f
New changeset ee848457930f by Georg Brandl in branch '3.3':
Closes #13638: document
Roundup Robot added the comment:
New changeset 2fa27a3818a2 by Georg Brandl in branch '3.3':
Closes #14462: allow any valid Python identifier in sre group names, as
documented.
http://hg.python.org/cpython/rev/2fa27a3818a2
--
nosy: +python-dev
resolution: - fixed
stage: patch review -
Roundup Robot added the comment:
New changeset 4678259af5a4 by Georg Brandl in branch '2.7':
The Integral class does not contain implementations for the bit-shifting
operations. (See #3056.)
http://hg.python.org/cpython/rev/4678259af5a4
New changeset 1d4ba14cc505 by Georg Brandl in branch
New submission from Georg Brandl:
The docs for % formatting say what the default precision for presentation types
e, f, g is. I couldn't find the same for format().
--
assignee: eric.smith
components: Documentation
messages: 186902
nosy: eric.smith, georg.brandl
priority: normal
New submission from Georg Brandl:
From docs@:
The howto-advocacy is interesting.
You might consider removing the following sentences, which I found personally
gave me a negative impression:
python hasn't had all the publicity to my mind gives the impression that
python is not popular.
Matthias Klose added the comment:
the local patch adds as documentation on Debian/Ubuntu:
For Debian and derivatives, this sys.path is augmented with directories
for packages distributed within the distribution. Local addons go
into /usr/local/lib/pythonversion/dist-packages, Debian addons
Georg Brandl added the comment:
Thanks, closing.
--
nosy: +georg.brandl
resolution: - out of date
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13050
___
Roundup Robot added the comment:
New changeset 3dff836cedef by Serhiy Storchaka in branch 'default':
Closes #16551. Cleanup pickle.py.
http://hg.python.org/cpython/rev/3dff836cedef
--
nosy: +python-dev
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
Roundup Robot added the comment:
New changeset 4ced30417300 by Alexandre Vassalotti in branch '3.3':
Issue #16550: Update the opcode descriptions of pickletools to use unsigned
http://hg.python.org/cpython/rev/4ced30417300
--
nosy: +python-dev
___
Roundup Robot added the comment:
New changeset adc72ff451dc by R David Murray in branch 'default':
#2118: IOError is deprecated, use OSError.
http://hg.python.org/cpython/rev/adc72ff451dc
--
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
Thank you, Mark. There is only one question. For what version is it
appropriate? Only for 3.4 or for all maintained?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15301
R. David Murray added the comment:
Thanks Ingrid and Mark. The patch looks good; I put a couple of FYI comments
on the review.
I'm pretty sure this patch is correct, but I'd like someone with more
experience modifying the ceval loop to confirm, so I'm nosying Benjamin.
--
nosy:
Roundup Robot added the comment:
New changeset 1494daf809c1 by Vinay Sajip in branch 'default':
Closes #17713: Fixed bug in test_compute_rollover_weekly_attime.
http://hg.python.org/cpython/rev/1494daf809c1
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
Roundup Robot added the comment:
New changeset efda51b85b31 by Vinay Sajip in branch 'default':
Issue #17713: additional tweak to test.
http://hg.python.org/cpython/rev/efda51b85b31
--
___
Python tracker rep...@bugs.python.org
Larry Hastings added the comment:
Oh...! Serhiy, I thought you already checked in the AsIndex stuff. Guess I
was asleep at the switch.
Certainly the patch should go in for trunk. I'd be comfortable with it going
in for 3.3 as a bugfix but that's ultimately Georg's call.
I'll give you a
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +benjamin.peterson
priority: normal - release blocker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17703
___
New submission from Drekin:
Currently, there is no way to run code.interact without a banner – empty string
still means to print an empty line. If I want that behaviour, I must subclass
code.InteractiveConsole and reimplement whole .interact method including the
repl logic just not to print a
Marc-Andre Lemburg added the comment:
On 12.04.2013 20:00, Antoine Pitrou wrote:
Marc-André, does this patch work for you?
Added file: http://bugs.python.org/file29791/tstate_trashcan.patch
Thanks, Antoine. I can try this tomorrow.
--
___
Antoine Pitrou added the comment:
Thank you!
One optional thing, the code churn could be minimized in test_operator.py by
writing operator = self.module at the beginning of each test method.
Otherwise, looks good to me.
--
___
Python tracker
Roundup Robot added the comment:
New changeset c40b50d65a00 by Nick Coghlan in branch '3.3':
Close issue #16163: handle submodules in pkgutil.iter_importers
http://hg.python.org/cpython/rev/c40b50d65a00
New changeset 3bb5a8a4830e by Nick Coghlan in branch 'default':
Merge fix for #16163 from
Changes by Nick Coghlan ncogh...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16163
___
Mike Milkin added the comment:
I did not mean to take the decode out of the previos patch. Sorry for the spam.
--
Added file: http://bugs.python.org/file29850/Issue9682-full.patch
___
Python tracker rep...@bugs.python.org
Changes by Mike Milkin mmil...@gmail.com:
Removed file: http://bugs.python.org/file29834/Issue9682-full.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9682
___
Benjamin Peterson added the comment:
Yes, let's not break thing in point releases.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17703
___
___
Daniel Urban added the comment:
I've attached a new patch. With this patch, type.__prepare__ has an optional
keyword-only argument 'namespace', and returns it if it's specified. Also,
__init_class__ is passed an argument: a mapping proxy of the mapping originally
returned by __prepare__.
STINNER Victor added the comment:
Should we really invest time to fix bugs related to astral (non-BMP) characters
with rare codecs and error handlers (CJK codecs, xmlcharrefreplace error
handler)? Python 3.3 is released and has a much better support of astral
characters (in many places). I
Phillip J. Eby added the comment:
On Sun, Apr 14, 2013 at 3:51 AM, Nick Coghlan rep...@bugs.python.org wrote:
Your analysis is one of the pieces that was missing,
Unfortunately, I just noticed it's actually incorrect in a pretty
important part In my original example, I said, because of the
Roundup Robot added the comment:
New changeset 72df981e83d3 by Victor Stinner in branch '3.3':
Close #17702: os.environ now raises KeyError with the original environment
http://hg.python.org/cpython/rev/72df981e83d3
New changeset ea54559a4442 by Victor Stinner in branch 'default':
(Merge 3.3)
Martin Morrison added the comment:
I've updated the Ascii85 algorithms to remove the quadratic complexity, and use
a single struct.pack/unpack. They should now be much quicker for large input
strings.
It's difficult to factor out commonality with b85* because the encodings and
rules differ.
Roundup Robot added the comment:
New changeset dbb943399c9b by Serhiy Storchaka in branch '2.7':
Issue #17221: Resort Misc/NEWS.
http://hg.python.org/cpython/rev/dbb943399c9b
New changeset 7da08495b497 by Serhiy Storchaka in branch '3.3':
Issue #17221: Resort Misc/NEWS.
Serhiy Storchaka added the comment:
I commit patches since no one objected.
Not all errors are corrected. There are duplicates (`cat Misc/NEWS | sort |
uniq -cd | sort -n`). I'm not sure that the line What's New in Python 3.3.1
release candidate 1? in Misc/NEWS for 3.4 correct. The difference
Yael added the comment:
Added a class Threading.TimerPool. This new class spawns one thread, and that
thread is running as long as there are active timers.
--
keywords: +patch
Added file: http://bugs.python.org/file29853/mywork.patch
___
Python
Roundup Robot added the comment:
New changeset 04aaeae6ee7b by Brett Cannon in branch 'default':
Issue #17244: Don't mask exceptions raised during the creation of
http://hg.python.org/cpython/rev/04aaeae6ee7b
--
nosy: +python-dev
___
Python tracker
Changes by Brett Cannon br...@python.org:
--
resolution: - fixed
stage: test needed - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17244
___
Roundup Robot added the comment:
New changeset 65db865c0851 by R David Murray in branch '3.3':
#17341: Include name in re error message about invalid group name.
http://hg.python.org/cpython/rev/65db865c0851
New changeset 227fed7a05d4 by R David Murray in branch 'default':
Merge #17341: Include
Mike Milkin added the comment:
Looks like plistlib.writePlistToString is no loger in the plistlib.
--
nosy: +mmilkin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17353
___
R. David Murray added the comment:
Thanks Jason.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
versions: +Python 3.3, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17341
Roundup Robot added the comment:
New changeset ffd4b72f7f95 by Victor Stinner in branch 'default':
Issue #17693: Fix memory/reference leaks
http://hg.python.org/cpython/rev/ffd4b72f7f95
--
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
Hi and thanks for the patch!
I named the Mercurial base85 implementation functions with the b85
prefix. For the Ascii85 ones, I used a85. I considered overloading
the same functions with a keyword argument to select which encoding,
but rejected that.
Ezio Melotti added the comment:
I tend to agree with Victor: if you want to fix 2.7 go ahead, but if that's too
much work it's OK with me to close this issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15866
R. David Murray added the comment:
After a discussion (at the Boston Python sprint, unfortunately I forget with
who) of how difficult this could be to explain succinctly without confusing
either java/C++ programmers on the one hand or Python programmers on the other
hand, this, the wording in
Ezio Melotti added the comment:
I would actually remove the whole section about readlines() or possibly just
mention it briefly (something like If you want to read all the lines of a file
in a list you can also use f.readlines().)
The sizehint arg is rarely used, so I don't see the point of
Antoine Pitrou added the comment:
I would actually remove the whole section about readlines() or
possibly just mention it briefly (something like If you want to read
all the lines of a file in a list you can also use f.readlines().)
The sizehint arg is rarely used, so I don't see the point
New submission from R. David Murray:
A buildbot produced the following traceback, but the test passed when re-run.
http://buildbot.python.org/all/builders/x86%20Gentoo%203.3/builds/630/steps/test/logs/stdio
test_loader_deprecated (test.test_pkgutil.ImportlibMigrationTests) ... ok
Ezio Melotti added the comment:
This is related to #16163.
Other buildbots failed too, e.g.:
http://buildbot.python.org/all/builders/x86%20RHEL%206%203.3/builds/501
http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%203.x/builds/4128
Terry J. Reedy added the comment:
I agree with removing .readlines section. If .readlines did not exist, I do not
think we would add it now.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13510
Ezio Melotti added the comment:
On 3.x it's called writePlistToBytes, and it seems to have the same issue.
--
versions: -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17353
___
New submission from Nick Sloan:
When distutils.cfg defines an install-lib, it will be used within virtual
environments created using venv as well, which makes it impossible to install
things with setup.py or similar.
Steps to reproduce:
Create a distutils.cfg file and set a value for
Éric Araujo added the comment:
There is a --no-user-cfg option to disable reading ~/.pydistutils.cfg, but I
don’t recall an option to ignore the global config. How does virtualenv avoid
this problem, if it does?
--
assignee: eric.araujo - vinay.sajip
components: +Library (Lib)
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10438
___
___
Python-bugs-list
Mike Milkin added the comment:
Yep you are correct.
plistlib.readPlistFromBytes(plistlib.writePlistToBytes({'test':
plistlib.Data(b'aa')}))
{'test': Data(b'aa')}
plistlib.readPlistFromBytes(plistlib.writePlistToBytes([{'test':
Nick Sloan added the comment:
It looks like virtualenv includes an empty distutils.cfg at
myvirtualenv/lib/python3.3/distutils/distutils.cfg. Most of
myvirtualenv/lib/python3.3 is just symlinked to the base python version, but
myvirtualenv/lib/python3.3/distutils/ is not, and I bet this is
Richard Oudkerk added the comment:
Note that in Python 3 you can also do __class__.f() in a staticmethod. Not
sure if that is encouraged though.
--
nosy: +sbt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10438
Pascal Chambon added the comment:
Thanks for the feedback, I'm gonna read those docs and related issues asap, and
check that planned evolutions will actually fix this.
just as a side note in the meantime: I dont think that the problem here is the
purge of sys.modules, the failure is actually
David Lam added the comment:
Hi Eli, I sure would!
(Though, if anyone finds this issue and can figure out a solution, I'd
encourage them to post it!)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16954
dspub...@freemail.hu added the comment:
Thank you Stephen.Tu for information. I think so, the return has been found
;-)
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17575
R. David Murray added the comment:
Thanks, Kristian. The 3.x docs were a fresh start, so if we want to mark
something as deprecated it would be a Python3 version number, the number
current at the time of the deprecation.
There is another open issue, 17177, that speaks specifically about
Giampaolo Rodola' added the comment:
Patch including a unittest is in attachment.
--
keywords: +patch
Added file: http://bugs.python.org/file29855/issue17707.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17707
Changes by Giampaolo Rodola' g.rod...@gmail.com:
Removed file: http://bugs.python.org/file29855/issue17707.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17707
___
Changes by Giampaolo Rodola' g.rod...@gmail.com:
Added file: http://bugs.python.org/file29856/issue17707.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17707
___
Antoine Pitrou added the comment:
Your test is much too strict (and I don't understand why you're using a
Decimal). I think testing that the delta is greater or equal than 0.2 would be
enough.
--
nosy: +pitrou
___
Python tracker
Changes by Ankur Ankan ankuran...@gmail.com:
--
components: Tests
nosy: Ankur.Ankan, r.david.murray
priority: normal
severity: normal
status: open
title: Unit tests for RFC 2231 parsing code
type: enhancement
___
Python tracker rep...@bugs.python.org
Giampaolo Rodola' added the comment:
Yeah, right. Too strict indeed. I'll get rid of the assertLessEqual statement.
Here's why Decimal is necessary:
import time
time.time() - time.time()
-9.5367431640625e-07
from decimal import Decimal
Decimal(time.time()) - Decimal(time.time())
Antoine Pitrou added the comment:
I don't understand what you're worrying about here. This is just because of
evaluation order:
import itertools
it = itertools.count()
f = it.__next__
f() - f()
-1
f() - f()
-1
--
___
Python tracker
Giampaolo Rodola' added the comment:
Without using Decimal and without patching connections.py (hence q.get()
returns immediately) the resulting delta is mismatched:
==
FAIL: test_timeout (__main__.WithProcessesTestQueue)
Antoine Pitrou added the comment:
Without using Decimal and without patching connections.py (hence
q.get() returns immediately) the resulting delta is mismatched:
Well, why are you surprised the test fails without the patch?
--
___
Python tracker
Eli Bendersky added the comment:
You can ask on the python-dev mailing list. It's possible that other Python
developers ran into a similar issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16954
Giampaolo Rodola' added the comment:
You're right, sorry. I got confused by the exponential notation in
9.107589721679688e-05. Updated patch is in attachment.
--
Added file: http://bugs.python.org/file29857/issue17707.patch
___
Python tracker
Piotr Dobrogost added the comment:
I've just stumbled upon this issue after asking Where is pyvenv script in
Python 3 on Windows installed? question at
http://stackoverflow.com/q/1598/95735
Perhaps Windows installs should include (alongside Python.exe) a pyvenv.exe
that invokes venv for
Piotr Dobrogost added the comment:
Issue titled Python Launcher and virtualenv? at
https://bitbucket.org/vinay.sajip/pylauncher/issue/15/ is related.
--
nosy: +piotr.dobrogost
___
Python tracker rep...@bugs.python.org
Piotr Dobrogost added the comment:
Following discussions on python-dev, the default is always to symlink,
except on Windows (no support for true symlinks on XP and older) and
In this case couldn't symlinks be automatically used on Windows Vista or newer?
--
nosy: +piotr.dobrogost
Mark Lawrence added the comment:
The behaviour has changed from that given in msg116355. Using Python 3.3.1 on
Windows.
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('foo', nargs='1')
Traceback (most recent call last):
File c:\python33\lib\argparse.py, line 1322,
Changes by R. David Murray rdmur...@bitdance.com:
--
title: Unit tests for RFC 2231 parsing code - Add tests to
test__header_value_parser for RFC 2231 parsing code
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17733
Éric Araujo added the comment:
I should be able to do that but can’t say when.
--
versions: -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14012
___
Meador Inge added the comment:
Here is a version which implements the subprocess method for testing
suggested by Éric.
--
Added file: http://bugs.python.org/file29858/issue16826-1.patch
___
Python tracker rep...@bugs.python.org
Dan Riti added the comment:
Added a new version of the patch to incorporate Ezio's comment!
--
Added file: http://bugs.python.org/file29859/demote-readlines-v2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13510
Ezio Melotti added the comment:
Patch LGTM. I think it would also be better to say something like Note that
it's already possible to iterate on file objects using ``for line in file:
...`` without calling file.readlines(). in Doc/library/io.rst:readlines, as
suggested in msg148703.
Ezio Melotti added the comment:
If possible it would be better to still generate a valid output, possibly by
limiting the indentation or removing it after a certain point.
However I don't know if there are any restrictions that should be followed
while generating a plist (What happens if the
Charles-François Natali added the comment:
I think we should test multiple timeout values (e.g. 0.1, 0.5, 1 and
1.5): it'll take a little longer, but since the test suite didn't
detect it, that's really lacking. Also, rathr than using an harcoded
delta, we could maybe use a fudger factor, like
95 matches
Mail list logo