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',
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 is
Davide Rizzo 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 return the result of
Change by Davide Rizzo :
--
nosy: +gvanrossum, yselivanov
___
Python tracker
<https://bugs.python.org/issue31861>
___
___
Python-bugs-list mailing list
Unsub
New submission from Davide Rizzo :
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: 304910
nosy: davide.rizzo
priority
Changes by Davide Rizzo :
--
nosy: +davide.rizzo
___
Python tracker
<http://bugs.python.org/issue19717>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Davide Rizzo :
--
type: -> enhancement
___
Python tracker
<http://bugs.python.org/issue26976>
___
___
Python-bugs-list mailing list
Unsubscrib
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'
>>
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 Pyt
Davide Rizzo 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 chang
New submission from Davide Rizzo :
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).
A
Davide Rizzo added the comment:
Daniel, Nick, shouldn't the context manager yield f within a with block?
--
nosy: +davide.rizzo
___
Python tracker
<http://bugs.python.org/is
Davide Rizzo added the comment:
As much as I hate being wrong, I must concur with you. ;) Thank you, Mark.
--
___
Python tracker
<http://bugs.python.org/issue12
Davide Rizzo 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 was int
New submission from Davide Rizzo :
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 spac
Changes by Davide Rizzo :
--
nosy: +davide.rizzo
___
Python tracker
<http://bugs.python.org/issue12576>
___
___
Python-bugs-list mailing list
Unsubscribe:
Davide Rizzo 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 Co
Davide Rizzo 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
<http://bugs.python.org/is
New submission from Davide Rizzo :
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'
Davide Rizzo 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
Changes by Davide Rizzo :
Removed file: http://bugs.python.org/file22639/format00.patch
___
Python tracker
<http://bugs.python.org/issue12546>
___
___
Python-bugs-list m
Davide Rizzo added the comment:
Oops, sorry. Above patch was overly buggy. Please just ignore it.
--
___
Python tracker
<http://bugs.python.org/issue12
Davide Rizzo 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: +
Davide Rizzo 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 too by th
Davide Rizzo 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.
Davide Rizzo 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 cache i
Changes by Davide Rizzo :
--
nosy: +davide.rizzo
___
Python tracker
<http://bugs.python.org/issue12149>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Davide Rizzo :
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 the first one
Davide Rizzo 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.
New submission from Davide Rizzo :
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 state
Davide Rizzo 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) other issues
Davide Rizzo 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 cal
Changes by Davide Rizzo :
--
nosy: +mwh
___
Python tracker
<http://bugs.python.org/issue11650>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.pyth
Davide Rizzo 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 by the parent pr
Davide Rizzo 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 the lat
Davide Rizzo 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
<http://bugs.python.org/issue11
Davide Rizzo 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
Davide Rizzo 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
<http://bugs.python.org/issue11
Davide Rizzo 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" fo
Changes by Davide Rizzo :
--
nosy: +davide.rizzo
___
Python tracker
<http://bugs.python.org/issue2636>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Davide Rizzo :
Some WebKit browsers show a superflous scrollbar on the right side of the
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 of the behaviour is a bug in the
Davide Rizzo 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
<http://bugs.python.or
Changes by Davide Rizzo :
--
nosy: +davide.rizzo
___
Python tracker
<http://bugs.python.org/issue10535>
___
___
Python-bugs-list mailing list
Unsubscribe:
48 matches
Mail list logo