Larry Hastings added the comment:
I would, but I can't get it to apply cleanly, either to tip or to historical
revisions back in Sepember. Kaleb, what revision is the branch that you
generated the diff from?
--
___
Python tracker
Mark Dickinson added the comment:
David: not sure. I don't think I'd go for it---I think the cure is worse than
the disease.
I think the FAQ is why it fails when the extend succeeds
Agreed.
--
___
Python tracker rep...@bugs.python.org
New submission from Florent Xicluna:
I noticed the convenient ``html.escape`` in Python 3.2 and ``cgi.escape`` is
marked as deprecated.
However, the former is an order of magnitude slower than the latter.
$ python3 --version
Python 3.3.2
With html.escape:
$ python3 -m timeit -s from html
Florent Xicluna added the comment:
Eric, this last one is not a bug in Cookie. This is a limitation with Python 2.
See #18012.
--
nosy: +flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16611
Graham Dumpleton added the comment:
Importing the cgi module the first time even in Python 2.X was always very
expensive. I would suggest you redo the test using timing done inside of the
script after modules have been imported so as to properly separate module
import time in both cases from
Florent Xicluna added the comment:
I would suggest you redo the test using timing done inside of the script
after modules have been imported.
The -s switch takes care of this.
--
___
Python tracker rep...@bugs.python.org
Jaakko Moisio added the comment:
The test pass with Python 3 which does not use the FILE* API
anymore. So you should maybe migrate to Python 3 :-)
Yes. I will eventually. But not all the libraries I'm using are migrated yet.
--
Added file:
Larry Hastings added the comment:
p.s. Thanks for reviving the patch. I forgot about this one!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16024
___
Graham Dumpleton added the comment:
Whoops. Missed the quoting.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18020
___
___
Python-bugs-list
Ronald Oussoren added the comment:
David: your update to the FAQ looks ok to me.
I don't like updating the __setitem__ of tuple to allow setting an identical
value (that is 'a[0] = a[0]'), it is a bit too magic to my taste and hides the
real problem.
I'd slightly prefer my idea: update the
Mark Dickinson added the comment:
it is a bit too magic to my taste and hides the real problem.
Agreed. I do wonder whether there's a solution that allows the operation to
succeed, though.
--
___
Python tracker rep...@bugs.python.org
Ronald Oussoren added the comment:
issue-17973-experimental.txt is a very crude first attempt at catching augment
assignment to an immutable LHS. On first glance the code works, but it causes
problems in the test suite and hence isn't correct yet. The generated code also
isn't optimal, the
Ronald Oussoren added the comment:
Allowing the operation to succeed wouldn't be right, you are assigning to an
immutable location after all.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17973
Mark Dickinson added the comment:
Unfortunately, I don't think the checking first approach can work either: in
the case where the object *does* accept assignments, it will now be assigned to
twice. If there are side-effects from those assignments, then that will change
behaviour.
An
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18011
___
___
Python-bugs-list
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17973
___
___
Amaury Forgeot d'Arc added the comment:
what if we try the assignment, and catch TypeError only if __iadd__ returned
self?
--
nosy: +amaury.forgeotdarc
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17973
Roundup Robot added the comment:
New changeset 5e0c56557390 by Charles-Francois Natali in branch 'default':
Issue #17914: Add os.cpu_count(). Patch by Yogesh Chaudhari, based on an
http://hg.python.org/cpython/rev/5e0c56557390
--
nosy: +python-dev
Eli Bendersky added the comment:
Yes, it doesn't seem that expat cares too much about propagating errors from
every single handler. Digging in its code comments, it says that even when
XML_StopParser is called, some event handlers (like the one for end element)
may still be called since
Charles-François Natali added the comment:
Alright, committed.
Yogesh, thanks for the patch!
I'm attaching a patch to replace several occurrences of
multiprocessing.cpu_count() by os.cpu_count() in the stdlib/test
suite.
--
Added file:
Eli Bendersky added the comment:
TreeBuilder is an interface users can implement. As such, 'tag' is a
convenience the user-defined tree builder can use, as in:
class Target(object):
def start(self, tag, attrib):
print('i see start', tag)
def end(self, tag):
print('i
STINNER Victor added the comment:
In my patch cpu_count.patch, I changed posix_cpu_count():
* rewrite Mac OS X implementation: code in 5e0c56557390 looks wrong. It gets a
MIB but then don't use it when calling _bsd_cpu_count(). But I didn't check my
patch nor the commit version on Mac OS X.
New submission from Madison May:
The links at http://docs.python.org/devguide/documenting.html#building-doc and
http://docs.python.org/devguide/docquality.html to
http://developer.apple.com/mac/library/documentation/UserExperience/Conceptual/APStyleGuide/APSG_2009.pdf
lead to a Page Not Found
Eli Bendersky added the comment:
In 3.3+ there's no distinction between wide and narrow builds. Does anyone know
how this should be affected? [I don't know much about unicode and encodings,
unfortunately]
--
___
Python tracker
Eli Bendersky added the comment:
The ET docs have been significantly revamped in 3.3
I don't think cET needs to be documented. It's just confusing.
--
resolution: - wont fix
stage: commit review - committed/rejected
status: open - closed
___
Python
Changes by Madison May madison@students.olin.edu:
--
type: enhancement - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18021
___
___
Serhiy Storchaka added the comment:
Ping.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17900
___
___
Python-bugs-list mailing list
New submission from Serhiy Storchaka:
import quopri, email.quoprimime
quopri.decodestring(b'==41')
b'=41'
email.quoprimime.decode('==41')
'=A'
I don't see a rule about double '=' in RFC 1521-1522 or RFCs 2045-2047 and I
think quopri is wrong.
Other half of this bug (encoding '=' as '==')
Roundup Robot added the comment:
New changeset 20409786cf8e by Andrew Kuchling in branch 'default':
#17955: minor updates to Functional howto
http://hg.python.org/cpython/rev/20409786cf8e
--
nosy: +python-dev
___
Python tracker rep...@bugs.python.org
Changes by A.M. Kuchling li...@amk.ca:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17955
___
___
Changes by A.M. Kuchling li...@amk.ca:
--
stage: commit review - committed/rejected
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17955
___
___
Michael Fox added the comment:
I was thinking about this line:
end = self._buffer.find(b\n, self._buffer_offset) + 1
Might be a bug? For example, is there a unicode where one of several
bytes is '\n'? In this case it splits the line in the middle of a
character, right?
On Sun, May 19, 2013 at
Changes by Nick Coghlan ncogh...@gmail.com:
--
nosy: +ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8743
___
___
Python-bugs-list mailing
Changes by Nick Coghlan ncogh...@gmail.com:
--
nosy: +ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2226
___
___
Python-bugs-list mailing
Roundup Robot added the comment:
New changeset b363473cfe9c by R David Murray in branch '3.3':
#17973: Add FAQ entry for ([],)[0] += [1] both extending and raising.
http://hg.python.org/cpython/rev/b363473cfe9c
New changeset 6d2f0edb0758 by R David Murray in branch 'default':
Merge #17973: Add
R. David Murray added the comment:
You still have the side effect problem, as far as I can see.
I'm going to close this doc issue, if you guys do come up with some clever fix,
you can reopen it again :)
--
resolution: - fixed
stage: patch review - committed/rejected
status: open -
Nadeem Vawda added the comment:
No, that is the intended behavior for binary streams - they operate at
the level of individual byes. If you want to treat your input file as
Unicode-encoded text, you should open it in text mode. This will return a
TextIOWrapper which handles the decoding and line
Jed Brown added the comment:
Undefined variables are still a problem:
$ echo 'FROTZ = ${CFLAGS}' make.py3
$ python3
Python 3.3.1 (default, Apr 6 2013, 19:03:55)
[GCC 4.8.0] on linux
Type help, copyright, credits or license for more information.
import distutils.sysconfig
Changes by Florent Xicluna florent.xicl...@gmail.com:
--
nosy: +flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2226
___
___
Python-bugs-list
Roundup Robot added the comment:
New changeset a85ac58e9eaf by Charles-Francois Natali in branch 'default':
Issue #17914: Remove OS-X special-case, and use the correct int type.
http://hg.python.org/cpython/rev/a85ac58e9eaf
--
___
Python tracker
Amaury Forgeot d'Arc added the comment:
encoding=GBK causes a buffer overflow in PyUnknownEncodingHandler, because
the result of PyUnicode_Decode() is only 192 characters long.
Exact behavior is not defined...
--
___
Python tracker
Roundup Robot added the comment:
New changeset f9d815522cdb by Charles-Francois Natali in branch 'default':
Issue #17914: We can now inline _bsd_cpu_count().
http://hg.python.org/cpython/rev/f9d815522cdb
--
___
Python tracker rep...@bugs.python.org
Charles-François Natali added the comment:
* rewrite Mac OS X implementation: code in 5e0c56557390 looks wrong. It
gets a MIB but then don't use it when calling _bsd_cpu_count(). But I didn't
check my patch nor the commit version on Mac OS X.
Indeed.
I just removed the OS-X special case
Mark Lawrence added the comment:
I've attached a patch for Python 3 which I hope is okay as it's my first
attempt using TortoiseHg on Windows.
--
Added file: http://bugs.python.org/file30320/issue734176_py3.patch
___
Python tracker
Michael Fox added the comment:
You're right. In fact, what doesn't make sense is to be doing
line-oriented reads on a binary file. Why was I doing that?
I do have another quibble though. The open() function is like this:
open(file, mode='r', buffering=-1, encoding=None,
errors=None,
Michael Fox added the comment:
I thought of an even more hazardous case:
if compression == 'gz':
import gzip
open = gzip.open
elif compression == 'xz':
import lzma
open = lzma.open
else:
pass
On Mon, May 20, 2013 at 9:41 AM, Michael Fox rep...@bugs.python.org wrote:
Roundup Robot added the comment:
New changeset 12cbb5183d98 by Charles-Francois Natali in branch 'default':
Issue #17917: Use PyModule_AddIntMacro() instead of PyModule_AddIntConstant()
http://hg.python.org/cpython/rev/12cbb5183d98
--
nosy: +python-dev
Roundup Robot added the comment:
New changeset 9cfaefa58bdc by Charles-Francois Natali in branch 'default':
Issue #17684: Fix some test_socket failures due to limited FD passing support
http://hg.python.org/cpython/rev/9cfaefa58bdc
--
nosy: +python-dev
Serhiy Storchaka added the comment:
Wrapping a raw LZMAFile in a BufferedReader is a simple solution. But I think
about extending BufferedReader so that LZMAFile and BufferedReader could use a
common buffer. Perhaps add a new method to BufferedIOBase which will be called
when a buffer is
Michael Fox added the comment:
I thought about it some more and the only bug here is mine, failing to
explicitly set mode='rt'.
Maybe back when someone invented text and binary modes they should
have been clear which was to be the default for all things. Maybe when
someone made the base class,
Charles-François Natali added the comment:
Committed, thanks!
--
resolution: - fixed
stage: - committed/rejected
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17684
___
Changes by Charles-François Natali cf.nat...@gmail.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17684
___
___
Charles-François Natali added the comment:
Here's a patch.
Note that I had to adapt test_socket (which was passing bytes).
--
components: +Library (Lib)
keywords: +needs review
stage: - patch review
type: - behavior
Added file: http://bugs.python.org/file30321/af_unix_str.diff
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +doko
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13146
___
___
Python-bugs-list mailing
Serhiy Storchaka added the comment:
Oh, I forgot about bytes.fromhex(). This of course looks better than
base64.b16decode((...).replace(' ', '')).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17868
Changes by Jeff Hardy jdha...@gmail.com:
--
nosy: +jeff.hardy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17994
___
___
Python-bugs-list mailing
Changes by Guido van Rossum gu...@python.org:
--
nosy: -gvanrossum
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17683
___
___
Python-bugs-list
Antoine Pitrou added the comment:
Looks fine to me :-)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17683
___
___
Python-bugs-list mailing
Terry J. Reedy added the comment:
3.3 shifted the wide-build problem to all builds ;-). I now get
File C:\Python\mypy\tem.py, line 4, in module
xmlet.fromstring(s)
File C:...33\lib\xml\etree\ElementTree.py, line 1356, in XML
parser.feed(text)
File string, line None
New submission from Anselm Kruis:
The file Tools/msi/uuids.py contains the product codes for all recently
released Python 2.x versions except 2.7.5. Without this code it is not possible
to recreate the MSI installer using Tools\msi\msi.py.
The product code of
Changes by Brian Curtin br...@python.org:
--
assignee: - loewis
components: -Build
nosy: +loewis
type: compile error - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18023
___
New submission from Kristofer Wempa:
I recently built a new version of our Linux tools using Python 2.7.5 on our
SLES11SP2 server. Afterwards, I noticed that the dbm module was not built
successfully. The Python build did not fail and the failed module build
summary at the end of the build
Alexandre Vassalotti added the comment:
The patch looks good to me. So go ahead and submit it. :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17900
___
Thomas Fenzl added the comment:
I also looked into creating a patch and now I'm not convinced about the
solution.
While os.path.join accepts an empty string, the functions is os (e.g. stat and
friends, utime, chown don't. os.walk doesn't throw an Exception, but generates
an empty iterator
Serhiy Storchaka added the comment:
And here is a fix.
--
assignee: - serhiy.storchaka
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file30322/marshal_bad_reader.patch
___
Python tracker rep...@bugs.python.org
New submission from Serhiy Storchaka:
BufferedIOBase.readinto() overflows output buffer if read() returns more data
than requested. Here is a patch.
See also related issue17872.
--
assignee: serhiy.storchaka
components: Extension Modules, IO
files: bufferedio_buffer_overflow.patch
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17900
___
___
Kristofer Wempa added the comment:
Some more information:
The libndbm.so is not a library but some sort of ld script. It has the
following content:
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
GROUP (
New submission from Jakub Wilk:
http://docs.python.org/3/library/ctypes.html#finding-shared-libraries reads:
If wrapping a shared library with ctypes, it may be better to determine the
shared library name at development type, and hardcode ...
Shouldn't that be ... at development time, ...?
Serhiy Storchaka added the comment:
PyUnknownEncodingHandler gets an encoding name and fills a special XML_Encoding
structure which expat parser uses for decoding. Currently
PyUnknownEncodingHandler works only with 8-bit encodings and I don't see an
efficient method how extent it to handle
New submission from Jakub Wilk:
Currently distutils accesses stat_result timestamps like this:
os.stat(source)[ST_MTIME]
But, for compatibility with older Python versions, the above method gives you
at most 1-second resolution. It should do it like this instead:
os.stat(source).st_mtime
Charles-François Natali added the comment:
This has been fixed some time ago (I don't remember the commit though).
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 7937f5c56924 by Ned Deily in branch '2.7':
Issue #18026: fix ctypes doc typo
http://hg.python.org/cpython/rev/7937f5c56924
New changeset cac83b62b0de by Ned Deily in branch '3.3':
Issue #18026: fix ctypes doc typo
Ned Deily added the comment:
It should. Thanks!
--
nosy: +ned.deily
resolution: - fixed
stage: - committed/rejected
status: open - closed
versions: +Python 2.7, Python 3.2, Python 3.3
___
Python tracker rep...@bugs.python.org
Changes by Charles-François Natali cf.nat...@gmail.com:
--
resolution: - invalid
stage: - committed/rejected
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15523
Changes by Charles-François Natali cf.nat...@gmail.com:
--
resolution: - invalid
stage: - committed/rejected
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17525
Charles-François Natali added the comment:
It's fixed now that subprocess defaults to close_fds=True.
--
resolution: - out of date
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Barry A. Warsaw added the comment:
Proposed patch for 2.7
--
Added file: http://bugs.python.org/file30324/13146-2.7.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13146
___
Barry A. Warsaw added the comment:
I'm re-opening this because I'd like to get RM pronouncement on applying a
patch to 2.7, 3.2, and 3.3 to make py_compile.py atomically rename its pyc/pyo
file.
Attached is a patch for 2.7 based on importlib's approach in 3.4. It should be
easy enough to
Barry A. Warsaw added the comment:
Oh btw, if Georg and Benjamin deny this for the stable releases, I'll very
likely patch the Ubuntu versions anyway.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13146
Antoine Pitrou added the comment:
I'm re-opening this because I'd like to get RM pronouncement on
applying a patch to 2.7, 3.2, and 3.3 to make py_compile.py atomically
rename its pyc/pyo file.
Some people already complained about this change. I'm not sure it's fit
for a bugfix release.
Barry A. Warsaw added the comment:
On May 20, 2013, at 09:52 PM, Antoine Pitrou wrote:
Some people already complained about this change. I'm not sure it's fit for a
bugfix release. http://bugs.python.org/issue17222
Yeah, but that's a crazy use case. :)
Besides, you can just also make
Charles-François Natali added the comment:
IIRC, os.rename() will fail on Windows if the target file already exists.
That's why os.replace() was added.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13146
Antoine Pitrou added the comment:
IIRC, os.rename() will fail on Windows if the target file already
exists.
Good point.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13146
___
Barry A. Warsaw added the comment:
On May 20, 2013, at 09:57 PM, Charles-François Natali wrote:
IIRC, os.rename() will fail on Windows if the target file already exists.
That's why os.replace() was added.
Ah, that's probably a more serious blocker for adding it to upstream Python.
Not so for
Changes by Terry J. Reedy tjre...@udel.edu:
Removed file: http://bugs.python.org/file30264/idletests.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15392
___
Charles-François Natali added the comment:
The workaround would be to unlink the file first, and then try to
create it with O_EXCL. You have a short window where there's no file,
but that shouldn't be a problem in this specific case, and it would
work on Windows.
As for issue #17222, well, many
Roundup Robot added the comment:
New changeset 9a2eea6fffee by Vinay Sajip in branch '3.3':
Issue #17744: Now unset VIRTUAL_ENV environment variable when deactivating.
http://hg.python.org/cpython/rev/9a2eea6fffee
New changeset e29533c8ec66 by Vinay Sajip in branch 'default':
Closes #17744:
Roundup Robot added the comment:
New changeset 66c87d2b3435 by Vinay Sajip in branch '3.3':
Issue #17743: Now use extended syntax of set command in .bat files.
http://hg.python.org/cpython/rev/66c87d2b3435
New changeset 96c842873c30 by Vinay Sajip in branch 'default':
Closes #17743: Merged fix
Matt Bryant added the comment:
I did a few more tests and am seeing the same speed differences Florent noticed.
It seems reasonable to use .replace() instead, as it does the same thing
significantly faster.
I've attached a patch doing just this.
--
keywords: +patch
nosy: +Teh Matt
Terry J. Reedy added the comment:
Problem solved at least for me with a new patch:
D:\Python\dev\py33\PCbuild python_d -m test test_idle
[1/1] test_idle
Warning -- os.environ was modified by test_idle
1 test altered the execution environment:
test_idle
... python_d -m test
...
[154/373/2]
Terry J. Reedy added the comment:
I will delete 'sim' as an abbreviation for 'support import module'.
Does this otherwise seem ready to apply? This time I am really sure it works
here, because I ran the 2 tests twice each and cut and pasted the evidence.
--
stage: patch review - commit
William Moreno added the comment:
Thank's a lot by answered me, I am now at FreeBSD team in order to fix this
issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18008
___
Giampaolo Rodola' added the comment:
Mmm I'm not sure how to do this properly.
Apparently it seems I can:
--- a/Lib/plat-freebsd8/regen
+++ b/Lib/plat-freebsd8/regen
@@ -1,3 +1,3 @@
#! /bin/sh
set -v
-python ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
+python
Giampaolo Rodola' added the comment:
Nevermind, it seems changing regen is not necessary. Patch is in attachment.
--
keywords: +patch
Added file: http://bugs.python.org/file30327/AF_LINK.patch
___
Python tracker rep...@bugs.python.org
Guilherme Simões added the comment:
I'm having the same problem as Todd when I apply the patch in my Mac... I have
no idea why though.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15392
Roundup Robot added the comment:
New changeset 5ae830ff6d64 by Roger Serwy in branch '2.7':
#14146: Highlight source line while debugging on Windows.
http://hg.python.org/cpython/rev/5ae830ff6d64
New changeset 3735b4e0fc7c by Roger Serwy in branch '3.3':
#14146: Highlight source line while
Roger Serwy added the comment:
I committed the Tk workaround for the Windows platform. I'm leaving this issue
as pending with a resolution of later in case Tk developers address the bug
report mentioned in msg185632.
If anyone else wishes to close it, feel free.
--
resolution: -
Serhiy Storchaka added the comment:
I can propose only raise a specialized exception instead of general
xml.etree.ElementTree.ParseError. Here is a patch. It also fixes a buffer
overread bug mentioned by Amaury.
--
components: +Extension Modules, Unicode, XML -Library (Lib)
keywords:
Roger Serwy added the comment:
issue_17511_FindNext_rev1.patch keeps the find dialog open and changes the
button from Find to Find Next. The applied patch from #14146 corrects the
selection tag highlighting issue.
--
Added file:
1 - 100 of 104 matches
Mail list logo