Steven D'Aprano added the comment:
This would be risky, as byte-code only libraries do exist.
I think that deleting orphaned .pyc files from inside the __pycache__ directory
is safe, but deleting orphaned .pyc files outside of that risks deleting
legitimate byte-code libraries which are in
Steven D'Aprano added the comment:
Antoine asked:
If someone has actual code that suffers from this, it would be good to know
about it.
You might have missed Ćukasz' earlier comment: In this particular case,
there's internal usage at Twitter that unearthed it. The example is just a
R. David Murray added the comment:
It is, however, frequently reported as a bug, if that makes you feel any better
:)
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24071
R. David Murray added the comment:
It wouldn't be a bad idea. Of course, you'd also need to update
Tools/script/diff.py. Tests should be added as well, since we have started
adding tests for things in Tools. The tests should be written first, to make
sure that the behavior of 'diff' does
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +eli.bendersky, scoder, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24092
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +eli.bendersky, scoder, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24093
___
R. David Murray added the comment:
Can you write a test that shows the failure? There is an existing test that
demonstrates sending to multiple addresses (testSendMessageWithAddresses), so
you must have found an edge case that isn't tested. (Either that, or the
existing test is broken.)
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24101
___
R. David Murray added the comment:
I wonder if it would be better to reject Bool data in this context? Bool is
only a numeric type for historical reasons.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
Sounds good to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24060
___
___
Python-bugs-list mailing list
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +ezio.melotti, pitrou, rhettinger, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24096
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +alexandre.vassalotti, pitrou, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24097
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +ezio.melotti, pitrou, rhettinger, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24094
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +ezio.melotti, pitrou, rhettinger, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24095
___
R. David Murray added the comment:
The note is still valid concerning the length. (Perhaps Victor should have
deprected u instead of fixing it.)
--
nosy: +haypo, r.david.murray
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
I meant when it is otherwise out of range. That is, treat it like any other
object that can't be returned as the return code: print it. But only if it
can't otherwise be used as the exit code.
--
___
Python
R. David Murray added the comment:
Yes, and it is not using generator function in two different ways: it is
literally the case that calling the generator function returns a generator
object, which in turn controls the execution of the generator function. The
text then goes on to explain how
Terry J. Reedy added the comment:
As presented, this idea seems out of scope for Idle. First, Idle is concerned
with editing code, submitting it for execution, and displaying stdout and
seterr output from the execution. Idle normally knows nothing about name
bindings created by user code in
Changes by Terry J. Reedy tjre...@udel.edu:
--
title: Add a copy vale to clipboard option to the debugger - Add a copy
value to clipboard option to the debugger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24090
Steven D'Aprano added the comment:
The patch seems simple and straightforward enough. It just needs some tests,
and a Round Tuit.
--
assignee: - steven.daprano
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24068
R. David Murray added the comment:
Oops. Yes, that's what I meant :) Thanks for the correction and link, Eric.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24106
___
Changes by Steven D'Aprano steve+pyt...@pearwood.info:
--
stage: - test needed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24068
___
___
R. David Murray added the comment:
We should either make it work with byte filenames, or allow control of the
filename encoding. See also issue 20329. Unfortunately that part is probably
a new feature. In the meantime the docs should be fixed: I believe we
automatically encode the filename
Serhiy Storchaka added the comment:
Indeed, the note is outdated and incorrect. First, general unicode filename are
allowed. They are encoded with UTF-8 internally. Second, currently there is no
way to create an entry without encoding the filename to UTF-8 (if it is not
ASCII-only). So you
Steven D'Aprano added the comment:
Maybe I've misunderstood RDM's comment, but if sys.exit(code) starts
automatically printing the return code, that's going to break a lot of scripts.
--
nosy: +steven.daprano
___
Python tracker
R. David Murray added the comment:
This generally comes up in the context of a module importing another module,
and *that* module fails to import. The first module is left in sys.modules as
a stub. Try that experiment, I'm pretty sure that is still true.
--
nosy: +r.david.murray
Serhiy Storchaka added the comment:
Python 2 prints large return code only by accident, because it have unsupported
type (sys.exit supports only int, not long). This is considered as a bug
(issue14376) because small return codes of type long (0L or 1L) are printed too.
I don't think this
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24085
___
Terry J. Reedy added the comment:
Describing generator functions as such is a great idea. But how about
generator function f at 0x7f7dad9f7bf8
Marking closure functions as such is a bit more subtle. However, there ia a
real point that closure functions have a hidden input. If it is
Serhiy Storchaka added the comment:
The use of PYTHONDONTWRITEBYTECODE is not a workaround because it makes your to
have memory overhead unconditionally. The compiler needs more momory than
require compiled data itself. If this is an issue, I suggest to use different
representation for the
Changes by Serhiy Storchaka storch...@gmail.com:
--
components: +Interpreter Core, Unicode
nosy: +doerwalter, ezio.melotti, haypo, lemburg, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24102
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24100
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24099
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24100
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24098
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
components: +Extension Modules
nosy: +ezio.melotti, pitrou, rhettinger, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24105
Raymond Hettinger added the comment:
Please don't file a multiple tracker items for the same module.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24105
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
components: +XML
nosy: +christian.heimes, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24103
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
components: +XML
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24104
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24101
___
___
Serhiy Storchaka added the comment:
About wording see also issue23088.
About possible deprecating see issue24009.
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24082
Changes by Serhiy Storchaka storch...@gmail.com:
--
components: +Extension Modules, XML
nosy: +eli.bendersky, scoder, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24091
___
Stefan Behnel added the comment:
I tried implementing a freelist. Patch attached, mostly adapted from the one in
dictobject.c, but certainly needs a bit of cleanup.
The results are not bad, about 10-20% faster:
Original:
$ ./python -m timeit 'sum(range(1, 10))'
1000 loops, best of 3:
New submission from paul:
# Breakpoint 1, encoder_listencode_dict (s=0x405b23fc, acc=0xbfaf96ec, dct=D
at remote 0x405c8af4, indent_level=0)
# at /home/p/Python-3.4.1/Modules/_json.c:1540
# 1540items = PyMapping_Keys(dct);
# (gdb) print *items
# $1 = {_ob_next = 0x4059029c, _ob_prev
New submission from paul:
# 3617for (i = 0; i len; i++) {
# (gdb) print *(PyListObject*)tmp
# $1 = {ob_base = {ob_base = {_ob_next = 0x4056f8f4, _ob_prev = 0x4057329c,
ob_refcnt = 2, ob_type = 0x830e1c0 PyList_Type},
# ob_size = 1337}, ob_item = 0x8491ae0, allocated =
Christian Heimes added the comment:
In 3.5 the segfault occurs at
#0 0x7073e55e in encoder_listencode_dict (s=s@entry=0x709aa988,
acc=acc@entry=0x7fffcf20, dct=dct@entry=D at remote 0x7094b958,
indent_level=indent_level@entry=0)
at
Changes by Christian Heimes li...@cheimes.de:
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24099
___
___
Changes by Christian Heimes li...@cheimes.de:
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24098
___
___
Changes by Christian Heimes li...@cheimes.de:
--
components: +Extension Modules
stage: - needs patch
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24092
___
New submission from paul:
# Breakpoint 1, _siftup (heap=0x4056b344, pos=65534) at
/home/p/Python-3.4.1/Modules/_heapqmodule.c:121
# warning: Source file is more recent than executable.
# 121 Py_DECREF(PyList_GET_ITEM(heap, pos));
# (gdb) print *heap-ob_item[pos]
# $1 = {_ob_next =
Changes by Christian Heimes li...@cheimes.de:
--
components: +Extension Modules
stage: - needs patch
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24098
___
Changes by Christian Heimes li...@cheimes.de:
--
components: +Extension Modules
stage: - needs patch
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24097
___
Changes by Christian Heimes li...@cheimes.de:
--
components: +Extension Modules
stage: - needs patch
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24099
___
Changes by paul paw...@gmail.com:
Removed file: http://bugs.python.org/file39246/poc_enc_dict3.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24096
___
Anthony Sottile added the comment:
I'm still seeing a very large difference:
asottile@work:/tmp$ python repro.py
ready
module 'city_hoods' from '/tmp/city_hoods.pyc'
72604
VmHWM: 72604 kB
VmRSS: 60900 kB
asottile@work:/tmp$ rm *.pyc; python repro.py
ready
module 'city_hoods' from
New submission from paul:
# Program received signal SIGSEGV, Segmentation fault.
# 0x4063cf19 in element_extend (self=0x405ddf74, args=([],)) at
/home/p/Python-3.4.1/Modules/_elementtree.c:1056
# 1056PyObject* element = PySequence_Fast_GET_ITEM(seq, i);
# (gdb) print i
# $3 = 1337
#
Changes by Christian Heimes li...@cheimes.de:
--
components: +Extension Modules
nosy: +christian.heimes
stage: - needs patch
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24104
New submission from paul:
# _siftdown(PyListObject *heap, Py_ssize_t startpos, Py_ssize_t pos)
# ...
# newitem = PyList_GET_ITEM(heap, pos);
# Py_INCREF(newitem);
# /* Follow the path to the root, moving parents down until finding
#a place newitem fits. */
# while
Changes by Christian Heimes li...@cheimes.de:
--
components: +Extension Modules
stage: - needs patch
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24103
___
Guido van Rossum added the comment:
I think we can continue this discussion *after* the PEP's been accepted.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24017
___
Changes by Christian Heimes li...@cheimes.de:
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24092
___
___
New submission from paul:
# Program received signal SIGSEGV, Segmentation fault.
# 0x4068565c in xmlparser_setevents (self=0x4064b13c, args=([], [S2 at remote
0x4064b0e4]))
# at /home/p/Python-3.4.1/Modules/_elementtree.c:3562
# 3562if (PyUnicode_Check(event_name_obj)) {
# (gdb)
Antoine Pitrou added the comment:
Which Python version is that? Can you try with 3.4 or 3.5?
(is it under GNU/Linux?)
This file is significantly larger than the one attached, not sure
if it makes much of a difference.
Python doesn't make a difference internally, but perhaps it has some
Antoine Pitrou added the comment:
Is there any chance you can upload a script that's large enough to exhibit the
problem?
(perhaps with anonymized data if there's something sensitive in there)
--
___
Python tracker rep...@bugs.python.org
New submission from paul:
# 1055for (i = 0; i seqlen; i++) {
# (gdb) n
# 1056PyObject* element = PySequence_Fast_GET_ITEM(seq, i);
# (gdb) n
# 1057if (!PyObject_IsInstance(element, (PyObject *)Element_Type))
{
# (gdb) print *element
# $19 = {_ob_next =
New submission from paul:
# Program received signal SIGSEGV, Segmentation fault.
# 0x080f27b2 in PyObject_Hash (v=unknown at remote 0x405720e4) at
Objects/object.c:746
# 746 if (tp-tp_hash != NULL)
# (gdb) bt
# #0 0x080f27b2 in PyObject_Hash (v=unknown at remote 0x405720e4) at
Changes by Christian Heimes li...@cheimes.de:
--
nosy: +christian.heimes
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24091
___
___
New submission from paul:
# _siftdown(PyListObject *heap, Py_ssize_t startpos, Py_ssize_t pos)
# ...
# while (pos startpos){
# parentpos = (pos - 1) 1;
# parent = PyList_GET_ITEM(heap, parentpos);
# 1 cmp = PyObject_RichCompareBool(newitem, parent, Py_LT);
#
Changes by Christian Heimes li...@cheimes.de:
--
components: +Extension Modules
nosy: +christian.heimes
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24093
___
Changes by Christian Heimes li...@cheimes.de:
--
components: +Extension Modules
nosy: +christian.heimes
stage: - needs patch
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24094
Changes by Christian Heimes li...@cheimes.de:
--
components: +Extension Modules
nosy: +christian.heimes
stage: - needs patch
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24095
Antoine Pitrou added the comment:
Note under 3.x, you need to rm -r __pycache__, not rm *.pyc, since the pyc
files are now stored in the __pycache__ subdirectory.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24085
Anthony Sottile added the comment:
Ah, then 3.4 still has the problem:
$ rm -rf __pycache__/ *.pyc; python3.4 repro.py
ready
module 'city_hoods' from '/tmp/city_hoods.py'
1112892
VmHWM: 1112892 kB
VmRSS:127196 kB
asottile@work:/tmp$ python3.4 repro.py
ready
module 'city_hoods' from
Anthony Sottile added the comment:
Attached is repro2.py (slightly different so my editor doesn't hate itself when
editing the file)
I'll attach the other file in another comment since it seems I can only do one
at a time
--
Added file: http://bugs.python.org/file39257/repro2.py
New submission from paul:
# Program received signal SIGSEGV, Segmentation fault.
# 0x40036740 in encoder_listencode_dict (s=0x405b43fc, acc=0xbf86438c, dct=D
at remote 0x405b2fb4, indent_level=0)
# at /home/p/Python-3.4.1/Modules/_json.c:1557
# 1557PyList_SET_ITEM(items, i,
Changes by Christian Heimes li...@cheimes.de:
--
components: +Extension Modules
nosy: +christian.heimes
stage: - needs patch
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24101
New submission from paul:
# Program received signal SIGSEGV, Segmentation fault.
# 0x40036740 in encoder_listencode_dict (s=0x405b43fc, acc=0xbf86438c, dct=D
at remote 0x405b2fb4, indent_level=0)
# at /home/p/Python-3.4.1/Modules/_json.c:1557
# 1557PyList_SET_ITEM(items, i,
Anthony Sottile added the comment:
3.4 seems happier:
asottile@work:/tmp$ rm *.pyc; python3.4 repro.py
ready
module 'city_hoods' from '/tmp/city_hoods.py'
77472
VmHWM: 77472 kB
VmRSS: 65228 kB
asottile@work:/tmp$ python3.4 repro.py
ready
module 'city_hoods' from '/tmp/city_hoods.py'
New submission from paul:
# Breakpoint 1, encoder_listencode_dict (s=0x405b23fc, acc=0xbfc4038c, dct=D
at remote 0x405c8b34, indent_level=0)
# at /home/p/Python-3.4.1/Modules/_json.c:1540
# 1540items = PyMapping_Keys(dct);
# (gdb) n
# 1541if (items == NULL)
# (gdb)
Changes by Christian Heimes li...@cheimes.de:
--
components: +Extension Modules
nosy: +christian.heimes
stage: - needs patch
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24096
New submission from paul:
# Breakpoint 1, PyUnicodeEncodeError_GetEnd (exc=X at remote 0x405730e4,
end=0xbf9e8f7c) at Objects/exceptions.c:1643
# 1643PyObject *obj = get_unicode(((PyUnicodeErrorObject *)exc)-object,
# (gdb) s
# get_unicode (attr=unknown at remote 0x8c6a120,
New submission from paul:
# xmlparser_setevents(XMLParserObject *self, PyObject* args)
# {
# ...
# /* clear out existing events */
# Py_CLEAR(target-start_event_obj);
# 1 Py_CLEAR(target-end_event_obj);
# Py_CLEAR(target-start_ns_event_obj);
#
paul added the comment:
Issue for poc_enc_dict3.py is here: https://bugs.python.org/issue24105
Please ignore first and third message.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24096
Christian Heimes added the comment:
Thanks Paul!
May I ask how you found that many use-after-free bugs? Are you using some sort
of tool for static code analysis or fuzzying?
--
___
Python tracker rep...@bugs.python.org
Changes by Anthony Sottile asott...@yelp.com:
Added file: http://bugs.python.org/file39259/anon_city_hoods.tar.gz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24085
___
paul added the comment:
You want multiple bugs in the same module grouped in one issue?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24105
___
Serhiy Storchaka added the comment:
Yes, if they are related. I didn't look at the code close, but at first glance
all your recently opened issues look related (may be I wrong).
--
___
Python tracker rep...@bugs.python.org
Stefan Behnel added the comment:
I don't think it's irrelevant. Throw-away integers are really not uncommon.
For-loops use them quite often, non-trivial arithmetic expressions can create a
lot of intermediate temporaries. Speeding up the create-delete cycle of PyLong
sounds like a very
Changes by Paul Moore p.f.mo...@gmail.com:
--
nosy: +paul.moore
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23572
___
___
Python-bugs-list
Changes by James Edwards jh...@jheiv.com:
--
nosy: +pitrou, yselivanov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24078
___
___
Christian Heimes added the comment:
I have an experimental branch that adds the feature and also exposes the
subject public key information.
https://github.com/tiran/cpython/tree/feature/x509cert
--
___
Python tracker rep...@bugs.python.org
New submission from jentyk:
In [14]: for i in xrange(10):
: if 1==1:
: print It's true
: else:
: print It isn't true. Seriously??
:
It's true
It's true
It's true
It's true
It's true
It's true
It's true
It's true
It's true
It's true
It isn't
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24100
___
Serhiy Storchaka added the comment:
If make docstrings writable, it would be good to ensure that they exactly are
strings. And if make the property doctstring writable, may be make other
docstrings writable? It may be useful for setting the same docstring for Python
implementation and C
James Edwards added the comment:
Added Yury (inspect module) and Antoine (PEP 3155) to nosy -- apologies if
you're not interested.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24078
Antoine Pitrou added the comment:
Ok, I can reproduce:
$ rm -r __pycache__/; ./python repro2.py
ready
module 'anon_city_hoods' from '/home/antoine/cpython/opt/anon_city_hoods.py'
1047656
VmHWM: 1047656 kB
VmRSS: 50660 kB
$ ./python repro2.py
ready
module 'anon_city_hoods' from
Changes by Geoffrey Spear geoffsp...@gmail.com:
--
components: +Interpreter Core
nosy: +geoffreyspear
type: - resource usage
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24085
Changes by Chris Rebert pyb...@rebertia.com:
--
nosy: +cvrebert
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24064
___
___
Python-bugs-list
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24099
___
James Edwards added the comment:
Inspect could probably be updated to use 3.3's __qualname__ in the case of
classes-in-classes; classes-in-functions or functions-in-functions would likely
be harder, but I'm not sure it's impossible.
--
nosy: +jedwards
1 - 100 of 133 matches
Mail list logo