Antoine Pitrou pit...@free.fr added the comment:
Well, if it's not documented, it's technically a private API.
Also, there doesn't seem to be any explicit use of ExFileObject outside of
tarfile.py:
http://code.google.com/codesearch#searchq=lang:python+exfileobject
--
nosy: +pitrou
Martin v. Löwis mar...@v.loewis.de added the comment:
I'd say go ahead and apply it. We can deal with any aftermath later (which, by
my VS 2008 experience, will well take several years - we still haven't fully
recovered from the switch to VS 2008).
--
Antoine Pitrou pit...@free.fr added the comment:
I'm not sure what you're proposing to fix. It seems to save at most a couple of
lines of (obvious) code?
At least Py_ssize_t *could* have a different width from PyObject *.
--
nosy: +mark.dickinson, pitrou
Larry Hastings la...@hastings.org added the comment:
I'm not sure what you're proposing to fix. It seems to save at
most a couple of lines of (obvious) code?
Well, I *did* specify low priority.
Attached is the patch for what I had in mind.
At least Py_ssize_t *could* have a different
Antoine Pitrou pit...@free.fr added the comment:
At least Py_ssize_t *could* have a different width from PyObject *.
Not Py_ssize_t, Py_ssize_t *.
Ah, fair enough then. Looks ok to me.
--
___
Python tracker rep...@bugs.python.org
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 8ab37fa24e58 by Larry Hastings in branch 'default':
Issue #14746: Remove redundant paragraphs from skipitem() in Python/getargs.c.
http://hg.python.org/cpython/rev/8ab37fa24e58
--
nosy: +python-dev
Larry Hastings la...@hastings.org added the comment:
Thanks for the double-check. I should have more confidence!
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
New submission from anatoly techtonik techto...@gmail.com:
It would be convenient if instead of:
hdlr = logging.StreamHandler()
hglr.setLevel(logging.DEBUG)
root.addHandler(hdlr)
it would be possible to write:
root.addHandler(logging.StreamHandler().setLevel(logging.DEBUG))
Changes by Mark Dickinson dicki...@gmail.com:
--
assignee: docs@python - mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14245
___
Changes by Mark Dickinson dicki...@gmail.com:
--
stage: - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14591
___
___
Changes by Mark Dickinson dicki...@gmail.com:
--
assignee: - mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14742
___
___
Georg Brandl ge...@python.org added the comment:
-1. Attribute setters or mutating methods returning self is not a common
pattern in Python. See list.sort().
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
anatoly techtonik techto...@gmail.com added the comment:
List is a standard type and it have None returned for a reson. Logging is a
library with its own semantic and high level object. Here you don't need to
return None to explicitly say that the object was modified in place.
--
Georg Brandl ge...@python.org added the comment:
Well, can you find any other setter method of a high level object in the
stdlib that returns self?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14760
anatoly techtonik techto...@gmail.com added the comment:
Well, I can remember any other widely used high level objects from stdlib
either. HTTP servers perhaps, but they are in a poor state.
--
___
Python tracker rep...@bugs.python.org
anatoly techtonik techto...@gmail.com added the comment:
s/can/can't/
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14760
___
___
anatoly techtonik techto...@gmail.com added the comment:
Well, there is argparse, but it doesn't support method chaining. Whatever, it
is just a proposal. If consistency inside stdlib covers calling conventions for
bundled user-level libs - I am fine with that.
--
Serhiy Storchaka storch...@gmail.com added the comment:
Here is a new patch using _PyUnicodeWriter directly in longobject.c.
It may be worth to do it in a separate issue?
decimal digits) is 17% faster with my patch version 2 compared to tip,
and 38% faster compared to Python 3.3 before my
Changes by Martin Panter vadmium...@gmail.com:
--
nosy: +vadmium
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14653
___
___
Python-bugs-list
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14758
___
___
Python-bugs-list mailing list
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
versions: +Python 3.3 -Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1439312
___
___
Arthur Kantor artkan...@gmail.com added the comment:
Hi guys
It appears, that this patch was meant to go into both the 2.x and 3.x series,
but it never made into 2.x
Are there still plans to apply it to 2.7?
(apologies if I'm asking this in the wrong forum)
--
nosy: +Arthur.Kantor
Kristján Valur Jónsson krist...@ccpgames.com added the comment:
I concur with Martin. It is much easier to tweak .vcproj and .props files and
such after it has been committed, with lesser diffs to worry about.
(A more cautious version of me would have seen this go into a PCBuild10 folder
New submission from Damien Cassou damien.cas...@gmail.com:
In load_source_module() function from import.c, it looks like Py_DECREF is not
called where it should be. Please find attached a patch that fixes the leak.
This bug has been found using Coccinelle (http://coccinelle.lip6.fr/) using a
Antoine Pitrou pit...@free.fr added the comment:
In test_random, you should use assertLess so that the offending value is
displayed on failure.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14591
Antoine Pitrou pit...@free.fr added the comment:
Is it 2.7-only?
--
nosy: +brett.cannon, ncoghlan, pitrou
stage: - patch review
type: - resource usage
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14761
Damien Cassou damien.cas...@gmail.com added the comment:
@pitrou I just checked Python-2.7.3 and the tip of the mercurial repository.
It's not in the latter at least.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14761
New submission from Giuseppe Attardi atta...@di.unipi.it:
I confirm the presence of a serious memory leak in ElementTree, using the
iterparse() function.
Memory grows disproportionately to dozens of GB when parsing a large XML file.
For further information, see discussion in:
Ezio Melotti ezio.melo...@gmail.com added the comment:
I tracked this down a bit and this is what I found:
has_finalizer in Modules/gcmodule.c calls
return _PyInstance_Lookup(op, delstr) != NULL;
_PyInstance_Lookup in Modules/classobject.c calls
v = class_lookup(inst-in_class, name,
Mark Dickinson dicki...@gmail.com added the comment:
Done.
--
Added file: http://bugs.python.org/file25508/random_jumpahead_5.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14591
___
Antoine Pitrou pit...@free.fr added the comment:
Well, I don't think there's any point in trying to fixing this now.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9751
___
Antoine Pitrou pit...@free.fr added the comment:
For the record, issue9260 proposes to fix the issues with
PyImport_ImportModuleNoBlock.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7980
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +eli.bendersky, flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14762
___
___
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset a775fc27f469 by Antoine Pitrou in branch '2.7':
Issue #14761: Fix potential leak on an error case in the import machinery.
http://hg.python.org/cpython/rev/a775fc27f469
--
nosy: +python-dev
New submission from Fj fj.m...@gmail.com:
string.split documentation says:
The optional third argument maxsplit defaults to 0. If it is nonzero, at most
maxsplit number of splits occur, and the remainder of the string is returned
as the final element of the list (thus, the list will have
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 9de4d85e4197 by Antoine Pitrou in branch '3.2':
Issue #14761: Fix potential leak on an error case in the import machinery.
http://hg.python.org/cpython/rev/9de4d85e4197
New changeset 840cb46d0395 by Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment:
Fixed, thank you!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
versions: +Python 3.2
___
Python tracker rep...@bugs.python.org
Eli Bendersky eli...@gmail.com added the comment:
Can you specify how you import ET? I.e. from the pure Python or the C
accelerator?
Also, do you realize that the element iterparse returns should be discarded
with 'clear'? [see tutorial here:
Lars Gustäbel l...@gustaebel.de added the comment:
In an earlier draft of my patch, I had kept ExFileObject as a subclass of
BufferedReader, but I later decided against it. To use BufferedReader directly
is in my opinion the cleaner solution.
I admit that the change is not fully backward
STINNER Victor victor.stin...@gmail.com added the comment:
Inlining may be removed to simplify the code
Attached inline_unicode_writer.patch does inline the code but also call only
unicode_writer_prepare() once for each argument in PyUnicode_Format(). The
patch removes
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset d3ddbad31b3e by Ezio Melotti in branch '2.7':
#14763: fix documentation for string.split/rsplit.
http://hg.python.org/cpython/rev/d3ddbad31b3e
--
nosy: +python-dev
___
Ezio Melotti ezio.melo...@gmail.com added the comment:
I fixed the doc for string.split/rsplit. I didn't change the signature because
all the other functions use the old signature convention (the one with []).
These functions are anyway deprecated, so I don't think it's worth spending
more
R. David Murray rdmur...@bitdance.com added the comment:
The LICENSE.txt file is just the Python license, which has a rather
convoluted history. Newer contributions are all under an Apache-style license
from the individual contributors. My understanding (but I'm not a lawyer) is
that
New submission from Antoine Pitrou pit...@free.fr:
It seems the benchmark script didn't survive the migration:
$ ./python -m importlib.test.benchmark
Measuring imports/second over 1 second, best out of 3
Entire benchmark run should take about 33 seconds
Using function __import__ at
Jesús Cea Avión j...@jcea.es added the comment:
I am the maintainer of Berkeley DB python bindings, pybsddb:
http://www.jcea.es/programacion/pybsddb.htm
If I recall correctly, Berkeley DB license is something like this:
1. Your code must be open source, if you distribute the programs to
Jesús Cea Avión j...@jcea.es added the comment:
Could be useful if you directly talk to Oracle about this and communicate what
you learned. It could even influence pybsddb licensing/documentation :).
--
___
Python tracker rep...@bugs.python.org
Fj fj.m...@gmail.com added the comment:
Thank you.
These functions are anyway deprecated
Well, yes, but it's the only place you can get information about the default
value of maxsplit, short of looking in the source. Which is kind of wrong.
Maybe you can also fix str.split docstring to say
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Unfortunately unit tests overwrite the original smtpd.socket module object with
test.mock_socket [1] and the latter one doesn't expose socket.getaddrinfo().
[1] http://hg.python.org/cpython/file/d937b527b76e/Lib/test/test_smtpd.py#l54
Jesús Cea Avión j...@jcea.es added the comment:
Can this be reproduced in 3.2/3.3?
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14762
___
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14758
___
___
Python-bugs-list mailing list
R. David Murray rdmur...@bitdance.com added the comment:
Yeah, I know it is technically private. We still tend to keep names around
unless there's a good reason to delete them (like using them leads to broken
code anyway). The code search is some evidence this deletion would be OK, but
why
Giuseppe Attardi atta...@di.unipi.it added the comment:
You are right, I should discard the elements.
Thank you.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14762
___
Changes by Giuseppe Attardi atta...@di.unipi.it:
--
resolution: - invalid
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14762
___
Antoine Pitrou pit...@free.fr added the comment:
Yeah, I know it is technically private. We still tend to keep names
around unless there's a good reason to delete them (like using them
leads to broken code anyway). The code search is some evidence this
deletion would be OK, but why *not*
R. David Murray rdmur...@bitdance.com added the comment:
Well, that should be fixed anyway (a cleanup added that restores the original
value). Then a new TestCase can test the socket stuff.
--
___
Python tracker rep...@bugs.python.org
New submission from Tshepang Lekhonkhobe tshep...@gmail.com:
This example [1] assumes you are using a specific platform to check it out. I
am using amd64, and I get different results. To fix, I prefix the format string
with '':
before:
pack('hhl', 1, 2, 3)
after:
pack('hhl', 1, 2, 3)
1:
Meador Inge mead...@gmail.com added the comment:
And the examples make an explicit note of that:
.. note::
All examples assume a native byte order, size, and alignment with a
big-endian machine.
AMD64 is little-endian; the examples are noted to be in big-endian.
Is that note not
Tshepang Lekhonkhobe tshep...@gmail.com added the comment:
Sadly, I noticed it only after submitting this report.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14765
___
Changes by Meador Inge mead...@gmail.com:
--
resolution: - invalid
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14765
___
R. David Murray rdmur...@bitdance.com added the comment:
Code search is not proof, I'm afraid. It is evidence, though, and I thought I
indicated I thought it was a good argument in favor of dropping the class.
--
___
Python tracker
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
I agree with Georg. Besides, as far as possible, the API should be consistent
across versions of Python, unless something is needed to take advantage of
added features.
With your proposal, users could write library code which then would
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:
Added file: http://bugs.python.org/file25510/51b73e1c1e94.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14712
___
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14764
___
___
Python-bugs-list
Antoine Pitrou pit...@free.fr added the comment:
Code search is not proof, I'm afraid. It is evidence, though, and I
thought I indicated I thought it was a good argument in favor of
dropping the class.
Yes, sorry for the vocabulary mismatch :-)
--
Stephen White stephen-python@randomstuff.org.uk added the comment:
Glad this is fixed. Attached is a Python 2.7 file that demonstrates the
problem in a pretty minimal way in case it is of any use to anyone.
--
nosy: +Stephen.White
Added file:
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:
Removed file: http://bugs.python.org/file25444/old-patch.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14712
___
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
I came here when I saw this comment in the diff: # Keep the traditional
pre-3.3 API intact. Why keep an internal API intact if we do it partially?
The ExFileObject class above will also simplify the code: simply return
Maxim Doucet maxim.dou...@gmail.com added the comment:
Shouldn't there be an update of the 2.6 documentation too?
After your patch, the 2.7 reflects the existence of the --user option (see
http://docs.python.org/release/2.7.3/install/index.html#alternate-installation-the-user-scheme)
but not
Éric Araujo mer...@netwok.org added the comment:
2.6 only gets security fixes now.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8617
___
___
Georg Brandl ge...@python.org added the comment:
Should be fixed now.
Thanks for the commit fix, Georg. The comment on buildbot failures had
escaped my attention. Sorry for that.
___
Python-bugs-list mailing list
Unsubscribe:
Éric Araujo mer...@netwok.org added the comment:
BTW it appears that many people use the most recent 2.7 documentation even if
they are using 2.6, because the doc is better and there are notes which tell
you if something was changed or added in 2.7. For PEP 370 there are notes in
the doc of
Maxim Doucet maxim.dou...@gmail.com added the comment:
Fair enough, thank you for the information. As a side note, my original
question was in fact more suited for issue10745
--
___
Python tracker rep...@bugs.python.org
Pierre Quentel pierre.quen...@gmail.com added the comment:
Hi,
I started working on a revised version of the whole cgi documentation. I mostly
changed paragraphs 2 3 (Using the CGI module and Higher level interface)
and replaced them by a paragraph still called Using the CGI module + 2 other
Antoine Pitrou pit...@free.fr added the comment:
There's a Mac-specific portion in the patch, it would be nice if someone could
check that it works.
--
nosy: +ned.deily, ronaldoussoren
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka storch...@gmail.com added the comment:
It would be good if someone checked on Macs work with command line arguments,
including non-valid utf8. The difficulty is that you need to check on both Macs
with 16-bit and with 32-bit wchar_t.
--
Serhiy Storchaka storch...@gmail.com added the comment:
Issue4388 is related to this Mac-specific portion of the patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14738
___
Antoine Pitrou pit...@free.fr added the comment:
It would be good if someone checked on Macs work with command line
arguments, including non-valid utf8. The difficulty is that you need
to check on both Macs with 16-bit and with 32-bit wchar_t.
Actually, it should be enough to run the test
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +janssen
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14738
___
___
Python-bugs-list mailing
Serhiy Storchaka storch...@gmail.com added the comment:
I hacked the code (commented out #if __APPLE__ in
Objects/unicodeobject.c and Modules/python.c) to start this branch on
Linux and ran the test (test_cmd_line) with C locale. It passed. Then I
broke decoder and ran the test again to get the
Armin Rigo ar...@users.sourceforge.net added the comment:
Unlike other crashers I'm a bit concerned about this one. It can occur on any
code that stores custom instances as keys in the __dict__ of an old-style
instance. Such code might be unusual-looking, but certainly not unheard-of.
And
Mark Dickinson dicki...@gmail.com added the comment:
Actually, it should be enough to run the test suite, since we should
have tests for this.
I just ran the test suite (python -m test) on OS X 10.6.8 with
'decode_utf8_5.patch' applied. (64-bit --with-pydebug build of Python.) No
test
STINNER Victor victor.stin...@gmail.com added the comment:
The difficulty is that you need to check on both Macs
with 16-bit and with 32-bit wchar_t.
I don't think that the size of wchar_t is configurable: it should always be 32
bits on Mac OS X.
--
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 6c8a117f8966 by Victor Stinner in branch 'default':
Issue #14744: Inline unicode_writer_write_char() and unicode_write_str()
http://hg.python.org/cpython/rev/6c8a117f8966
--
nosy: +python-dev
New submission from Chris Bergstresser ch...@subtlety.com:
The datetime module says:
An object d of type time or datetime may be naive or aware. d is aware if
d.tzinfo is not None and d.tzinfo.utcoffset(d) does not return None. If
d.tzinfo is None, or if d.tzinfo is not None but
R. David Murray rdmur...@bitdance.com added the comment:
An equivalent test using python 3.2's datetime.timezone works fine. Are you
sure it isn't a bug in pytz?
--
nosy: +belopolsky, r.david.murray
___
Python tracker rep...@bugs.python.org
Chris Bergstresser ch...@subtlety.com added the comment:
It doesn't seem to be a bug in pytz. AFAICT, the only methods that get called
during the time comparison is utcoffset on the UTC timezone, and utcoffset
on the New York timezone.
Looking closer at it, it seems that Python is calling
R. David Murray rdmur...@bitdance.com added the comment:
Ah. datetime.timezone wouldn't have that issue since it doesn't deal with DST.
The 3.3 python version of datetime calls utcoffset in the same way as you
describe, and it is supposed to have the same behavior as the C version, so
Jeff Laing jeffla...@gmail.com added the comment:
@Jesús, as has been pointed out already, the Berkeley DB stuff is not part of
Python 3 so I don't see any point in discussing this with Oracle.
We don't actually use or need the bsddb module, it's just part of the standard
runtime library that
New submission from jspenguin jspeng...@gmail.com:
If a server returns a relative URL in the 'Location:' header,
HTTPRedirectHandler will fail because it checks the scheme of the URL before it
calls urljoin() to convert it to an absolute URL.
--
components: Library (Lib)
files:
R. David Murray rdmur...@bitdance.com added the comment:
Ah, I see.
No, the docs are correct, I'm the one who was mistaken. I thought the license
page was on www.python.org, rather than docs.python.org. Developers *do* have
full and easy access to docs.python.org, and we do track doc bugs
New submission from Bradley Froehle brad.froe...@gmail.com:
When $HOME=/, os.path.expanduser('~/a') returns '//a' rather than '/a'.
This regression was created by a partially incorrect resolution to issue #5471,
and affects versions 2.7 and 3.2 (at least).
$ HOME=/ python2.7 -c import os;
Jesús Cea Avión j...@jcea.es added the comment:
If your program is not using Berkeley DB in any way, you don't need to worry
about its license. The situation is similar to Berkeley DB being included in
you linux distribution: if you don't use it, you don't have to worry.
--
Jesús Cea Avión j...@jcea.es added the comment:
See issue #14768.
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5471
___
___
Jesús Cea Avión j...@jcea.es added the comment:
I though that this situation would be happen for ANY env with $HOME ending in
/, but it is not the case:
jcea@ubuntu:~$ echo $HOME
/home/jcea
jcea@ubuntu:~$ python
Python 2.7.3 (default, Apr 12 2012, 13:11:53)
[GCC 4.4.3] on linux2
Type help,
Changes by Jesús Cea Avión j...@jcea.es:
--
keywords: +easy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14768
___
___
Python-bugs-list mailing
Bradley Froehle brad.froe...@gmail.com added the comment:
Patch (for version 2.7) attached.
--
keywords: +patch
Added file: http://bugs.python.org/file25514/issue_14768.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14768
Changes by Jesús Cea Avión j...@jcea.es:
--
assignee: - jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14768
___
___
Python-bugs-list mailing
Changes by Senthil Kumaran sent...@uthcode.com:
--
assignee: - orsenthil
nosy: +orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14767
___
Changes by Éric Araujo mer...@netwok.org:
--
dependencies: +Custom commands don't work
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14651
___
___
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset e472481b6d73 by Jesus Cea in branch '3.2':
Closes #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is
'/'
http://hg.python.org/cpython/rev/e472481b6d73
New changeset 299dc54ad014 by Jesus Cea in
100 matches
Mail list logo