New submission from Chris Jerdonek chris.jerdo...@gmail.com:
The Economy of Expression section of the Dev Guide's Documenting Python--
http://docs.python.org/devguide/documenting.html#economy-of-expression
says, The documentation for super() is an example of where a good deal of
information
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15246
___
___
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: docs@python - rhettinger
priority: normal - low
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15265
___
Ionuț Arțăriși io...@artarisi.eu added the comment:
I'm working on this right now as part of EuroPython's CPython sprint.
--
nosy: +mapleoin
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15125
Changes by Dougal Matthews douga...@gmail.com:
--
nosy: +d0ugal
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12907
___
___
Python-bugs-list
Catalin Iacob iacobcata...@gmail.com added the comment:
So, how to move this further?
In #13425 Petri proposes 4 alternatives, copying them here:
1) Document the function to make it officially part of the public API
2) Rename and move the function to http.server
3) Leave it undocumented and
Changes by Łukasz Langa luk...@langa.pl:
--
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11027
___
___
Changes by Łukasz Langa luk...@langa.pl:
--
versions: +Python 3.4 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1410680
___
___
Changes by Catalin Iacob iacobcata...@gmail.com:
--
nosy: +larry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12178
___
___
Python-bugs-list
New submission from Ionuț Arțăriși io...@artarisi.eu:
To reproduce:
import argparse
[74536 refs]
parser = argparse.ArgumentParser()
[74809 refs]
parser.add_argument(foo)
parser.add_argument(foo)
parser.parse_args([bar])
usage: ipython [-h] foo foo
ipython: error: too few arguments
An
Florent Xicluna florent.xicl...@gmail.com added the comment:
I don't see a valid use case to support - in the name of the positional
argument.
IMHO, it should raise an error (probably a ValueError) for the add_argument in
this case ...
Or we keep it as-is and close as wont-fix: if the op
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 16ff4889a858 by Nick Coghlan in branch 'default':
Issue 14814: Provide more informative error messages in ipaddress, and ensure
that errors are caught as expected
http://hg.python.org/cpython/rev/16ff4889a858
Nick Coghlan ncogh...@gmail.com added the comment:
There's actually one semantic change in that last patch: IPv4Address (et al)
will now accept leading zeroes in those cases where they're *not* ambiguous
(i.e. values less than 8, which have identical representations in both decimal
and octal
Nick Coghlan ncogh...@gmail.com added the comment:
Also, I noted the provisional API status in the NEWS message, but I wonder if
it would make more sense to leave that kind of note for the commit messages.
--
___
Python tracker
Changes by Larry Hastings la...@hastings.org:
--
nosy: +larry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14241
___
___
Python-bugs-list mailing
Brian Brazil brian.bra...@gmail.com added the comment:
The attached patch fixes this
--
keywords: +patch
nosy: +bbrazil
Added file: http://bugs.python.org/file26283/issue11908-islice-docs.patch
___
Python tracker rep...@bugs.python.org
Florent Xicluna florent.xicl...@gmail.com added the comment:
Confirmed.
It should probably raise an ArgumentError like this one.
http://docs.python.org/library/argparse.html#conflict-handler
--
components: +Library (Lib)
nosy: +flox
stage: - needs patch
versions: +Python 3.3
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14241
___
___
Python-bugs-list mailing
Antoine Pitrou pit...@free.fr added the comment:
The super() doc is also a good example of unreadable jargon (dynamic execution
environment ??). Nowhere is it obvious to a beginner what super() is
*practically* used for.
--
assignee: - docs@python
components: +Documentation
nosy:
Mark Dickinson dicki...@gmail.com added the comment:
If we're worrying about undefined behaviour, it looks like recent optimizations
have *introduced* new undefined behaviour in the form of strict aliasing
violations. E.g., from ascii_decode:
unsigned long value = *(const unsigned long
Antoine Pitrou pit...@free.fr added the comment:
This should really be fixed; compilers are known to make optimizations
based on the assumption that this sort of undefined behaviour doesn't
occur.
Doesn't the compiler have all the necessary information here? It's not like a
subroutine is
Mark Dickinson dicki...@gmail.com added the comment:
(also, I'm not sure what optimization it could actually make)
Me neither, but it doesn't seem safe to assume that no compiler will take
advantage of this. I don't want to start guessing what compilers might or
might not do; it would be
Greg Roodt gro...@gmail.com added the comment:
Is this still an issue? If so, I've created a simpler first example as
suggested below.
If we decide these docs still need a bit more work, I can also continue to
provide better examples than the foo bar ones.
--
keywords: +patch
nosy:
Changes by Dougal Matthews douga...@gmail.com:
--
nosy: +d0ugal
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13498
___
___
Python-bugs-list
Eugenio Minardi eugenio.mina...@gmail.com added the comment:
Added the related line to the documentation describing when the exception is
raised.
--
keywords: +patch
nosy: +kmox83
Added file: http://bugs.python.org/file26285/issue15265-fix-docs.patch
Mark Dickinson dicki...@gmail.com added the comment:
N.B. This could probably be fixed without affecting performance by using the
usual union trick. (IIUC, that trick was technically still undefined behaviour
for a while, but was eventually made legal by C99 + TC3.) As far as I know
there
Antoine Pitrou pit...@free.fr added the comment:
N.B. This could probably be fixed without affecting performance by
using the usual union trick.
How would it work? We would have to add various unions to the
PyUnicode_Object definition?
--
___
New submission from Nick Coghlan ncogh...@gmail.com:
The pkgutil import emulation is insane and permits modules identifiers to
contain paths.
Identified in #15230 (reporting some very surprising behaviour from
runpy.run_module).
--
messages: 164806
nosy: brett.cannon, ncoghlan
Brian Brazil brian.bra...@gmail.com added the comment:
Issue confirmed, patch looks good.
--
nosy: +bbrazil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15130
___
Ionuț Arțăriși io...@artarisi.eu added the comment:
I agree with Florent that this is maybe just a documentation issue, since the
argument is accessible via getattr().
--
keywords: +patch
Added file: http://bugs.python.org/file26286/argparse-argument-names.diff
Mark Dickinson dicki...@gmail.com added the comment:
How would it work? We would have to add various unions to the
PyUnicode_Object definition?
No, you'd just need a temporary union defined in unicodeobject.c that would
look something like:
typedef union { unsigned long v; char
Mark Dickinson dicki...@gmail.com added the comment:
I'll see if I can come up with a patch, and open a new issue for it (since I've
successfully derailed this issue from its original topic)
--
___
Python tracker rep...@bugs.python.org
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 5020afc0b7c9 by Florent Xicluna in branch '3.2':
Issue #14990: tokenize: correctly fail with SyntaxError on invalid encoding
declaration.
http://hg.python.org/cpython/rev/5020afc0b7c9
--
nosy: +python-dev
Florent Xicluna florent.xicl...@gmail.com added the comment:
Thanks. Fixed in trunk too, changeset b4322ad1fec4
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Brian Brazil brian.bra...@gmail.com added the comment:
Issue confirmed, patch looks good.
--
nosy: +bbrazil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15094
___
Nick Coghlan ncogh...@gmail.com added the comment:
I would add a simple note to the exceptions section:
Note, when shell=True, OSError will be raised by the child only if the
selected shell itself cannot be found. To determine if the shell failed to find
the requested application, it is
Petri Lehtinen pe...@digip.org added the comment:
My 4) actually meant that it should always return []. This is what it currently
does, so it could be spelled out clearly in the code.
IIRC, getallmatchingheaders() cannot be emulated one-to-one using get_all(),
because it handles continuation
Floris Bruynooghe floris.bruynoo...@gmail.com added the comment:
Attached in a patch for this, I've also changed the version to 3.4 since this
is a feature and therefore probably too late to go in 3.3. Please let me know
if anything is inadequate.
--
keywords: +patch
versions:
Nick Coghlan ncogh...@gmail.com added the comment:
Firstly, I think you've identified a real bug with __package__ not being set
correctly when using runpy.run_path (and I have updated this issue title
accordingly).
I have also created a separate bug report (#15272) for the bizarre behaviour
Serhiy Storchaka storch...@gmail.com added the comment:
If we're worrying about undefined behaviour, it looks like recent
optimizations have *introduced* new undefined behaviour in the form of strict
aliasing violations. E.g., from ascii_decode:
unsigned long value = *(const
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +flox
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8881
___
Greg Roodt gro...@gmail.com added the comment:
Confirmed that the setup statement is correctly excluded from the overall timed
run.
I've updated the docstring and rst to make this clearer.
--
keywords: +patch
nosy: +groodt
Added file:
Catalin Iacob iacobcata...@gmail.com added the comment:
Attached a patch that adds a note for getattr and setattr. hasattr is
documented in terms of getattr so I would say it's not needed there.
I don't know if the interaction with private attributes is confusing enough
that it's worth
Mark Dickinson dicki...@gmail.com added the comment:
I don't see what the undefined behavior. Can you specify exactly the
item of the Standard, in which it is mentioned?
It's C99 section 6.5, paragraph 7: An object shall have its stored value
accessed only by an lvalue expression that has
Changes by Nick Coghlan ncogh...@gmail.com:
--
assignee: - ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15230
___
___
Python-bugs-list
Nick Coghlan ncogh...@gmail.com added the comment:
You may also have identified a bug with pkgutil's import emulation failing to
clean up sys.modules correctly when an import fails.
--
___
Python tracker rep...@bugs.python.org
Nick Coghlan ncogh...@gmail.com added the comment:
Sorry, that's not accurate - you have enough code in b.py to make the relative
import work by convincing the interpreter it's actually being done in a package.
So what you're seeing in that regard is the fact that runpy is not any kind of
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset af4ae710daf3 by Nick Coghlan in branch 'default':
Issue 14814: Make the ipaddress code easier to follow by using newer language
features (patch by Serhiy Storchaka)
http://hg.python.org/cpython/rev/af4ae710daf3
Floris Bruynooghe floris.bruynoo...@gmail.com added the comment:
Hi, I think this is a usage error and if not you should try to provide a test
case with both files for this.
Pickle needs to be able to import the module which contains the classes by the
same name as the original module. That
Petri Lehtinen pe...@digip.org added the comment:
The CGIHTTPRequestHandler fix and test would be the best thing to start with,
though, as it's not related to the eventual fate of getallmatchingheaders().
--
stage: - needs patch
___
Python tracker
Nick Coghlan ncogh...@gmail.com added the comment:
Many of Serhiy's tweaks were also micro-optimisations, but I committed them
mainly because I found them easier to read.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14814
Brian Brazil brian.bra...@gmail.com added the comment:
I've tested this on head, and the issue appears to be buggy ftp code in python.
From the attached tcpdump for fetching delegated-ripencc-20120706:
12:57:19.933607 IP myhost.39627 ftp.ripe.net.ftp: Flags [.], ack 511, win
115, options
Petri Lehtinen pe...@digip.org added the comment:
MDAs blindly write their message to the end of the user's mail spool file. So,
if there's no newline at the end, the mailbox gets corrupted (the new message
is joined with the previous one).
I tested with Postfix, but this probably happens for
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset d03dbc324b60 by Nick Coghlan in branch 'default':
Issue 14814: Explain how to get more error detail in the ipaddress tutorial,
and tweak the display for octet errors in IPv4 (noticed the formatting problem
when
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15002
___
___
Python-bugs-list
New submission from Larry Hastings la...@hastings.org:
Tools/parser/test_unparse.py is the regression test suite for Tools/unparse.
To save time, if the cpu resource is not enabled it only test unparsing ten
files. However it picks these files at random.
It would be nice if the test was
Changes by Mark Dickinson dicki...@gmail.com:
--
assignee: mark.dickinson -
keywords: +easy
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15273
___
Mark Dickinson dicki...@gmail.com added the comment:
Ideally, it would pick a small number of files that are likely to fully
exercise Python's grammar. So things like Lib/test/test_grammar might be
useful to include.
Or perhaps there should be a Python file somewhere in Lib/test whose entire
Brian Brazil brian.bra...@gmail.com added the comment:
More particularly, the ftpwrapper's ftp member is being GCed sometime after
FtpHandler.ftp_open returns.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15002
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 86d3b4067f74 by Nick Coghlan in branch 'default':
Issue 14814: Further clean ups to the ipaddress tutorial
http://hg.python.org/cpython/rev/86d3b4067f74
--
___
Python
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset d69f95e57792 by Jesus Cea in branch 'default':
Cope with OSs lying - #10142: Support for SEEK_HOLE/SEEK_DATA
http://hg.python.org/cpython/rev/d69f95e57792
--
___
Python
Catalin Iacob iacobcata...@gmail.com added the comment:
The same happens on OpenSUSE 12.1 so Python can't be fully built there which is
a bit of a shame.
OpenSUSE uses this patch for their packages, but that would break other
distributions so it's not a good solution:
-#include panel.h
Jesús Cea Avión j...@jcea.es added the comment:
Thanks for the head-up, Antoine.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10142
___
___
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 2e9cba1d1554 by Nick Coghlan in branch 'default':
Issue 14814: Correctly return NotImplemented from ipaddress._BaseNetwork.__eq__
http://hg.python.org/cpython/rev/2e9cba1d1554
--
New submission from Andrea Griffini agr...@tin.it:
This is a fix for issue #5765: stack overflow evaluating eval(() * 3)
The solution was to add two fields (recursion_depth and
recursion_limit) to the symbol table object and just increment and
check the depth in symtable_visit_expr raising
Andrea Griffini agr...@tin.it added the comment:
This is a fix for this issue.
The solution was to add two fields (recursion_depth and
recursion_limit) to the symbol table object and just increment and
check the depth in symtable_visit_expr raising a RuntimeError in case
the limit is exceeded.
Andrea Griffini agr...@tin.it added the comment:
I sent an email because I was not able to log in. The patch has been submitted
to the correct issue (6765).
--
resolution: - duplicate
status: open - closed
___
Python tracker rep...@bugs.python.org
New submission from Manuel de la Pena man...@canonical.com:
The problem is simple, the code that allows to use binary strings and unicode
is making more calls that needed to isinstance(path, bytes) since the result of
the code is not shared. For example, the following calls are present in the
Roy Smith r...@panix.com added the comment:
The docs describe population as a sequence. Your patch describes it as a
list. I would go with:
If *len(population)* is less than *k*, raises :exc:`ValueError`.
--
___
Python tracker
Changes by Manuel de la Pena man...@canonical.com:
Added file: http://bugs.python.org/file26295/f5c57ba1124b.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15275
___
New submission from Ariel Ben-Yehuda arie...@mail.tau.ac.il:
unicode formats (u'{:n}'.format) in python 2.x assume that the thousands
seperator is in ascii, so this fails:
import locale
locale.setlocale(locale.LC_NUMERIC, 'fra') # or fr_FR on UNIX
u'{:n}'.format(1)
Traceback (most
Changes by Manuel de la Pena man...@canonical.com:
Removed file: http://bugs.python.org/file26295/f5c57ba1124b.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15275
___
Eugenio Minardi eugenio.mina...@gmail.com added the comment:
Ok, I have updated the patch
--
Added file: http://bugs.python.org/file26296/issue15265-fix-docs-update.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15265
Andrea Griffini agr...@tin.it added the comment:
Closing as it was a partial implementation of a bad idea with questionable
gains.
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
Chris Jerdonek chris.jerdo...@gmail.com added the comment:
Cf. the related issue 7300: Unicode arguments in str.format().
--
nosy: +cjerdonek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15276
Brian Brazil brian.bra...@gmail.com added the comment:
Looks like someone else has already fixed this.
--
resolution: - out of date
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10248
Mark Shannon m...@hotpy.org added the comment:
io.UnsupportedOperation.__new__(io.UnsupportedOperation)
behaves correctly now (rev d9c98730e2e8)
This bug was (I believe) caused somehow by an error in OSError_new() which did
not initialize self-args if OSError_init() was not called.
Here is a
Florent Xicluna florent.xicl...@gmail.com added the comment:
Do we agree to remove the max_buffer_size from the io module in 3.3?
This argument is unused, and deprecated. Just dead code.
See attachment.
--
Added file: http://bugs.python.org/file26297/issue13248_io_max_buffer_size.diff
Changes by Florent Xicluna florent.xicl...@gmail.com:
Removed file:
http://bugs.python.org/file23928/issue13248_argparse_io_lib2to3.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13248
___
Greg Roodt gro...@gmail.com added the comment:
I've made a small change to urllib2 to catch the httplib.BadStatusLine and
raise as URLError. This exception should rarely happen as it means the server
is returning invalid responses. Nevertheless, I've added a test and hopefully
fixed the
Antoine Pitrou pit...@free.fr added the comment:
Do we agree to remove the max_buffer_size from the io module in 3.3?
Yes!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13248
___
Łukasz Langa luk...@langa.pl added the comment:
After reading the mailing list thread at
http://mail.python.org/pipermail/python-dev/2010-January/097102.html
and waging on other concerns (e.g. how to behave on write-only and read-write
modes), it looks like a PEP might be necessary to solve
Changes by Łukasz Langa luk...@langa.pl:
--
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7651
___
___
Python-bugs-list
Changes by Łukasz Langa luk...@langa.pl:
--
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11786
___
___
Python-bugs-list
Florent Xicluna florent.xicl...@gmail.com added the comment:
For the implementation part, there's something which already plays with the BOM
in the tokenize module.
See tokenize.open(), which uses tokenize.detect_encoding() to read the BOM in
some cases.
--
nosy: +flox
New submission from Brian Brazil brian.bra...@gmail.com:
I'm running Ubuntu Precise and have net.ipv6.conf.all.disable_ipv6 = 1 in my
sysctl.conf. With this configuration at head there's a fd leak in
_is_ipv6_enabled in support.py when the bind fails, which the attached patch
should fix.
Jesús Cea Avión j...@jcea.es added the comment:
I need to pass a --with-dtrace to the buildbot configure. How can I do it,
beside faking it manipulating the pushed configure script?.
--
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
I need to pass a --with-dtrace to the buildbot configure. How can I
do it, beside faking it manipulating the pushed configure script?.
This is done on the buildmaster. I just did the change, can you try
again?
--
Serhiy Storchaka storch...@gmail.com added the comment:
Serhiy, note that _SimpleElementPath is now gone in 3.3, since ElementPath.py
is always there in stdlib. Could you update the patch to reflect this?
Don't worry, _SimpleElementPath is not used in changes.
Another thing. I'm trying
Greg Roodt gro...@gmail.com added the comment:
Bumping this as part of a bug scrub at EuroPython. Is this still an issue?
Should we fix in docs or in code?
--
nosy: +groodt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5815
Changes by Florent Xicluna florent.xicl...@gmail.com:
Removed file: http://bugs.python.org/file23929/issue13248_obsolescence_v2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13248
___
Changes by Florent Xicluna florent.xicl...@gmail.com:
Added file: http://bugs.python.org/file26301/issue13248_obsolescence_v3.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13248
___
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 9b359b6c9a39 by Nick Coghlan in branch 'default':
Issue 14814: Ensure ordering semantics across all 3 entity types in ipaddress
are consistent and well-defined
http://hg.python.org/cpython/rev/9b359b6c9a39
Stephen Thorne step...@thorne.id.au added the comment:
Here is a patch that synthesises the directory names at the point where file
names are read in. The unit test now passes, and has had the expected failure
removed.
Patch collaboration with Diarmuid Bourke diarmuidbou...@gmail.com at the
Greg Roodt gro...@gmail.com added the comment:
Bumping as part of bug scrub at EuroPython. Patch seems sensible to me. Obvious
options to me are to either accept patch, close bug or write docs. Bug has not
seen activity in years, so can probably be closed.
--
nosy: +groodt
Serhiy Storchaka storch...@gmail.com added the comment:
Should do _version and _max_prefixlen be instance members? Or they can be class
members as _HEX_DIGITS?
--
nosy: +storchaka
___
Python tracker rep...@bugs.python.org
Changes by Benjamin Peterson benja...@python.org:
--
resolution: fixed - out of date
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14241
___
___
Ionuț Arțăriși io...@artarisi.eu added the comment:
So I was looking into this and it seems that there are (at least) two
contradicting test cases. When inheriting a parser from two parents, there are
two different behaviours for positionals and for options.
In the case of positionals, there
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 5393382c1b1d by Florent Xicluna in branch 'default':
Issue #13248: argparse: Remove obsolete argument version of ArgumentParser.
http://hg.python.org/cpython/rev/5393382c1b1d
New changeset 700f989afbad by Florent
Ionuț Arțăriși io...@artarisi.eu added the comment:
Here's a stab at a patch to consider conflicts between positionals. Right now
conflict resolution is handled the same as in the case of options.
--
keywords: +patch
Added file:
1 - 100 of 223 matches
Mail list logo