New submission from picomancer:
Try the following in your favorite Python version:
import json
json.loads(.5)
On my Python (2.7.4 and 3.3.1 on Ubuntu Saucy Salamander), I get an exception.
However, x = .5 is a valid Python number.
With respect to the parsing of floats by the json
New submission from Vajrasky Kok:
Attached the patch to remove unused imports in pathlib.
--
components: Library (Lib)
files: remove_unused_import_in_pathlib.patch
keywords: patch
messages: 205081
nosy: pitrou, vajrasky
priority: normal
severity: normal
status: open
title: Remove unused
New submission from Vajrasky Kok:
Here it is (Lib/test/test_pathlib.py, line 1240):
def _check_resolve_relative(self, p, expected):
q = p.resolve()
self.assertEqual(q, expected)
def _check_resolve_absolute(self, p, expected):
q = p.resolve()
Antoine Pitrou added the comment:
I think it would be better to adhere to the JSON spec, which doesn't allow
numbers to start with a decimal point:
http://json.org/
If we go this way, the documentation should at least be fixed; and, as you say,
we could also add a unit test for it.
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19871
___
___
Python-bugs-list
Changes by Mark Dickinson dicki...@gmail.com:
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19871
___
___
Anthony Baire added the comment:
The patch is fine, but it is hard to rely on it to prevent bugs from happening
because that requires cooperation from all modules registering signal handlers.
Anyway it facilitates reusing code that was not written for an event-driven
context (and many will do
Roundup Robot added the comment:
New changeset a6245b10e8b6 by Antoine Pitrou in branch 'default':
Issue #19872: remove unused imports in pathlib. Patch by Vajrasky Kok.
http://hg.python.org/cpython/rev/a6245b10e8b6
--
nosy: +python-dev
___
Python
Antoine Pitrou added the comment:
Thank you :)
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19872
___
Roundup Robot added the comment:
New changeset 1c04427fff07 by Antoine Pitrou in branch 'default':
Issue #19800: make the pickle framing tests more precise.
http://hg.python.org/cpython/rev/1c04427fff07
--
nosy: +python-dev
___
Python tracker
Antoine Pitrou added the comment:
Committed with offset replaced with pos.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19800
Antoine Pitrou added the comment:
Well, it's not really a duplicate function (the code is the same, but the
intent is different). I'm not sure it's worth deduplicating.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19873
Kristján Valur Jónsson added the comment:
Strictly speaking b) is not a semantic change. Depending on your semantic
definition of semantics. At any rate it is even less so than a) since the
temporary list is hidden from view and the only side effect is additional
memory usage.
--
Serhiy Storchaka added the comment:
Agree with Antoine.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19871
___
___
Python-bugs-list mailing
Kristján Valur Jónsson added the comment:
d), We could also simply issue a (documentation) warning, that the iterator
methods of these dictionares are known to be fragile, and recommend that people
use the keys(), values() and items() instead.
--
Antoine Pitrou added the comment:
d) sounds like a good enough resolution at this point.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7105
___
Vajrasky Kok added the comment:
These functions are only being used in test_resolve_common.
def test_resolve_common(self):
P = self.cls
p = P(BASE, 'foo')
with self.assertRaises(OSError) as cm:
p.resolve()
self.assertEqual(cm.exception.errno,
Serhiy Storchaka added the comment:
The readlink utility has different modes for canonization:
-f, --canonicalize
canonicalize by following every symlink in every component of the
given name recursively; all but the last component must exist
-e,
STINNER Victor added the comment:
SA_RESTART doesn't need to be enforced. It's better to use it, but
selectors and asyncio modules already handle EINTR error.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19850
Vinay Sajip added the comment:
Since 3.4 entered beta last week, it is now in feature freeze, so only bug
fixes are allowed, unfortunately.
Since I did the ld patch I didn't want to commit it before getting another
developer to review it, and it looks as if it just dropped under everyone's
New submission from Antoine Pitrou:
test_race in test_logging fails intermittently on the Snow Leopard buildbot:
http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/741
==
ERROR: test_race
New submission from Antoine Pitrou:
It's on the FreeBSD 10.0 buildbot:
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/1169
==
ERROR: test_getsockaddrarg (test.test_socket.GeneralModuleTests)
Vinay Sajip added the comment:
I think the test is fragile, but I'll bump the timeout as suggested.
--
nosy: +vinay.sajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19665
___
Antoine Pitrou added the comment:
I think every mode has use cases.
Probably, but which ones are the most likely? A ternary flag leads to a
clumsier API than a simple binary flag.
--
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 4c5fc9f08b4d by Vinay Sajip in branch '3.3':
Issue #19665: Increased timeout for SMTPHandler test.
http://hg.python.org/cpython/rev/4c5fc9f08b4d
New changeset bfd45dc46569 by Vinay Sajip in branch 'default':
Closes #19665: Merged fi from 3.3.
Vinay Sajip added the comment:
I think this is the same as #19690.
--
resolution: - duplicate
status: open - closed
superseder: - test_logging test_race failed with PermissionError
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
RFCs and cookies don't have much to do with each other in real life.
The 'httponly' flag bug was fixed in issue 16611.
For backward compatibility reasons we can't start raising errors where we
didn't raise them before, so if anything is going to be done it
R. David Murray added the comment:
I'm not sure why that fix was not backported, so I think it should be OK to do
so.
3.2 is in security fix only mode. No one argued that it was a securty issue
when it was fixed in 3.3.
--
nosy: +r.david.murray
Nick Coghlan added the comment:
Issue for the failure to detect a native venv:
https://github.com/pypa/pip/issues/1358
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19734
___
Nick Coghlan added the comment:
Issue for the lack of attention paid to sys.flags.ignore_environment:
https://github.com/pypa/pip/issues/1359
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19734
Changes by Nick Coghlan ncogh...@gmail.com:
--
priority: deferred blocker - release blocker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19734
___
Nick Coghlan added the comment:
Relevant pip issue: https://github.com/pypa/pip/issues/1165
--
nosy: +larry
priority: high - release blocker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19744
Nick Coghlan added the comment:
Issue 19766 covers the fact that the vendored urllib3 needs to be updated in
order to handle the case where Python is built without threading support.
--
___
Python tracker rep...@bugs.python.org
Nick Coghlan added the comment:
Upgrading to release blocker status, since we'd prefer to have everything we
can sorted before beta 2
--
nosy: +larry
priority: normal - release blocker
___
Python tracker rep...@bugs.python.org
Donald Stufft added the comment:
The urllib3 in requests VCS was updated, I just need to bother Kenneth to make
a new release of requests or update pip to an unreleased requests.
--
___
Python tracker rep...@bugs.python.org
Changes by Nick Coghlan ncogh...@gmail.com:
--
title: ensurepip should refuse to install pip if SSL/TLS is not available -
test_venv fails if SSL/TLS is not available
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19744
Vinay Sajip added the comment:
Unfortunately, the race condition can't be removed completely - it was reduced
by the patch in #14632 but could not be eliminated altogether. So this test can
fail sporadically - tweaking the timeouts might give some temporary respite,
but doesn't guarantee the
Roundup Robot added the comment:
New changeset 8fe3022af4b3 by Vinay Sajip in branch 'default':
Added some diagnostics to help with #19690.
http://hg.python.org/cpython/rev/8fe3022af4b3
--
nosy: +python-dev
___
Python tracker rep...@bugs.python.org
Mark Dickinson added the comment:
In context, the doc is correct:
parse_float, if specified, will be called with the string of every JSON float
to be decoded. By default, this is equivalent to float(num_str).
IIUC, parse_float only comes into play once the JSON source has already been
Roundup Robot added the comment:
New changeset 97fb852c5c26 by Stefan Krah in branch 'default':
Issue #9709: Stop adding PyInit_ + module_name' to export_symbols. This is
http://hg.python.org/cpython/rev/97fb852c5c26
--
nosy: +python-dev
___
Python
Nick Coghlan added the comment:
1358 (failing to detect native virtual environments) will be resolved upstream,
but for 1359 (telling pip to ignore the environment variables), I've decided I
agree with Paul's suggestion on the pip issue that it makes sense for venv to
just strip all
Stefan Krah added the comment:
Éric, thanks for taking a look.
--
resolution: - fixed
stage: commit review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9709
New submission from STINNER Victor:
I remember a discussion about EBADF, but I don't remember the conclusion. The
documentation of the asyncio doesn't explain the behaviour of selectors when a
file/socket is closed, without unregistering it from the selector.
I should be explicitly
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net:
--
nosy: +piotr.dobrogost
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19744
___
___
Ned Batchelder added the comment:
There are other forms of numbers allowed by Python that are not allowed by
JSON: 001.1
Oddly, with all of the strictness in JSON, the exponent-marker e can be
upper- or lower-case: 1e1 and 1E1 are both valid JSON.
--
nosy: +nedbat
Radomir Dopieralski added the comment:
I prepared a proof of concept solution at:
https://bitbucket.org/thesheep/cpython-lru_cache-weakref/commits/66c1c9f3256785552224ca177ed77a8312de6bb8
--
hgrepos: +215
___
Python tracker rep...@bugs.python.org
Guido van Rossum added the comment:
Please answer this question. Under what circumstances can a signal handler
interrupt a blocking system call in a thread that is not the main thread?
--
___
Python tracker rep...@bugs.python.org
Richard Oudkerk added the comment:
From what I remember a proxy method will be thread/process-safe if the
referent's corresponding method is thread safe.
It should certainly be documented that the exposed methods of a proxied object
should be thread-safe.
--
Guido van Rossum added the comment:
Yeah, the behavior is at least different for each type of polling system calls,
and possibly also for different platforms. It would be good to describe at
least all the different possible behaviors.
--
___
Guido van Rossum added the comment:
Note: it is possible that SO_REUSEPORT is defined yet not implemented (and
you'll get an OSError when using it).
--
nosy: +gvanrossum
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16594
Guido van Rossum added the comment:
I'm not sure I understand the hesitation about backporting the Python 3
solution. We're acknowledging it's a bug, so the fix is not a feature. The
Python 3 solution is the future. So why not fix it?
--
___
Python
STINNER Victor added the comment:
2013/12/3 Guido van Rossum rep...@bugs.python.org:
Please answer this question. Under what circumstances can a signal handler
interrupt a blocking system call in a thread that is not the main thread?
There is no guarantee that the signal handler is called in
New submission from Vajrasky Kok:
You must run this test as administrator.
C:\Users\vajrasky\Code\cpythonPCbuild\python.exe Lib\test\test_pathlib.py
..s..s..s..s.s.E
Antoine Pitrou added the comment:
Wow, thank you. It's a pity none of the Windows buildbots runs in administrator
mode.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19877
___
Roundup Robot added the comment:
New changeset 076824de7650 by Antoine Pitrou in branch 'default':
Issue #19877: fix regression in test_pathlib when Windows has symlink support
available (i.e. in administrator mode).
http://hg.python.org/cpython/rev/076824de7650
--
nosy: +python-dev
Antoine Pitrou added the comment:
Now committed.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19877
___
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19871
___
___
Python-bugs-list mailing list
Changes by STINNER Victor victor.stin...@gmail.com:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19833
___
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18699
___
___
Python-bugs-list
Charles-François Natali added the comment:
This test is inherently subject to a race condition:
port = support.find_unused_port()
[...]
try:
self.assertRaises(OverflowError, sock.bind, (host, big_port))
self.assertRaises(OverflowError, sock.bind,
Zachary Ware added the comment:
Francis, would you like to work on a patch for this? The change should go in
Tools/msi/msi.py, if I'm not mistaken.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19866
Guido van Rossum added the comment:
I see no point in keeping this open.
--
resolution: - works for me
stage: - committed/rejected
status: open - closed
type: enhancement - behavior
___
Python tracker rep...@bugs.python.org
Charles-François Natali added the comment:
Well, unregister() documentation currently contains this:
.. method:: unregister(fileobj)
Unregister a file object from selection, removing it from monitoring. A
file object shall be unregistered prior to being closed.
I'm not sure
Guido van Rossum added the comment:
I think we should give the reader some kind of hint, since a bug in this area
may cause a lot of pain when it has to be debugged on porting from a system
where the issue is silent to one where it causes a crash. These docs (unlike a
PEP) are not a formal
STINNER Victor added the comment:
(I don' like the idea of documenting
possible behaviors, because it's non-portable, and really might change
in a future version).
The description doesn't need to be precise, you can just say depending on the
platform, closing a file descriptor while
New submission from Matthew Bergin:
[level@removed fuzz]# cat pyfile.py
import bz2
obj = bz2.BZ2File('/tmp/fileName')
obj.__init__(fileName)
obj.__reduce__
[level@removed fuzz]# gdb --args python pyfile.py
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
Copyright (C) 2010 Free Software
New submission from Matthew Bergin:
[level@removed fuzz]# cat PyCFunction.py
#
# PyCFunction_NewEx crach poc (sigabrt)
#
import imageop
imageop.rgb82rgb(u%J8CBej uFBi-,True,8.36)
imageop.grey2grey(None,5,uCRi)
[level@removed fuzz]# gdb --args python PyCFunction.py
GNU gdb (GDB) Red Hat
Changes by Matthew Bergin mber...@coresecurity.com:
--
type: - crash
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19878
___
___
Python-bugs-list
Brian Curtin added the comment:
My build slave ran as admin in order to make sure symlinks were covered, but I
don't have the hardware anymore. I'll see if I can get another machine up and
running.
--
nosy: +brian.curtin
___
Python tracker
Charles-François Natali added the comment:
The patch is fine, but it is hard to rely on it to prevent bugs from
happening because that requires cooperation from all modules registering
signal handlers.
Once again, that's why the bug report says *limit* EINTR occurrences.
We all know this
Guido van Rossum added the comment:
OK, I've harassed you enough. Sorry. Go ahead and commit this.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19850
___
Guido van Rossum added the comment:
I think you're looking for the discussion in issue 19017.
IIRC the conclusion is that not only do you not get the same error everywhere,
but you get it at different points -- sometimes register() of a bad FD passes
and then [Selector.]select() fails, other
Ned Deily added the comment:
Sorry, the Python 2.6 series is now officially retired. As of 2.6.9, All
official maintenance for Python 2.6, including security patches, has ended.
If you can reproduce the problem with a currently supported version of Python,
such as Python 2.7.6 or 3.3.3,
Changes by Serhiy Storchaka storch...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file32950/66c1c9f32567.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19859
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +ncoghlan, rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19859
___
___
Tim Peters added the comment:
I agree this is a bug, and at a first scan your fix looks good. I'll make it a
priority to pay more attention to it now ;-)
--
assignee: - tim.peters
___
Python tracker rep...@bugs.python.org
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19859
___
___
Stefan Behnel added the comment:
This is a duplicate of issue17011.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19862
___
___
Serhiy Storchaka added the comment:
Weak references make no sense in most cases when arguments disappear just after
function call. For the self argument of a method it makes more sense. Perhaps
lru_cache can return not a function, but a descriptor. This will allow
implement special processing
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
type: resource usage - enhancement
versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19859
Serhiy Storchaka added the comment:
Perhaps following technique can be used to prevent object's life prolongation:
def spam(self, *args, **kwargs):
@lru_cache(maxsize=20)
def spam(foo, bar=1, *, baz=None):
...
self.spam = spam
return self.spam(*args, **kwargs)
Raymond Hettinger added the comment:
I don't think this is an appropriate use of an LRU cache. There are other ways
to freeze a method return value (typically by storing the result in an
instance).
Here's one way of doing it (taken from the source code for Itty
STINNER Victor added the comment:
I can reproduce the issue with Python 2.7. The problem is that
BZ2File.__init__() doesn't reset the object when __init__() is called twice.
For example, the following script fails with too many open files error,
before the previous file is not called:
---
STINNER Victor added the comment:
I cannot test the issue, imageop cannot be compiled on 64-bit system and is not
present in Python 3. (I don't have access to 32-bit system right now.)
Can you reproduce the issue with Python 2.7?
I'm interested by your fuzzer, is it public?
--
nosy:
Matthew Bergin added the comment:
I was fuzzing the interpreter otherwise it would init itself
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19878
___
Matthew Bergin added the comment:
I am going to test it against 2.7 a little later on this afternoon.
I typically host all of the code I write at https://github.com/levle but atm
the github repo I use to host the project is private. Once I work out some of
the kinks I will set it to Public.
Ned Deily added the comment:
On 2.7 tip, it fails up front with a TypeError:
File /home/nad/PyCFunction.py, line 5, in module
imageop.rgb82rgb(u%J8CBej uFBi-,True,8.36)
TypeError: integer argument expected, got float
[18330 refs]
--
nosy: +ned.deily
STINNER Victor added the comment:
I typically host all of the code I write at https://github.com/levle but atm
the github repo I use to host the project is private. Once I work out some of
the kinks I will set it to Public.
I worked on a Python fuzzer some years ago and fixed a lot of similar
Matthew Bergin added the comment:
Sweet, I will check it out
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19879
___
___
Python-bugs-list
STINNER Victor added the comment:
This feature cannot be used without a reliable PyErr_NoMemory(): I add issue
#19835 as a dependency.
--
dependencies: +Add a MemoryError singleton to fix an unlimited loop when the
memory is exhausted
___
Python
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +gvanrossum, neologix, pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19827
___
Ned Deily added the comment:
@Victor: On 2.6, it gets a DeprecationWarning. On 2.7, that is now a TypeError.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19879
___
STINNER Victor added the comment:
Kristján Only that issue #10517 mentions reasons to keep the old behavior,
specifically http://bugs.python.org/issue10517#msg134573 (...)
@Kristján: The behaviour of PyThread_set_key() discussed in this issue is
unrelated to the pthread bug related to fork()
Nadeem Vawda added the comment:
It appears that this *does* affect 2.7 (though not 3.2, 3.3 or 3.4,
fortunately):
~/src/cpython/2.7☿ gdb --ex run --args ./python -c 'import bz2; obj =
bz2.BZ2File(/dev/null); obj.__init__()'
«... snip banner ...»
Starting program:
Charles-François Natali added the comment:
Guido van Rossum added the comment:
I think you're looking for the discussion in issue 19017.
IIRC the conclusion is that not only do you not get the same error
everywhere, but you get it at different points -- sometimes register() of a
bad FD
Charles-François Natali added the comment:
STINNER Victor added the comment:
Kristján Only that issue #10517 mentions reasons to keep the old behavior,
specifically http://bugs.python.org/issue10517#msg134573 (...)
@Kristján: The behaviour of PyThread_set_key() discussed in this issue is
STINNER Victor added the comment:
import selectors, os
r,w=os.pipe()
s=selectors.SelectSelector()
s.register(r, selectors.EVENT_READ)
SelectorKey(fileobj=3, fd=3, events=1, data=None)
os.close(r)
os.close(w)
s.unregister(r)
SelectorKey(fileobj=3, fd=3, events=1, data=None)
Ethan Furman added the comment:
Just tried installing 2.6.6 on Windows 7 with compile checked and make default
unchecked and did not observe any problems (although it did scroll by at high
speed, and the windows didn't stay open for me to peruse).
However, since we are no longer releasing
Tim Peters added the comment:
On second thought, I don't want to use a regexp for this. The mandatory colon
_was_ a kind of absolute wall, and the various instances of [^:] exploited
that to avoid unintended matches.
But possibly dotted name followed possibly by a colon is straightforward to
Guido van Rossum added the comment:
Heh, I'd forgotten the behavior of unregister(). It seems that there are two
layers to the behavior -- if this FD was never register()ed it will raise; if
it was register()ed but has since been close()d it may raise.
For the higher-level APIs in asyncio I
1 - 100 of 147 matches
Mail list logo