Davide Rizzo added the comment:
I've just stumbled on the same thing happening on some code that attempts to
use logging on __del__.
Comparing dir(__builtins__) normally and on shutdown, these are missing:
['copyright', 'credits', 'exit', 'help', 'license', 'open', 'quit']
The traceback
Davide Rizzo added the comment:
BTW should this be backported to 3.7?
--
___
Python tracker
<https://bugs.python.org/issue36139>
___
___
Python-bugs-list mailin
Davide Rizzo added the comment:
Thanks Victor. I think this fixes it
https://github.com/python/cpython/pull/12199
--
___
Python tracker
<https://bugs.python.org/issue36
Change by Davide Rizzo :
--
pull_requests: +12194
___
Python tracker
<https://bugs.python.org/issue36139>
___
___
Python-bugs-list mailing list
Unsubscribe:
Davide Rizzo added the comment:
munmap() of private maps is usually pretty fast but not negligible (2 ms for
1GB). Shared maps are much slower. For some reason, shared maps explicitly
backed by POSIX shared memory stand in between but are still pretty slow.
If someone cares about file
Davide Rizzo added the comment:
Yes, this is mmap module. I found this to be slow for posix-shm-backed mmaps.
Several milliseconds, like 20ms for a 128 MB object. Maybe the same can happen
with private|anon mmaps? I will follow up with more numbers
New submission from Davide Rizzo :
munmap() can take a long time. I think mmap_object_dealloc can trivially
release the GIL around this operation. Something similar was already mentioned
in https://bugs.python.org/issue1572968 but a general patch was never provided.
The dealloc case alone
Davide Rizzo <sor...@gmail.com> added the comment:
I attempted to make a Python implementation (attached) to use in my code. There
are a few questions in the comments.
One of the complications is the async equivalent of next with two arguments
like next(iterator, default). It cannot
Change by Davide Rizzo <sor...@gmail.com>:
--
nosy: +gvanrossum, yselivanov
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
New submission from Davide Rizzo <sor...@gmail.com>:
PEP 525 suggested that adding aiter() and anext() would need to wait until
async __aiter__ is dropped in 3.7. Issue 31709 solved that, so now it would be
possible to add them.
--
components: Library (Lib)
messages: 30491
Changes by Davide Rizzo <sor...@gmail.com>:
--
nosy: +davide.rizzo
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19717>
___
_
Changes by Davide Rizzo <sor...@gmail.com>:
--
type: -> enhancement
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26976>
___
__
New submission from Davide Rizzo:
pathlib doesn't provide an exact replacement for os.path.realpath().
Path.resolve() is the closest equivalent, but differs in behavior in one case:
when the path does not exist.
>>> os.path.realpath('/foo')
'/foo'
>>> Path('/foo').resolve
Davide Rizzo added the comment:
As far as I understand, assuming dir/ contains a __main__.py file
$ python dir
is equivalent to
$ python dir/__main__.py
in that it's behaviourally nothing more than executing a script in that dir and
setting sys.path accordingly. This is the same in Python 2
Davide Rizzo sor...@gmail.com added the comment:
Amaury, I don't honestly know, I would have proposed something otherwise.
I have been advised on #python (Freenode) not to assign to obj.__dict__ because
its behaviour changes between versions and implementations, but I wouldn't know
what has
New submission from Davide Rizzo sor...@gmail.com:
The documentation (at least the obvious places, see
Doc/reference/datamodel.rst) says classes and class instances have the
'__dict__' attribute, but nothing is said about what happens when assigning to
it (like obj.__dict__ = something
Davide Rizzo sor...@gmail.com added the comment:
Daniel, Nick, shouldn't the context manager yield f within a with block?
--
nosy: +davide.rizzo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14243
Davide Rizzo sor...@gmail.com added the comment:
Mark, it's been a long time since I went through this bug and don't remember
the details. Are you sure subtype_dealloc should not call PyType_Modified? It
looked like the appropriate place at the time. In the example the reference
cycle
Davide Rizzo sor...@gmail.com added the comment:
As much as I hate being wrong, I must concur with you. ;) Thank you, Mark.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12149
New submission from Davide Rizzo sor...@gmail.com:
urllib2.urlopen('http://foo/url and spaces') will send a HTTP request line like
this to the server:
GET /url and spaces HTTP/1.1
which the server obviously does not understand. This contrasts with urllib's
behaviour which replaces the spaces
Changes by Davide Rizzo sor...@gmail.com:
--
nosy: +davide.rizzo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12576
___
___
Python-bugs-list
Davide Rizzo sor...@gmail.com added the comment:
This patch removes the special meaning for \x00 and defines the default padding
character (' ') in parse_internal_render_format_spec. Test included. Maybe the
default padding character should be defined elsewhere?
--
keywords: +patch
Davide Rizzo sor...@gmail.com added the comment:
Oops, sorry. Above patch was overly buggy. Please just ignore it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12546
Changes by Davide Rizzo sor...@gmail.com:
Removed file: http://bugs.python.org/file22639/format00.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12546
Davide Rizzo sor...@gmail.com added the comment:
Here's the patch. Same rationale as above (removed the special meaning of
'\x00', default specified in parse_internal_render_format_spec). Sorry about
the mess again!
--
Added file: http://bugs.python.org/file22640/format00.patch
New submission from Davide Rizzo sor...@gmail.com:
test test_platform failed -- Traceback (most recent call last):
File /Users/davide/cpython/Lib/test/test_platform.py, line 194, in
test_mac_ver
self.assertEqual(res[2], 'i386')
AssertionError: 'x86_64' != 'i386'
- x86_64
+ i386
uname
Davide Rizzo sor...@gmail.com added the comment:
No, it's 10.6.8. Now that I think of it I updated from 10.6.7
recently. But I have no 10.6.7 x86_64 bit machine where to test.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Davide Rizzo sor...@gmail.com added the comment:
I first saw it failing on 3.3 while testing for another bug, then run the test
on other versions including 2.7 and it always fails. System Python 2.6 does NOT
fail, but it has no _mac_ver_xml().
This is a MacBook Pro 13 with Intel Core i5
Davide Rizzo sor...@gmail.com added the comment:
The attached test segfaults (and passes with the patch). It wasn't clear to me
where to put the test (it is a typeobject issue triggered by io) but Antoine on
IRC agreed it would make sense to add it to test_io anyway.
Python 2.7 is affected
Davide Rizzo sor...@gmail.com added the comment:
Looking through Antoine's example code. When garbage is collected, the subtype
and its tp_dict are cleared before the instance object itself. When the dict is
cleared as part of the garbage collection, the methods get deallocated but the
method
Davide Rizzo sor...@gmail.com added the comment:
Invalidating the cache in subtype_clear prevents the close method to be
called in the collected object. I'm not sure that's the right place where to
put the PyType_Modified, but apparently it works.
--
Added file: http://bugs.python.org
Changes by Davide Rizzo sor...@gmail.com:
--
nosy: +davide.rizzo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12149
___
___
Python-bugs-list
New submission from Davide Rizzo sor...@gmail.com:
There are three sources of information for the descriptor protocol:
- Data model reference (Doc/reference/datamodel.rst)
- Descriptor HowTo guide (Doc/howto/descriptor.rst)
- PEP 252
A developer who already knows descriptor tipically reads
Davide Rizzo sor...@gmail.com added the comment:
Victor, I have neither OS X nor Linux available right now, but if I remember
correctly the same happens on both systems when programs call input() (but not
from the REPL). See also my previous message with python -c tests and my
second remark
Davide Rizzo sor...@gmail.com added the comment:
An effective way to automate user interaction tests is by using
pseudo-terminals. The attached test uses Pexpect and bash as tools to test the
issue and demonstrates the bug on affected builds/platforms. There are a number
of (possibly related
New submission from Davide Rizzo sor...@gmail.com:
collections.deque docstring is:
'deque(iterable[, maxlen]) -- deque object\n\nBuild an ordered collection
accessible from endpoints only.'
As it reads now, it seems to imply that only endpoints can be read/modified.
The rst correctly states
Davide Rizzo sor...@gmail.com added the comment:
The bugs seems not to be limited to the REPL.
# Python 2.6 with readline on Mac OS X
$ python -c raw_input()
^Z
[1]+ Stopped python -c raw_input()
$ fg
python -c raw_input()
Traceback (most recent call last):
File string, line
Changes by Davide Rizzo sor...@gmail.com:
--
nosy: +mwh
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11650
___
___
Python-bugs-list mailing list
Davide Rizzo sor...@gmail.com added the comment:
davide@macrisorto ~/cpython $ ./python.exe
Python 3.3a0 (default:4a5782a2b074, Mar 23 2011, 15:26:35)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type help, copyright, credits or license for more information.
^Z
[1]+ Stopped
Davide Rizzo sor...@gmail.com added the comment:
The process did exit on fg. Compare with the 2nd paste on my previous message
(Python shipped with OS X).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11650
Davide Rizzo sor...@gmail.com added the comment:
You are right. The previous runs were without readline. With readline it
behaves as expected.
For the sake of completeness, here's the output of your snippet after Ctrl+Z,
fg:
getchar: Interrupted system call
Davide Rizzo sor...@gmail.com added the comment:
The patch works fine, thank you.
I was trying the same fix, but got stuck trying to understand what led to the
decision in issue 960406. Still not sure.
--
___
Python tracker rep...@bugs.python.org
Davide Rizzo sor...@gmail.com added the comment:
The faulty behavior was presumably introduced in r36346, when the continue
statement was removed. I already linked the relevant discussion, but I'm not
sure whether that was a desired change or just an oversight. I'm inclined to
believe
Davide Rizzo sor...@gmail.com added the comment:
I couldn't get an automated test to fail on the bug with subprocess. Apparently
an interpreter launched with Popen is not subject to the bug as it is when
launched directly from the shell (i.e. fgets is not interrupted by a SIGSTOP
sent
Changes by Davide Rizzo sor...@gmail.com:
--
nosy: +davide.rizzo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2636
___
___
Python-bugs-list
New submission from Davide Rizzo sor...@gmail.com:
Some WebKit browsers show a superflous scrollbar on the right side of the pre
boxes in the Sphinx generated html docs.
For example:
http://666kb.com/i/boxys2zktxky17vsh.png
taken on Chrome 7 on Windows.
I believe that the cause
Davide Rizzo sor...@gmail.com added the comment:
len(data) will raise anyway.
No, it won't, if the iterable happens to be a sequence.
--
nosy: +davide.rizzo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3243
Changes by Davide Rizzo sor...@gmail.com:
--
nosy: +davide.rizzo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10535
___
___
Python-bugs-list
48 matches
Mail list logo