New submission from Berker Peksag:
The dummy_thread module has been renamed to _dummy_thread in Python 3:
import dummy_thread
Traceback (most recent call last):
File stdin, line 1, in module
ImportError: No module named 'dummy_thread'
--
assignee: docs@python
New submission from Ned Deily:
The center footer in the source for the python man page, specifically the .th
macro in Misc/python.man, contains an unexpanded $Date$ left over from the days
of svn keyword expansions. Since hg does not support such expansions, either
the source should be
Roundup Robot added the comment:
New changeset 6add6ac6a802 by Serhiy Storchaka in branch '2.7':
Issue #16686: Fixed a lot of bugs in audioop module.
http://hg.python.org/cpython/rev/6add6ac6a802
New changeset 104b17f8316b by Serhiy Storchaka in branch '3.2':
Issue #16686: Fixed a lot of bugs
Serhiy Storchaka added the comment:
I fixed yet one bug in avgpp() and remove my XXX comment. *All* audioop
functions are unsafe regarding unaligned access. I'll open a new issue for this.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
Serhiy Storchaka added the comment:
*All* audioop functions are unsafe regarding unaligned access.
Actually this is not true because currently audioop functions work only with
bytes (and str, see issue16685) and not with arbitrary memoryview.
--
Roundup Robot added the comment:
New changeset fb4ed16f35bd by Serhiy Storchaka in branch '3.2':
Issue #17147. Mention BytesIO in SpooledTemporaryFile documentation.
http://hg.python.org/cpython/rev/fb4ed16f35bd
New changeset 8f772825029f by Serhiy Storchaka in branch '3.3':
Issue #17147.
Serhiy Storchaka added the comment:
Thank you for corrections Éric.
--
assignee: docs@python - serhiy.storchaka
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 5c2ff6e64c47 by Serhiy Storchaka in branch '2.7':
Issue #10355: SpooledTemporaryFile properties and xreadline method now work for
unrolled files.
http://hg.python.org/cpython/rev/5c2ff6e64c47
New changeset dfc6902b63d7 by Serhiy Storchaka in
New submission from Ramchandra Apte:
StringIO.StringIO has been renamed to io.StringIO in 3.x.
Attached is a patch with the corrected version which mentions io.StringIO.
--
assignee: docs@python
components: Documentation
files: issue.patch
keywords: patch
messages: 181729
nosy:
Ramchandra Apte added the comment:
Just so you know, I'm neutral on this idea. I think it should at least accept
sequences though.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17157
___
Serhiy Storchaka added the comment:
Default encoding on Python 3 is UTF-8. You should declare your encoding at the
top of file if it differs from UTF-8 or ASCII (i.e. # -*- coding: euc-jp
-*-). Otherwise Python will reject your file (for Shift_JIS and EUC-JP) or
produce incorrect result (for
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10355
Mark Dickinson added the comment:
There's already a fairly well known 3rd-party library for this:
http://pypi.python.org/pypi/bitarray/
I'd be -1 on putting something like this in the standard library: the array
module doesn't get enough maintenance as it is, and a packed bit array sounds
Roundup Robot added the comment:
New changeset a025b04332fe by Serhiy Storchaka in branch '2.7':
Issue #7358: cStringIO.StringIO now supports writing to and reading from
http://hg.python.org/cpython/rev/a025b04332fe
--
nosy: +python-dev
___
Python
Dirkjan Ochtman added the comment:
libffi now has this fix:
https://github.com/atgreen/libffi/commit/6a790129427121f7db2d876e7218a3104e6d2741
Can someone test with that?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17136
Ramchandra Apte added the comment:
Please commit or review. This is *very* trivial.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17168
___
___
Ramchandra Apte added the comment:
LGTM.
--
nosy: +ramchandra.apte
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17166
___
___
Python-bugs-list
Franck Michea added the comment:
I am neutral on this too, it just felt odd and this is why the question raised.
Yesterday I tried to add sequences and iterables (only to issubclass but indeed
it would need better testing and all) and came to a problem with sequences. The
current
Roundup Robot added the comment:
New changeset 474296d6d4a1 by Benjamin Peterson in branch '3.3':
StringIO.StringIO - io.StringIO (closes #17168)
http://hg.python.org/cpython/rev/474296d6d4a1
New changeset 87e95b853be2 by Benjamin Peterson in branch 'default':
merge 3.3 (#17168)
New submission from Serhiy Storchaka:
Before 3.3 if not able to create the name of the temporary file then an OSError
with meaninful errno (ENOENT or EEXIST) was raised. Now subclass of OSError
raised with errno=None. This is an incompatible change because old user code
can catch OSError
umedoblock added the comment:
python3 output translate Japanese with pygettext.install().
EVERYTHING IS OK!
please check to use a konnichiha.2.tar.gz.
==
please do below shell command.
$ for f in `find . -name 'konnichiha.*.py'` ; do echo f=$f ;
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7358
___
New submission from Guido van Rossum:
I'm trying to speed up a web template engine and I find that the code needs to
do a lot of string replacements of this form:
name = name.replace('_', '-')
Characteristics of the data: the names are relatively short (1-10 characters
usually), and the
Antoine Pitrou added the comment:
Characteristics of the data: the names are relatively short (1-10
characters usually)
$ ./python -m timeit -s a = 'hundred' 'x' in a
1000 loops, best of 3: 0.0431 usec per loop
$ ./python -m timeit -s a = 'hundred' a.find('x')
100 loops, best of 3:
Guido van Rossum added the comment:
Hm, you seem to be right. Changing the bug title.
So, can we speed up method lookup? It's a shame that I have to start promoting
this ugly idiom. There's a similar issue where s[:5]=='abcde' is faster than
s.startswith('abcde'):
./python.exe -m timeit -s a
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti, serhiy.storchaka
versions: +Python 3.4 -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17170
___
Serhiy Storchaka added the comment:
There are two overheads: an attribute lookup and a function call.
$ ./python -m timeit -s a = 'hundred' 'x' in a
1000 loops, best of 3: 0.0943 usec per loop
$ ./python -m timeit -s a = 'hundred' a.__contains__('x')
100 loops, best of 3: 0.271 usec
Michał Jastrzębski added the comment:
Hello,
I've set up maxline limit to 8192. Also I've add some changes Antoine suggested
earlier.
--
Added file: http://bugs.python.org/file29019/ftplib_maxline.patch
___
Python tracker rep...@bugs.python.org
Senthil Kumaran added the comment:
The patch looks good and it is correct thing to do IMO. thanks.
--
nosy: +orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17169
___
Roundup Robot added the comment:
New changeset 30f92600df9d by R David Murray in branch '2.7':
#16564: test to confirm behavior that regressed in python3.
http://hg.python.org/cpython/rev/30f92600df9d
New changeset a1a04f76d08c by R David Murray in branch '3.2':
#16564: Fix regression in use of
New submission from R. David Murray:
Reported by Serhiy in issue 16564:
import io, email
bytesdata = b'\xfa\xfb\xfc\xfd\xfe\xff'
msg = email.mime.application.MIMEApplication(bytesdata,
_encoder=encoders.encode_7or8bit)
s = io.BytesIO()
g = email.generator.BytesGenerator(s)
R. David Murray added the comment:
I've opened issue 17171 for the similar encode7or8bit problem.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
Here is an updated patch. Fixed two bugs found by Antoine (an inappropriate
format and a memory error in bigmemtest), fixed resizing of marks array and one
possible integer overflow in write_other(). Used workaround to bypass
limitations of cStringIO API.
Roundup Robot added the comment:
New changeset 6af3afbc7211 by R David Murray in branch '3.2':
#17166: fix _dummy_thread import example.
http://hg.python.org/cpython/rev/6af3afbc7211
New changeset dfefae8df4f7 by R David Murray in branch '3.3':
Merge: #17166: fix _dummy_thread import example.
R. David Murray added the comment:
Thanks, Berker.
--
nosy: +r.david.murray
resolution: - fixed
stage: - committed/rejected
status: open - closed
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17166
Antoine Pitrou added the comment:
Indeed the function call cost actually dominates:
$ ./python -m timeit -s a = 'hundred' a.find('x')
100 loops, best of 3: 0.206 usec per loop
$ ./python -m timeit -s a = 'hundred'; f=a.find f('x')
1000 loops, best of 3: 0.176 usec per loop
$ ./python -m
Antoine Pitrou added the comment:
Some crude C benchmarking on this computer:
- calling PyUnicode_Replace is 35 ns (per call)
- calling hundred.replace is 125 ns
- calling PyArg_ParseTuple with the same signature as hundred.replace is 80 ns
Therefore, most of the overhead (125 - 35 = 90 ns) is
Changes by Xavier de Gaye xdeg...@gmail.com:
--
nosy: +xdegaye
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16956
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
And PyArg_ParseTupleAndKeywords() is even more slow.
$ ./python -m timeit str(b'', 'utf-8', 'strict')
100 loops, best of 3: 0.554 usec per loop
$ ./python -m timeit str(object=b'', encoding='utf-8', errors='strict')
100 loops, best of 3: 1.74 usec per
Roundup Robot added the comment:
New changeset 11eaa61124c2 by Serhiy Storchaka in branch '3.3':
Issue #17169: Restore errno in tempfile exceptions.
http://hg.python.org/cpython/rev/11eaa61124c2
New changeset fd3e3059381a by Serhiy Storchaka in branch 'default':
Issue #17169: Restore errno in
New submission from Raymond Hettinger:
The turtledemo is an on-ramp for younger programmers and we should make it easy
to launch.
--
components: IDLE
keywords: easy
messages: 181757
nosy: rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: Add turtledemo
Roundup Robot added the comment:
New changeset 49b1fde510a6 by Serhiy Storchaka in branch '2.7':
Issue #17156: pygettext.py now correctly escapes non-ascii characters.
http://hg.python.org/cpython/rev/49b1fde510a6
New changeset cd59b398907d by Serhiy Storchaka in branch '3.2':
Issue #17156:
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17156
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17169
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17043
New submission from Antoine Pitrou:
Grepping through the code reveals we are still using a number of
locale-dependent C library functions:
Python/mystrtoul.c:102:while (*str isspace(Py_CHARMASK(*str)))
Python/mystrtoul.c:141:while (isspace(Py_CHARMASK(*str)))
Raymond Hettinger added the comment:
+1 for fixing this everywhere.
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17173
___
Antoine Pitrou added the comment:
Here is a patch yielding a decent speedup (~ 40%) on PyArg_ParseTuple itself.
More generally though, this would be improved by precompiling some of the
information (like Argument Clinic does, perhaps).
(note: PyArg_ParseTupleAndKeywords is a completely
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17170
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12983
___
___
New submission from Thomas Scrace:
Currently os.path.join will raise an AttributeError if passed an argument that
does not have an endswith() method.
A try/except around the offending line would let us raise a more helpful
TypeError:
except AttributeError as e:
bad =
Changes by Stefan Krah stefan-use...@bytereef.org:
--
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - uses of locale-dependent ctype functions
___
Python tracker rep...@bugs.python.org
Stefan Krah added the comment:
I'm not sure if I'll use pyctype.h in libmpdec: It's still going to be an
external project that should be completely identical to the version in the
Python tree.
libmpdec/io.c is specified to be ASCII only (while handling the Turkish 'I')
and is used accordingly
Janzert added the comment:
While the current error message is a bit generic, I rather like that it tells
you exactly why the type/object passed couldn't be used.
--
nosy: +Janzert
___
Python tracker rep...@bugs.python.org
Changes by Michele Orrù maker...@gmail.com:
--
keywords: +patch
nosy: +maker
Added file: http://bugs.python.org/file29022/issue16692.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16692
Roundup Robot added the comment:
New changeset 38830281d43b by Antoine Pitrou in branch '3.2':
Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) in
the interpreter.
http://hg.python.org/cpython/rev/38830281d43b
New changeset c08bcf5302ec by Antoine Pitrou in branch
Antoine Pitrou added the comment:
Done. I haven't touched _decimal, sre, getaddrinfo.c and zlib.
--
resolution: - fixed
stage: - committed/rejected
status: open - pending
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17173
Changes by Antoine Pitrou pit...@free.fr:
--
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17173
___
___
Python-bugs-list
Xavier de Gaye added the comment:
How does this interact with pdb?
Also, the findlinestarts() function from the dis module computes line
numbers from lnotab. This function is used by pdb when displaying the
lines of a traceback.
--
___
Python
Antoine Pitrou added the comment:
Your patch doesn't seem to work properly: a while loop doesn't generate
negative line offsets. The reason seems to be that compiler_set_lineno()
prevents it.
(also, if I re-add the `assert(d_lineno = 0);` in assemble_lnotab(), I don't
get any crash)
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +larry
stage: needs patch - patch review
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16038
___
Roundup Robot added the comment:
New changeset f13bb1e40fbc by Antoine Pitrou in branch 'default':
Issue #13773: sqlite3.connect() gets a new `uri` parameter to pass the filename
as a URI, allowing to pass custom options.
http://hg.python.org/cpython/rev/f13bb1e40fbc
--
nosy:
Antoine Pitrou added the comment:
I've committed the patch, closing.
--
assignee: ghaering -
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
Not sure how I nosied Larry by updating this issue, sorry for the mistake.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16038
___
Antoine Pitrou added the comment:
Ah, but that's because I added 3.4 in the versions field and the issue is a
release blocker :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16038
___
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +kbk
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17172
___
___
Python-bugs-list mailing list
Larry Hastings added the comment:
My spies are everywhere! You cannot hide your black heart, Pitrou.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16038
___
Antoine Pitrou added the comment:
Updated patch to also handle PyArg_ParseTupleAndKeywords.
--
Added file: http://bugs.python.org/file29023/getargs_freelist.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17170
Changes by Antoine Pitrou pit...@free.fr:
Removed file: http://bugs.python.org/file29023/getargs_freelist.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17170
___
Changes by Antoine Pitrou pit...@free.fr:
Removed file: http://bugs.python.org/file29021/getargs_freelist.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17170
___
Changes by Antoine Pitrou pit...@free.fr:
Added file: http://bugs.python.org/file29024/getargs_freelist.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17170
___
Guido van Rossum added the comment:
Great to see some action. Would there be a problem in backporting this? It's
not a new feature after all...
--
stage: patch review -
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17170
Antoine Pitrou added the comment:
That would be left to the discretion of release managers.
In all honesty the real-world benefit should be small (around 2% on the
benchmark suite, apparently).
Also, the principle of this patch doesn't apply to 2.7.
--
Eric V. Smith added the comment:
I think this change should not be made: it's a slippery slope, because there
are thousands of places in the stdlib where a similar change could be made.
It's the nature of duck typing that you're not going to get a great error
message everywhere you pass in
Changes by Senthil Kumaran sent...@uthcode.com:
--
nosy: +orsenthil
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17172
___
___
Python-bugs-list
75 matches
Mail list logo