Thomas Lee added the comment:
I know this is an old-ish issue, but I can't reproduce anything like this on
Debian Wheezy with either Python 2.7 or tip (3.x). I think we need more details
of what you're trying to do here Roger.
1. What exactly did you do to reproduce the strace output below?
Thomas Lee added the comment:
My results aren't quite as dramatic as yours, but there does appear to be a
regression:
$ ./python -V
Python 2.7.3+
$ ./python -m timeit -s s = 'b'*1000 s.replace('b', 'a')
10 loops, best of 3: 16.5 usec per loop
$ ./python -V
Python 3.3.0rc3+
$ ./python -m
Thomas Lee added the comment:
Thanks ABR. You may be better off raising a ticket against requests
(https://github.com/kennethreitz/requests).
I'm assuming what you want to happen here is for the session.post() call to
return the 401 response without raising an exception. Perfectly reasonable,
Thomas Lee added the comment:
FWIW, I think Mark's right here. I'm +1 on the implementations being consistent.
Seems like a potentially nasty surprise if you move from one implementation to
the other and, lacking awareness of this quirk, design your algorithm around
semantics. I think this
New submission from Glenn Linderman:
I've been using 3.3.0b1 for development, with mostly no problems, but today I
was surprised and confused by an error message. It is an attempt to be an
improvement over 3.2, giving the filename that os.rename cannot find... but
instead, it gives the one it
Roundup Robot added the comment:
New changeset 9205277bc008 by Chris Jerdonek in branch '3.2':
Issue #16036: Improve documentation of built-in int()'s signature and arguments.
http://hg.python.org/cpython/rev/9205277bc008
New changeset 6ccb04c4cbae by Chris Jerdonek in branch 'default':
Issue
Chris Jerdonek added the comment:
Leaving open until the change is made in 2.7 (the current wording is somewhat
different there). I will do that in the next day or so.
--
versions: +Python 2.7
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
Python 3.3 is 2x faster than Python 3.2 to replace a character with
another if the string only contains the character 3 times. This is not
acceptable, Python 3.3 must be as slow as Python 3.2!
$ python3.2 -m timeit ch='é'; sp=' '*1000; s = ch+sp+ch+sp+ch;
New submission from Chris Jerdonek:
When pushing commits to hg.python.org, I got the following error re: the
incoming.cia hook:
$ hg push ssh://h...@hg.python.org/cpython
pushing to ssh://h...@hg.python.org/cpython
searching for changes
remote: adding changesets
remote: adding manifests
Jesús Cea Avión added the comment:
Serhiy, I wonder how you found this :)
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16060
___
Georg Brandl added the comment:
Looking at http://cia.vc/, it seems like CIA is dead for now. I've disabled
the CIA hook on all hg.p.org repos.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
Alexander Martin added the comment:
The successful script execution was run under Python 2.7.3 (as of today one of
the two as production version labeled releases). The initial report's
reference to Python 2.7.2 was made by mistake.
May anyone confirm this error behaviour on Python production
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16001
___
___
Python-bugs-list mailing list
New submission from Einar Fløystad Dørum:
The xml.etree.ElementTree.Element class is no longer pickleable in Python
3.3.0rc3 .
This is a regression from Python 3.2 where the Element class was pickleable,
while the xml.etree.cElementTree.Element was not. So this is probably related
to
New submission from Chris Jerdonek:
Date: Thu, 6 Sep 2012 20:38:21 +0800
To: d...@python.org
Subject: [docs] There is bug about the built-in function reduce in the
document
I found a bug in the document about reduce :
http://docs.python.org/library/functions.html#reduce
Here is
Chris Jerdonek added the comment:
It looks like the offending line is here:
http://hg.python.org/cpython/file/6ccb04c4cbae/Lib/unittest/__main__.py#l5
if sys.argv[0].endswith(__main__.py):
sys.argv[0] = python -m unittest
--
nosy: +chris.jerdonek
Larry Hastings added the comment:
Certainly. But what is the right thing to do?
I talked to Michael about it in person this morning, and our consensus was: use
basename of sys.executable.
Patch attached.
--
keywords: +patch
stage: needs patch - patch review
Added file:
Jesús Cea Avión added the comment:
Pavel, I think the FFI we use is a direct copy of libffi. Could you contact
upstream?.
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16050
Michele Orrù added the comment:
# Internal appears only in HTMLParser's methods; how could __all__ fix this?
--
nosy: +maker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14679
___
Serhiy Storchaka added the comment:
Serhiy, I wonder how you found this :)
I just looked at the code for issue16036.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16060
___
Serhiy Storchaka added the comment:
Indeed.
Will probably want to add an example with 1-element sequence for
functools.reduce in Doc/howto/functional.rst.
--
nosy: +storchaka
___
Python tracker rep...@bugs.python.org
Changes by Serhiy Storchaka storch...@gmail.com:
--
components: +XML
keywords: +3.3regression
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16076
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +eli.bendersky, storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16076
___
___
Serhiy Storchaka added the comment:
Ping.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15953
___
___
Python-bugs-list mailing list
New submission from Sasa Banjac:
Hello!
I am using the calendar.leapdays(y1,y2) function. It should return the number
of leap years betwwen y1 and y2 (exclusive). However the function still cant
process mutliple centuries.
Example: between 1900 and 2000 we have 24 leap years:
New submission from Xavier de Gaye:
See also issue 16056 for the current list of duplicate test names in
the std lib.
The attached patch improves patchcheck.py to list duplicate test
names when running 'make patchcheck'. This patch to the default
branch can also be applied asis to the 2.7
Xavier de Gaye added the comment:
To simplify and keep the discussions more focused, etc, I would
create a new issue for the patch to patchcheck
New issue 16079 has been created.
The proposed patch in the new issue 16079 is slightly improved to
produce a cleaner output by printing the number
New submission from Manuel Pégourié-Gonnard:
Some tests, namely test_email, test_locale and test_mailbox, normally pass, but
fail if both of the following conditions are met:
- the local is fr_FR (or probably any other non-C locale)
- test_decimal is run before them
Steps to repoduce:
%
Michael Foord added the comment:
Code cleanups for their own sake sound like a good thing, *iff* the cleanup is
worthwhile (for example it makes debugging easier). i.e. the cleanup isn't
gratuitous but worthwhile.
This seems to be the case here and the rejected patch in issue #15137 had
New submission from Brian Brazil:
Please see attached patch to fix warnings about error being set but not used,
I've eliminated error except for the one function that was using it.
--
components: Interpreter Core
files: pthread-warnings.patch
keywords: patch
messages: 171432
nosy:
Changes by Einar Fløystad Dørum eina...@gmail.com:
--
components: -Library (Lib)
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16076
___
___
Peter Inglesby added the comment:
This behaviour is correct. Years divisible by 4 are leap years, except years
divisible by 100, except years divisible 400.
Source http://en.wikipedia.org/wiki/Leap_year.
--
nosy: +inglesp
___
Python tracker
New submission from Einar Fløystad Dørum:
The tostringlist documentation says Returns a list of (optionally) encoded
strings containing the XML data. It does not guarantee any specific sequence,
except that .join(tostringlist(element)) == tostring(element)..
But in reality it is possible to
New submission from Michele Orrù:
Sending a GET /\0 causes a TypeEror to be raised and the connection to be
unexpectedly closed.
$ python -m SimpleHTTPServer 8000
$ printf GET /\00 | nc localhost 8000
TypeError: must be encoded string without NULL bytes, not str
Changes by Peter Inglesby peter.ingle...@gmail.com:
--
nosy: +larry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16078
___
___
Python-bugs-list
Larry Hastings added the comment:
Agreed. Not a bug. Closing the issue.
--
resolution: - invalid
stage: - committed/rejected
status: open - closed
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16078
Peter Inglesby added the comment:
The attached patch updates the error message to:
int(base=100, x='123')
Traceback (most recent call last):
File stdin, line 1, in module
ValueError: int() base must be = 2 and = 36, or 0
--
keywords: +patch
nosy: +inglesp
Added file:
Brian Brazil added the comment:
How does the attached patch look?
I also reworded the first line to be a bit clearer, and be under 80 chars.
--
keywords: +patch
nosy: +bbrazil
Added file: http://bugs.python.org/file27329/issue15350.patch
___
Python
ABR added the comment:
If that's where the bug is. I forgot to mention this issue seems identical to
5542 (http://bugs.python.org/issue5542), but for https. The fix there was in
the underlying url/httplib.
--
___
Python tracker
Michael Foord added the comment:
So on OS X (Python 2.7 only) the following still fails:
PYTHONIOENCODING=ascii ./python.exe unicodetest.py --verbose
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10417
Changes by Michael Foord mich...@voidspace.org.uk:
--
versions: +Python 3.4 -Python 2.7, Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11798
___
Chris Jerdonek added the comment:
(I was just including the line for the convenience of anyone that might happen
to come across the issue. It was not to inform you of course! :) )
FWIW, if you already know from talking to Michael or looking at the code, I
think a comment saying why
Michael Foord added the comment:
Yes it is for nicer help output, and a comment in the code is certainly
warranted.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16064
___
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15144
___
___
Python-bugs-list mailing list
Brian Brazil added the comment:
The attached patch fixes this.
--
keywords: +patch
nosy: +bbrazil
Added file: http://bugs.python.org/file27330/issue15677.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15677
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15992
___
___
Python-bugs-list mailing list
Chris Jerdonek added the comment:
I should have said that I had started working on this issue. I think failing
tests for both messages should accompany the patch (otherwise I would have
already submitted a patch). The tricky one is the error message for
PyLong_FromString(), which I believe
Serhiy Storchaka added the comment:
Bug in the documentation, but not in the implementation.
See also issue8047 and issue1767933 (changeset 63845:57e631f088d7).
--
assignee: - docs@python
components: +Documentation
nosy: +docs@python, eli.bendersky, storchaka
versions: +Python 3.2
Chris Jerdonek added the comment:
Thanks, Andrew. I didn't look closely enough when reading the e-mail or I
wouldn't have posted. I had assumed from the e-mail that this was in the
string *method* section rather than string module.
--
___
Python
Andrew Svetlov added the comment:
No it shoudn't.
It works exactly as described:
Return a copy of string *str* with all occurrences of substring *old* replaced
by *new*. If the optional argument *maxreplace* is given, the first
*maxreplace* occurrences are replaced.
*str* is updated string and
Georg Brandl added the comment:
After encountering an instance of people relying on fragment not being parsed
for irc:// URLs, with resulting breakage, I don't think we should change this
in point releases. IOW, it's fine for 3.3.0, but not for 2.7.x or 3.2.x.
It may be fixing a bug, but the
Chris Jerdonek added the comment:
[Reopening] It looks like at least *some* change is warranted here. Notice
that all the functions document s for the string argument but
string.replace() documents str. However, we have (in 2.7):
string.replace(str='aab', old='a', new='b')
Traceback (most
Christian Heimes added the comment:
If we want to archive platform independence from the libc's strftime() and
strptime() function and its bugs, we could include our own implementation. Or
rather than writing our own code we may be able to include some working and
well tested code.
BSD's
Ezio Melotti added the comment:
If there is a list of known protocols that don't use the fragment, can't we
include it in urlparse as we already do in Lib/urlparse.py:34?
If #channel in irc://example.com/#channel should not be parsed as fragment,
then this can be considered as a regression.
Andrew Svetlov added the comment:
If you want just to change parameter name in the docs — I'm ok with that.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16072
___
Changes by Christian Heimes li...@cheimes.de:
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15992
___
___
Peter Inglesby added the comment:
Ah, sorry about that. Are you happy for me to write the test?
Poking around the C API docs suggests that I should call PyErr_Fetch() to get
the value of the a raised exception, but I can't see any precedent for this in
existing test code. Can you point me
Larry Hastings added the comment:
Michael, you're the one who came up with the feature. If you write the comment
I'll fold it into the patch.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16064
Roundup Robot added the comment:
New changeset 0362d64c783a by Michael Foord in branch '3.2':
Closes issue #12376 : Pass on parameters in unittest.TextTestResult.__init__
super call
http://hg.python.org/cpython/rev/0362d64c783a
--
nosy: +python-dev
Changes by Christian Heimes li...@cheimes.de:
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16083
___
___
Michael Foord added the comment:
unittest.mock addition is complete.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14295
Peter Inglesby added the comment:
Have attached a patch with suggested update.
Have also grepped for similar issues elsewhere in documentation, and haven't
found anything, but may have missed something.
--
keywords: +patch
nosy: +inglesp
Added file:
Changes by Michele Orrù maker...@gmail.com:
--
nosy: +exarkun
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16083
___
___
Python-bugs-list mailing
Michael Foord added the comment:
Fixed in 2.7, 3.2 and 3.3.1.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12376
Peter Russell added the comment:
Attached is a patch which adds a reference to the doseq parameter to urlencode
to the documentation for parse_qs
--
keywords: +patch
nosy: +qwertyface
Added file: http://bugs.python.org/file27331/Issue-15593.patch
Changes by Michele Orrù maker...@gmail.com:
--
nosy: -exarkun
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16083
___
___
Python-bugs-list
Chris Jerdonek added the comment:
Are you happy for me to write the test?
I had started working on that, but sure, be my guest. :)
You seem to be on the right track. I didn't find precedent nearby either. We
basically want a C version of unittest's assertRaisesRegex() (but it can be a
Georg Brandl added the comment:
Applied: d23eb81bd482.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16060
___
Andrew Svetlov added the comment:
Fixed in c34a177d1f38
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16072
Chris Jerdonek added the comment:
Attaching failing test for pure Python portion.
--
Added file: http://bugs.python.org/file27333/issue-16055-1-failing-test.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16055
Michael Foord added the comment:
UTF-16 patches are relatively unusual...
--
nosy: +michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15593
___
Georg Brandl added the comment:
People make up URL schemes all the time, irc:// is not a special case. This
change will mean breakage for them, unwarranted.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9374
Roundup Robot added the comment:
New changeset 8590e9b05069 by Michael Foord in branch 'default':
urllib.parse.urlencode doc updarte.
http://hg.python.org/cpython/rev/8590e9b05069
--
nosy: +python-dev
resolution: - fixed
stage: - committed/rejected
status: open - closed
Tim Golden added the comment:
Unfortunately this missed the boat for 3.3; I'll target 3.4 when we've got a
branch to commit to.
--
versions: +Python 3.4 -Python 3.2, Python 3.3
___
Python tracker rep...@bugs.python.org
Chris Jerdonek added the comment:
2.7 is not affected.
--
assignee: docs@python - chris.jerdonek
versions: +Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16073
___
Changes by Tim Golden m...@timgolden.me.uk:
--
assignee: tim.golden -
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6839
___
___
Python-bugs-list
Éric Araujo added the comment:
One would hope that people making up URI schemes would follow the generic
syntax (and thus irc would be an exception), but as the risk exists I agree we
should not break code in bugfix releases.
--
___
Python tracker
Arnav Khare added the comment:
Added comment explaining why we alter the executable string.
--
nosy: +Arnav.Khare
Added file: http://bugs.python.org/file27334/arnav.unittest.argv0.1.diff
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset c76f1d78ff78 by Michael Foord in branch 'default':
Closes issue 16064. No longer hard code executable name in unittest help output.
http://hg.python.org/cpython/rev/c76f1d78ff78
--
nosy: +python-dev
resolution: - fixed
stage: patch review
Michele Orrù added the comment:
Note: on python3, the error is
File /[...]/cpython/Lib/genericpath.py, line 41, in isdir
st = os.stat(s)
TypeError: embedded NUL character
(same exception but different message.)
I don't know where to start fixing, because the documentation for os.stat
Serhiy Storchaka added the comment:
+with self.assertRaises(ValueError) as e:
+int('100', 1)
+self.assertEquals(str(e.exception),
+ int() arg base must be 0 or = 2 and = 36)
Why not use assertRaisesRegex()?
Roundup Robot added the comment:
New changeset 6c96878eb729 by Chris Jerdonek in branch '3.2':
Close issue #16073: fix map() example in list comprehension documentation.
http://hg.python.org/cpython/rev/6c96878eb729
New changeset 8a4a88b1e964 by Chris Jerdonek in branch 'default':
Close issue
Roundup Robot added the comment:
New changeset 3f5fedb17a78 by Stefan Krah in branch 'default':
Issue #16080: Use run_with_locale() decorator to reset the locale properly.
http://hg.python.org/cpython/rev/3f5fedb17a78
--
nosy: +python-dev
___
Python
Chris Jerdonek added the comment:
Thanks for helping with the patch and search, Peter.
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16073
Roundup Robot added the comment:
New changeset 08aa289a757c by Jesus Cea in branch '2.7':
Closes #15953: Incorrect some fields declaration in the PyTypeObject
documentation
http://hg.python.org/cpython/rev/08aa289a757c
New changeset c87ea480ddf3 by Jesus Cea in branch '3.2':
Closes #15953:
Stefan Krah added the comment:
Thanks for the report. -- The locale wasn't properly reset in
test_wide_char_separator_decimal_point(). Should be fixed now.
--
nosy: +skrah
resolution: - fixed
stage: - committed/rejected
status: open - closed
type: - behavior
Jesús Cea Avión added the comment:
Thanks!.
--
nosy: +jcea
resolution: fixed -
stage: committed/rejected -
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15953
___
Changes by Jesús Cea Avión j...@jcea.es:
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15953
___
Stefan Krah added the comment:
Here we go. The new code fails if ps_AF isn't available.
--
resolution: fixed -
stage: committed/rejected -
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16080
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15963
___
___
Python-bugs-list mailing list
Chris Jerdonek added the comment:
It could be done that way. It just seems simpler to me to do a simple string
check when regex's aren't necessary. Then you don't have to worry about
escaping characters, etc.
--
___
Python tracker
Peter Russell added the comment:
I can confirm that the current equivalent to Mark's original test case works as
expected on default.
I recommend closing this issue.
--
nosy: +qwertyface
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
There has been some discussion about what the correct behavior of os.stat is,
as well, I think. Alex Gaynor raised a question about testing our behavior
when nulls are present.
But clearly, if the desired behavior for url processing is different from the
Georg Brandl added the comment:
Should be fixed now. The daily builds are just copied over to /dev, so removed
pages don't get removed automatically.
I could add an rm -r to the dailybuild steps, but that would cause a few
moments of missing pages for everyone browsing /dev at that moment.
Éric Araujo added the comment:
Well, here I don’t see the benefit in avoiding the use of “file”, given that
the builtin of the same name is not needed thanks to the open function
(contrary to id, type, str, string and others).
If you think our (unwritten?) policy of not doing cleanup-only
Arnav Khare added the comment:
Added a test to the patch supplied.
--
nosy: +Arnav.Khare
Added file:
http://bugs.python.org/file27335/mock_assert_called_once_with_output_update_including_test.patch
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 70d43fedb2d7 by Michael Foord in branch 'default':
Closes issue 15323. Improve failure message of Mock.assert_called_once_with
http://hg.python.org/cpython/rev/70d43fedb2d7
--
nosy: +python-dev
resolution: - fixed
stage: -
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15821
___
___
Python-bugs-list mailing list
Changes by Michele Orrù maker...@gmail.com:
Added file: http://bugs.python.org/file27337/issue16083.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16083
___
Michele Orrù added the comment:
Attaching tests that asserts the issue, and a patch for http.server.
Works on tip.
Should be ported also to 2.x?
Note: that 'f = None' is unnecessary, maybe an isolated commit for that?
--
keywords: +patch
Added file:
1 - 100 of 171 matches
Mail list logo