Mark Lawrence added the comment:
This can now be closed as out of date.
--
components: +Windows
nosy: +steve.dower, tim.golden, zach.ware
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11097
New submission from Zygmunt Krynicki:
Hey.
I'm the upstream developer of padme https://github.com/zyga/padme -- the mostly
transparent proxy class for Python. While working on unit tests for proxying
numeric methods I realized that there are a few bugs in the mock library.
The bug I'd like
Nick Coghlan added the comment:
__new__ is a little weird - it's actually special cased as a staticmethod.
Your questions is still valid, though.
For existing versions, documenting the requirement is the only option.
For future versions, we could conceivably implement a decorate it if it
Serhiy Storchaka added the comment:
If the patch has a significant overhead: _Py_CheckFunctionResult() may be
marked to be inlined, and PyCFunction_Call() and PyObject_Call() checks may
be marked as unlikely using GCC __builtin_expect(), something like:
Could you please open separate issue
Changes by Nikita Kovaliov nik...@maizy.ru:
--
nosy: +maizy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13697
___
___
Python-bugs-list mailing
Roumen Petrov added the comment:
STINNER Victor wrote:
[SNIP]I attach hang2.py which doesn't force the Python implementation
of RLock.[SNIP]
Ok. Fine with me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13697
STINNER Victor added the comment:
support_leap_seconds.patch: different approach, accept second=60. Problem:
fromtimestamp() returns the wrong day.
haypo@smithers$ ./python
Python 3.5.0a1+ (default:760f222103c7+, Mar 3 2015, 15:36:36)
import datetime
datetime.datetime(2012, 6, 30, 23, 59,
Changes by Doug Hellmann doug.hellm...@gmail.com:
--
nosy: +doughellmann
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23574
___
___
Changes by Steve Dower steve.do...@microsoft.com:
--
resolution: - out of date
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11097
___
STINNER Victor added the comment:
Oh, mktime() returns the same timestamp with and without the leap second:
time.mktime((2012, 6, 30, 23, 59, 59, -1, -1, -1))
1341093599.0
time.mktime((2012, 6, 30, 23, 59, 60, -1, -1, -1))
1341093600.0
time.mktime((2012, 7, 1, 0, 0, 0, -1, -1, -1))
STINNER Victor added the comment:
Ignoring leap seconds introduces unexpected result.
datetime.timestamp - datetime.fromtimestamp drops one second:
$ ./python
Python 3.5.0a1+ (default:760f222103c7+, Mar 3 2015, 15:36:36)
t=datetime.datetime(2012, 6, 30, 23, 59, 60).timestamp()
Martin Panter added the comment:
Aha! So perhaps Windows can accept a small amount of data into its pipe buffer
even if we know the pipe has been broken. That kind of makes sense. Test case
could be modified to:
proc = subprocess.Popen([...], bufsize=support.PIPE_MAX_SIZE,
Yassine ABOUKIR added the comment:
I am not quiet sure about the first proposal but I strongly believe the
appropriate method to fix this is by checking if the path starts with double
slashes and then URL encoding the two leading slashes.
--
___
New submission from Simon Hoinkis:
MIPS64 needs ffi's n32.S linking in for _ctypes to work otherwise build errors
will occur (e.g. python-setuptools).
--
components: ctypes
files: mips64.patch
keywords: patch
messages: 237150
nosy: Simon Hoinkis
priority: normal
severity: normal
Serhiy Storchaka added the comment:
I don't see a difference between buffered file and Popen object. Both are
useless
after closing, both can raise an exception when flush a buffer on closing. Why
suppress an exception in one case but not in other? I think this question
needs wider
Serhiy Storchaka added the comment:
New patch to fix the bug seen by Serhiy.
I thought about different solution:
try:
if input:
self.stdin.write(input)
finally:
self.stdin.close()
But your approach looks working too,
--
STINNER Victor added the comment:
I thought about different solution:
Your solution is different: I would prefer to also ignore broken pipe errors on
close(). I'm not sure that close() can raise a BrokenPipeError in practice.
--
___
Python tracker
STINNER Victor added the comment:
2015-03-03 13:49 GMT+01:00 Serhiy Storchaka rep...@bugs.python.org:
If the patch has a significant overhead: _Py_CheckFunctionResult() may be
marked to be inlined, and PyCFunction_Call() and PyObject_Call() checks may
be marked as unlikely using GCC
Serhiy Storchaka added the comment:
Your solution is different: I would prefer to also ignore broken pipe errors
on close(). I'm not sure that close() can raise a BrokenPipeError in
practice.
Of course all this code should be inside try/except block that ignores a
BrokenPipeError.
Antoine Pitrou added the comment:
This bug has existed for ages. People who want sane behaviour should just
switch to Python 3. Closing.
--
resolution: - rejected
stage: needs patch - resolved
status: open - closed
___
Python tracker
STINNER Victor added the comment:
The attached test script demonstrates the issue on Python 2.6 and 3.2, and
code inspection suggests this is still valid for 2.7 and 3.4.
I disagree that Python 3.4 is affected: RLock has been reimplemented in C in
Python 3.2. Only the Python implementation
Jan Kratochvil added the comment:
It even crashes applications due to pollution of dynamic symbols namespace by
application symbols as seen in:
https://bugzilla.redhat.com/show_bug.cgi?id=1198158
--
___
Python tracker rep...@bugs.python.org
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
assignee: docs@python - ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23512
___
New submission from Alex Shkop:
These tests increase coverage of wsgiref.validate module. They test
InputWrapper and ErrorWrapper used to validate env['wsgi.input'] and
env['wsgi.errors'].
--
components: Tests
files: wsgiref_test_wrappers.patch
keywords: patch
messages: 237152
nosy:
Isaac Schwabacher added the comment:
From the OP:
This was reported at [1] and originally at [2]. The readline maintainer
suggests [3] using:
rl_variable_bind (enable-meta-key, off);
which was introduced in readline 6.1. Do you think it'd be safe to add the
above line?
From
New submission from Cory Benfield:
Initially reported on the requests bug list at
https://github.com/kennethreitz/requests/issues/2467
In cases when a remote web server sends a non-chunked response that does not
have a content length, it is possible to get http.client to hang on a read. To
New submission from Alistair Lynn:
In this example:
struct.pack('!', 0x5FFF, 0x6FFF, 0x7FFF, 0x8FFF)
Python errors that the 'h' format requires -32768 = number = 32767, but it
does not indicate which of the arguments is at fault. In this contrived example
it's clearly the fourth one,
Isaac Schwabacher added the comment:
Whoops, that's 0x0601. Though Maxime gives evidence that the version should in
fact be 0x0603. (Note that while OS X ships with libedit over libreadline,
anyone who wants to can install the real thing instead of that pale imitation;
the test would have
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23563
___
Roundup Robot added the comment:
New changeset 461afc24fabc by Serhiy Storchaka in branch 'default':
Issue #23563: Optimized utility functions in urllib.parse.
https://hg.python.org/cpython/rev/461afc24fabc
--
nosy: +python-dev
___
Python tracker
Changes by Zachary Salzbank z...@key.me:
--
nosy: +Zachary Salzbank
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23576
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
The test doesn't hurt.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23367
___
___
Python-bugs-list mailing
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: +demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23576
___
___
Serhiy Storchaka added the comment:
With optimizations in issue23563 and weaken IPv6 check the implementation of
urlsplit() can be faster.
$ ./python -m timeit -s from urllib.parse import urlparse, clear_cache --
urlparse('http://python.org:80'); clear_cache()
1 loops, best of 3: 86.3
New submission from Edrie Ddrie:
Keywords:easy
Priority: normal
--
assignee: docs@python
components: Documentation
messages: 237160
nosy: Edrie Ddrie, docs@python
priority: normal
severity: normal
status: open
title: Amazon.com links
type: enhancement
versions: Python 3.4
Hammerite added the comment:
Here is a better patch that includes the changes to unicodedata.h
The problem before was that the diff tool can't cope with line ending
differences. I just fixed the line endings manually.
--
Added file: http://bugs.python.org/file38323/quick_check_2.patch
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +amaury.forgeotdarc, belopolsky, doko, meador.inge
stage: - patch review
versions: +Python 3.4, Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23575
Antoine Pitrou added the comment:
If the mentioned books have official Web sites we could use a link to them.
Feel free to submit a patch.
--
nosy: +pitrou
versions: +Python 2.7, Python 3.5
___
Python tracker rep...@bugs.python.org
Charles-François Natali added the comment:
@Victor: please commit.
Would be nice to have a test for it;
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23285
___
Paul McMillan added the comment:
While some websites may use urlunparse(urlparse(url)) to validate a url, this
is far from standard practice. Django, for instance, does not use this method.
While I agree we should clean this behavior up, this is not a vulnerability in
core python, and we need
Robert Collins added the comment:
Ok, all changes applied, lets see how this looks to folk.
--
Added file: http://bugs.python.org/file38324/issue17911-5.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net:
--
nosy: +piotr.dobrogost
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23576
___
___
Edrie Ddrie added the comment:
There a links to Amazon in the official documentation.
(In Python 3.4 in the tkinter.html and othergui.html)
It's not right to advertise for a certain business.
When will the official documentation guide people to eat at MacDonalds ?
I is a sign of a low moral.
A
New submission from Edrie Ddrie:
Keywords: easy
Priority: normal
--
assignee: docs@python
components: Documentation
messages: 237161
nosy: Edrie Ddrie, docs@python
priority: normal
severity: normal
status: open
title: Amazon.com links
type: enhancement
versions: Python 3.4
Roundup Robot added the comment:
New changeset cb5fe8cc60eb by Serhiy Storchaka in branch '2.7':
Issue #23504: Added an __all__ to the types module.
https://hg.python.org/cpython/rev/cb5fe8cc60eb
New changeset 4888f9498db6 by Serhiy Storchaka in branch '3.4':
Issue #23504: Added an __all__ to
Changes by Ned Deily n...@acm.org:
--
nosy: +mark.dickinson, meador.inge
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23578
___
___
Antoine Pitrou added the comment:
Reproducing seems a bit irregular. Note that the last bytestring (the empty
bytestring) is what takes time to read.
Also note that HTTPResponse is a buffered I/O object, so normally you don't
need to read up to the empty string. You can stop when you got less
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: commit review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23504
___
Antoine Pitrou added the comment:
Varying reproduceability may have to do with sleepy-reaches-6892.herokuapp.com
resolving to different endpoints (that domain name has a stupidly small TTL, by
the way).
Anyway, for an unknown reason the following patch seems to fix the issue.
--
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
resolution: - duplicate
status: open - closed
superseder: - Amazon.com links
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23580
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23579
___
___
Python-bugs-list
Changes by Ned Deily n...@acm.org:
--
nosy: +michael.foord, rbcollins
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23568
___
___
Python-bugs-list
Ned Deily added the comment:
Thanks for the report, however, per our support policy, Python 3.3 is now open
only for security fixes for the remainder of its support window.
--
nosy: +ned.deily
resolution: - wont fix
stage: - resolved
status: open - closed
Changes by Robert Collins robe...@robertcollins.net:
Added file: http://bugs.python.org/file38325/issue17911-6.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17911
___
Changes by Ned Deily n...@acm.org:
--
nosy: +michael.foord, rbcollins
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23310
___
___
Python-bugs-list
Berker Peksag added the comment:
LGTM.
--
nosy: +berker.peksag
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23504
___
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22933
___
___
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +lukasz.langa
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23572
___
___
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23568
___
___
Changes by R. David Murray rdmur...@bitdance.com:
--
stage: commit review - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15795
___
Berker Peksag added the comment:
I think it is worth to be applied to maintained releases.
I'd commit this only to the default branch. Changing the return value from None
to an exception after three 3.4 bugfix releases(3.4.1, 3.4.2 and 3.4.3 -- also
since 3.4.3 was released in Feb 2015,
Berker Peksag added the comment:
LGTM
--
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23400
___
___
Changes by Berker Peksag berker.pek...@gmail.com:
--
nosy: +berker.peksag, pje
stage: - patch review
type: - enhancement
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23577
R. David Murray added the comment:
Single patch, yes, but FYI we actually prefer a python3 patch against default
as the single patch. (Unless there are major differences, which there aren't
in this case.)
I've made some minor review comments. You can either ack my changes (or
disagree :)
Changes by Carlo Beccarini hackdiablo...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file38316/issue23512.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23512
___
Roumen Petrov added the comment:
hmm issue still exist in master branch.
Lets wait python 4 for sane behaviour.
--
nosy: +rpetrov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13697
___
Alexey Boriskin added the comment:
I'm working on updating the patch to unify tarfile and zipfile interfaces and
to restore owner/timestamp for zipfile
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15795
STINNER Victor added the comment:
hmm issue still exist in master branch.
For the third time, only the Python implementation has the bug, and it's not
used by default. So the bug was fixed in Python 3 since 3.2. It's time to
upgrade guys ;-)
--
New submission from Serhiy Storchaka:
Currently str.find() and similar methods can make a copy of self or searched
string if they have different kinds. In some cases this is redundant because
the result can be known before trying to search. Longer string can't be found
in shorter string and
Thomas Petazzoni added the comment:
@Mark I would be happy to, but if you refer to the previous discussion about
this bug report, the feedback was quite negative. And since I'm not really
willing to do some clean up to finally get the patches rejected, I'd like to at
least have 1/ an
STINNER Victor added the comment:
I opened the issue #23570: Change with subprocess.Popen(): (context manager)
to ignore broken pipe error.
FAIL: test_broken_pipe_cleanup (test.test_subprocess.ContextManagerTests)
Serhiy: see existing test_communicate_epipe() and
Martin Panter added the comment:
I left some minor comments on the documentation.
As a side effect of your rearranging of _stdin_write(), I think it would fix
the bug with communicate() leaking a BrokenPipeError and leaving a zombie when
there is less than a buffer’s worth of data to send.
Cyd Haselton added the comment:
Ryan,
Sounds good. I think I've got all of the bug tracker patches
committed/pushed...now I need to do all of the other edits. Aiming to be
finished by Friday/Saturday.
--
___
Python tracker rep...@bugs.python.org
New submission from STINNER Victor:
Attached patch changes PyObject_Call() and PyCFunction_Call() to raise a
SystemError and destroy the result (Py_DECREF) if a function returns a result
with an exception set.
I also refactored PyCFunction_Call() and added assert(!PyErr_Occurred()); at
the
Changes by STINNER Victor victor.stin...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file38312/check_result.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23571
Serhiy Storchaka added the comment:
Do you want to modify IOBase.__exit__ to ignore I/O errors in close()? I think
such changes should be discussed in Python-Dev.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23570
Serhiy Storchaka added the comment:
Could you provide a patch Martin?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21619
___
___
STINNER Victor added the comment:
Do you want to modify IOBase.__exit__ to ignore I/O errors in close()?
Nope. On files, you want to want to know if your data has been fully written.
For a subprocess, it's different. You only expect best effort.
The BrokenPipeError exception is raised by
STINNER Victor added the comment:
I would be safer to use a bufsize a little bit larger :-)
proc = subprocess.Popen([...], bufsize=support.PIPE_MAX_SIZE * 2,
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
...
proc.stdin.write(b'x' * support.PIPE_MAX_SIZE)
--
STINNER Victor added the comment:
New patch to fix the bug seen by Serhiy.
Anyway, we closed all pipes
Oh, I forgot to explain that TextIOWrapper.close() closes the buffered file
even if flush() raised an exception. BufferedWriter.close() does the same.
So stdin.close() always closes the
New submission from Sergio Pascual:
I admit this case is rather convoluted, but I have been debugging a few hours
so I think I should share my findings.
I have a metaclass MetaA that provides to the classes constructed with it have
a dictionary interface. Of all the functions only __len__ is
Changes by Zygmunt Krynicki zygmunt.kryni...@canonical.com:
--
title: unittest.mock.MagicMock doesn't support __rdivmod__t -
unittest.mock.MagicMock doesn't support __rdivmod__
___
Python tracker rep...@bugs.python.org
New submission from Zygmunt Krynicki:
Hey.
I'm the upstream developer of padme https://github.com/zyga/padme -- the mostly
transparent proxy class for Python. While working on unit tests for proxying
numeric methods I realized that there are a few bugs in the mock library.
The bug I'd like
Changes by Zygmunt Krynicki zygmunt.kryni...@canonical.com:
--
type: - behavior
versions: +Python 3.3 -Python 3.4, Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23568
___
New submission from STINNER Victor:
The Popen.communicate() method ignores broken pipe error when writing to stdin.
I propose to modify Popen.__exit__() to do the same in Python 3.5.
Attached patch implements this suggestion and document it. I added this
paragraph to Popen doc:
The context
Roumen Petrov added the comment:
STINNER Victor wrote:
For the third time, only the Python implementation has the bug, and
it's not used by default. So the bug was fixed in Python 3 since 3.2.
It's time to upgrade guys ;-)
Did you mean to downgrade? Tested with Python 3.5.0a1+ (default, Feb
Changes by STINNER Victor victor.stin...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file38317/datetime_leapsecond.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23574
New submission from STINNER Victor:
A leap second will be added in June 2015:
http://www.usatoday.com/story/tech/2015/01/08/computer-chaos-feares/21433363/
The datetime module explicitly doesn't support leap seconds:
https://docs.python.org/dev/library/datetime.html#datetime.date.fromtimestamp
STINNER Victor added the comment:
Leap seconds are ignored, so a difference of datetime before the leap second
and datetime with the leap second is zero:
import datetime
t1=datetime.datetime(2012, 6, 30, 23, 59, 59)
t2=datetime.datetime(2012, 6, 30, 23, 59, 59)
t2-t1
datetime.timedelta(0)
STINNER Victor added the comment:
Did you mean to downgrade? Tested with Python 3.5.0a1+ (default, Feb 28
2015, 09:49:09)
Please make some effort to try to understand the issue.
I attach hang2.py which doesn't force the Python implementation of RLock. You
might try hang2.py on Python 2 and
90 matches
Mail list logo