Oren Milman added the comment:
sure.
In general, should drafts (like this one) be uploaded here?
or is it always better to open a PR?
--
___
Python tracker
<http://bugs.python.org/issue29
Changes by Oren Milman :
--
pull_requests: +461
___
Python tracker
<http://bugs.python.org/issue29741>
___
___
Python-bugs-list mailing list
Unsubscribe:
Oren Milman added the comment:
yes and yes.
I would start with a PR for 3.7.
and thanks for the review :)
--
___
Python tracker
<http://bugs.python.org/issue28
Changes by Oren Milman :
--
pull_requests: +466
___
Python tracker
<http://bugs.python.org/issue28298>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Oren Milman :
--
pull_requests: +476
___
Python tracker
<http://bugs.python.org/issue28298>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Oren Milman :
--
pull_requests: +485
___
Python tracker
<http://bugs.python.org/issue28298>
___
___
Python-bugs-list mailing list
Unsubscribe:
Oren Milman added the comment:
Thanks for the reviews :)
--
___
Python tracker
<http://bugs.python.org/issue28298>
___
___
Python-bugs-list mailing list
Unsub
Oren Milman added the comment:
of course :)
but some time has passed, so i would re-check stuff, and run tests
etc., so it would probably take me some time.
--
___
Python tracker
<http://bugs.python.org/issue15
Changes by Oren Milman :
--
pull_requests: +501
___
Python tracker
<http://bugs.python.org/issue29741>
___
___
Python-bugs-list mailing list
Unsubscribe:
Oren Milman added the comment:
done
--
___
Python tracker
<http://bugs.python.org/issue29741>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.pyth
Oren Milman added the comment:
thanks :)
I would update the original PR soon.
--
___
Python tracker
<http://bugs.python.org/issue29741>
___
___
Python-bugs-list m
Oren Milman added the comment:
or maybe git is smart enough to realize what happened, and I don't have
to update PR 560?
--
___
Python tracker
<http://bugs.python.org/is
Oren Milman added the comment:
after some closer examination, ISTM that in Objects/exceptions.c, we can't
remove PyNumber_Check to optimize or simplify the code, as the argument
'filename' can be either an integer type (only in case the error is a
BlockingIOError), or quite anythi
Changes by Oren Milman :
--
pull_requests: +510
___
Python tracker
<http://bugs.python.org/issue29730>
___
___
Python-bugs-list mailing list
Unsubscribe:
Oren Milman added the comment:
"In bytes/bytearray methods -- integers and bytes-like objects."
(I guess you refer to parse_args_finds_byte (in Objects/bytes_methods.c))
so you suggest that in case (!PyIndex_Check(tmp_subobj)), we also check whether
(PyByteArray_Check(tmp_
Oren Milman added the comment:
"Perhaps some methods need to check also PyTuple_Check()."
which methods?
anyway, a new patch diff file is attached, according to your other seggustions,
Serhiy.
(I ran the test module, and some tests of my own, and it seems that the patch
doesn't
Changes by Oren Milman :
--
pull_requests: +537
___
Python tracker
<http://bugs.python.org/issue29730>
___
___
Python-bugs-list mailing list
Unsubscribe:
Oren Milman added the comment:
I am sorry, but I guess I am missing something about startswith() and
endswith().
ISTM that PyTuple_Check() is already called by unicode_startswith,
unicode_endswith and _Py_bytes_tailmatch, which already raise a TypeError
with an appropriate error message
(e.g
Oren Milman added the comment:
thanks for the reviews :)
--
___
Python tracker
<http://bugs.python.org/issue29730>
___
___
Python-bugs-list mailing list
Unsub
Changes by Oren Milman :
--
pull_requests: +551
___
Python tracker
<http://bugs.python.org/issue15988>
___
___
Python-bugs-list mailing list
Unsubscribe:
Oren Milman added the comment:
Raymond? any suggestions for how to make the code less ugly?
or do you have in mind a different approach for solving this issue?
--
___
Python tracker
<http://bugs.python.org/issue28
Oren Milman added the comment:
now that you opened #29816 and #29819, should I remove from the PR changes in
the following functions, and related tests?
- _io_BytesIO_truncate_impl
- _io_StringIO_truncate_impl
- long_rshift
- long_lshift
Oren Milman added the comment:
also, IMHO, we should open an issue named 'raise ValueError instead of
OverflowError when a negative int is invalid', and leave for that
new issue some the changes (which you commented about in the PR).
I didn't want to open it without your approva
Oren Milman added the comment:
I am sorry, but my 2nd term starts on Monday, so I am short on time,
and feel like I would be lucky to even finish working on PR 668.
because of that, and because you obviously have a much better
understanding of this issue than me, I would be happy if you could
Oren Milman added the comment:
i played a little with a patch earlier today, but stopped because I
am short on time.
anyway, just in case my code is not totally rubbish, I attach my
patch draft, which should avoid OverflowError also for big positive
ints.
(of course, I don't suggest to u
Oren Milman added the comment:
as Serhiy pointed out in PR 668, here are some more functions that produce the
same kind of wrong error messages:
- Modules/timemodule.c - gettmarg()
- Modules/socketmodule.c:
* getsockaddrarg()
* socket_getnameinfo()
ISTM that searching
Oren Milman added the comment:
note that there are functions that rely on the fact that
PyLong_AsUnsignedLong currently raises OverflowError for both cases.
such functions would probably use
PyErr_ExceptionMatches(PyExc_OverflowError)
or something like
PyErr_GivenExceptionMatches(err
New submission from Oren Milman:
1. currently, py_blake2s_new_impl and py_blake2b_new_impl might produce
inconsistent error messages (note that the first one happens on platforms
where sizeof(long) > 4):
>>> hashlib.blake2b(leaf_size=1 << 32)
Traceback (mos
New submission from Oren Milman:
currently (on my Windows 10):
>>> bytes(-1 << 1000)
Traceback (most recent call last):
File "", line 1, in
OverflowError: cannot fit 'int' into an index-sized integer
>>> bytes(-1)
Traceback (most recent call last):
Oren Milman added the comment:
note that #15988 also left 3 changes for this issue to fix, as can be
seen by searching for '29832' in the comments of PR 668.
for example, this issue should also fix the following inconsistent
error messages:
>>> socket.socket(family=socket.A
New submission from Oren Milman:
With regard to ctypes.Array:
currently:
>>> from ctypes import *
>>> class T(Array):
... _type_ = c_int
... _length_ = -1
...
Traceback (most recent call last):
File "", line 1, in
OverflowError: array too large
>&g
Oren Milman added the comment:
A patch draft (which doesn't change anything about the case of _length_ == 0)
is attached.
(I am not opening a PR, because I am not sure the behavior change would be
accepted.)
I ran the test module on my Windows 10, and it seems the patch doesn't brea
Oren Milman added the comment:
"If use _testcapi the tests should be decorated with cpython_only."
at first, I thought so too, but then I searched for 'cpython_only' in
Lib/ctypes/test, and found nothing. then I searched for '_testcapi' there,
and found a top l
Oren Milman added the comment:
yes, you are right, of course.
but regardless of this issue, shouldn't test_structures.py be changed
(in a seperate issue)?
ISTM it has a cpython-specific test not decorated in @cpython_only.
--
___
Python tr
Oren Milman added the comment:
Here is a patch including only changes related to PyLong_As* and PyArg_Parse*
functions.
(I ran the test module, and on my Windows 10, the same tests failed with
and without my patches. However, on my Ubuntu 16.04 VM, none of the tests
failed.)
--
Added
Oren Milman added the comment:
here is the patch updated according to your suggestions, Serhiy.
however, I wonder about the case of a too large _length_.
shouldn't we raise a MemoryError in such a case, in accordance with #29833?
BTW, while inspecting code related to a too large _lengt
Oren Milman added the comment:
Here is a patch including only changes related to formats using
the 'c' specifier.
(I ran the test module, and on my Windows 10, the same tests failed with
and without my patches. However, on my Ubuntu 16.04 VM, none of the tests
failed.)
--
Oren Milman added the comment:
Here is a patch including only changes related to array.
(I ran the test module, and on my Windows 10, the same tests failed with
and without my patches. However, on my Ubuntu 16.04 VM, none of the tests
failed.)
--
Added file: http://bugs.python.org
Oren Milman added the comment:
Here is a patch including only changes related to hashlib, lzma and pickle.
(I ran the test module, and on my Windows 10, the same tests failed with
and without my patches. However, on my Ubuntu 16.04 VM, none of the tests
failed.)
--
Added file: http
Oren Milman added the comment:
Here is a patch including only changes related to time and re.
(I ran the test module, and on my Windows 10, the same tests failed with
and without my patches. However, on my Ubuntu 16.04 VM, none of the tests
failed.)
--
Added file: http
Oren Milman added the comment:
Here is a patch including only changes related to curses, stat, callproc
(ctypes) and sequence_repeat (abstract).
(I ran the test module, and on my Windows 10, the same tests failed with
and without my patches. However, on my Ubuntu 16.04 VM, none of the tests
Oren Milman added the comment:
Here is a patch including only changes related to mmap, posix, socket and
select.
(I ran the test module, and on my Windows 10, the same tests failed with
and without my patches. However, on my Ubuntu 16.04 VM, none of the tests
failed.)
--
Added file
Oren Milman added the comment:
ISTM that what's left is (except for my 7 sub-patches):
- making the error messages of long_rshift and long_lshift consistent
(waits for #29816)
- deciding whether to open an issue for changing the type of errors
PyLong_AsSize_t r
New submission from Oren Milman:
The following code causes an assertion failure:
__name__ = b'foo'
__file__ = None
import _warnings
_warnings.warn('bar')
This is because setup_context() (in Python/_warnings.c) assumes that __name__
is a string, an
Changes by Oren Milman :
--
keywords: +patch
pull_requests: +3701
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31566>
___
___
Py
Oren Milman added the comment:
> But this is a separate issue, 3.7 only.
I don't think i understand what this issue would include.
Anyway, i updated the PR according to your comments.
--
___
Python tracker
<https://bugs.python.org
Changes by Oren Milman :
--
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: struct_rusage
___
Python tracker
<https://bugs.python.org/issue31
New submission from Oren Milman:
The following code causes the interpreter to crash:
import os
import time
import resource
new_pid = os.fork()
if new_pid == 0:
time.sleep(0.5)
else:
resource.struct_rusage = None
os.wait3(0)
We would get a crash also if we replaced 'os.wa
New submission from Oren Milman:
The following code causes the interpreter to crash:
class BadInt:
def __divmod__(*args):
return 42
import os
os.utime('foo.txt', ns=(BadInt(), 1))
This is because split_py_long_to_s_and_ns() (in Modules/posixmodule.c) assumes
that PyNum
Changes by Oren Milman :
--
keywords: +patch
pull_requests: +3739
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31577>
___
___
Py
Oren Milman added the comment:
I opened a PR.
I think another fix might be to use
PyLong_Type.tp_as_number->long_divmod() instead of PyNumber_Divmod().
--
___
Python tracker
<https://bugs.python.org/issu
New submission from Oren Milman:
The following code causes a SystemError:
class BadMapping:
get = dict.get
__setitem__ = dict.__setitem__
import _collections
_collections._count_elements(BadMapping(), [42])
This is because _count_elements() (in Modules/_collectionsmodule.c) assumes
New submission from Oren Milman:
The following code causes a SystemError:
class BadMetaclass(type):
def __prepare__(*args):
pass
class Foo(metaclass=BadMetaclass):
pass
This is because builtin___build_class__() assumes that __prepare__() returned a
mapping, and passes it to
Changes by Oren Milman :
--
keywords: +patch
pull_requests: +3748
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31586>
___
___
Py
Changes by Oren Milman :
--
keywords: +patch
pull_requests: +3749
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31588>
___
___
Py
New submission from Oren Milman:
The following code causes an assertion failure:
import unicodedata
def bad_normalize(*args):
return None
unicodedata.normalize = bad_normalize
import ast
ast.parse('\u03D5')
This is because init_normalization() (in Python/ast.c) as
Changes by Oren Milman :
--
keywords: +patch
pull_requests: +3752
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31592>
___
___
Py
New submission from Oren Milman :
The following code causes an assertion failure (in case there exists a
compressed zip file named 'foo.zip' with a file called 'bar.py' in it):
import zlib
import zipimport
def bad_decompress(*args):
return None
zlib.decompr
Change by Oren Milman :
--
keywords: +patch
pull_requests: +3769
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31602>
___
___
Python-
New submission from Oren Milman :
For example, when I search for 'ctypes', I get only two results.
Just in case, i checked and got the same results in multiple browsers, and also
on Ubuntu and on Windows.
--
components: Demos and Tools
messages: 303114
nosy: Oren Milma
Oren Milman added the comment:
I am not 100% sure that issues are showed because they had a recent activity,
but ISTM like the reason..
--
___
Python tracker
<https://bugs.python.org/issue31
Change by Oren Milman :
--
nosy: +ezio.melotti
___
Python tracker
<https://bugs.python.org/issue31605>
___
___
Python-bugs-list mailing list
Unsubscribe:
Oren Milman added the comment:
Nick, maybe you tried to reproduce in release?
In debug (where I got the SystemError), you have in the beginning of
_PyFrame_New_NoTrack():
#ifdef Py_DEBUG
if (code == NULL || globals == NULL || !PyDict_Check(globals) ||
(locals != NULL
New submission from Oren Milman :
The following code causes the interpreter to crash:
import _collections
class BadDeque(_collections.deque):
def __new__(cls, *args):
if len(args):
return 42
return _collections.deque.__new__(cls)
BadDeque() * 42
(The
Change by Oren Milman :
--
keywords: +patch
pull_requests: +3774
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue31608>
___
___
Python-
Oren Milman added the comment:
I would be happy to open such a PR, if you don't mind.
--
nosy: +Oren Milman
___
Python tracker
<https://bugs.python.org/i
Change by Oren Milman :
--
pull_requests: +3775
___
Python tracker
<https://bugs.python.org/issue6986>
___
___
Python-bugs-list mailing list
Unsubscribe:
Oren Milman added the comment:
Yet another code that causes a SystemError:
import zipimport
importer = zipimport.zipimporter('foo.zip')
tup_as_list =
list(zipimport._zip_directory_cache['foo.zip']['foo\\__init__.py'])
tup_as_list[0] = None
zipimport._zip_d
Oren Milman added the comment:
thanks :)
opened http://psf.upfronthosting.co.za/roundup/meta/issue642
--
___
Python tracker
<https://bugs.python.org/issue31
Oren Milman added the comment:
fixed indeed. thanks! :)
--
___
Python tracker
<https://bugs.python.org/issue31605>
___
___
Python-bugs-list mailing list
Unsub
Oren Milman added the comment:
Serhiy, you suggested in https://bugs.python.org/issue15988#msg289799 that
uploading
diff files here is more convenient than in a github PR, so I uploaded my fixes
here,
and so https://github.com/python/cpython/pull/668 is now outdated, and merging
it
isn
Oren Milman added the comment:
With regard to backporting to 2.7:
In 2.7 also, PyNumber_Absolute() is called, and its return value is stored in
the variable n.
However, there is no _PyLong_NumBits(n), so there is no assertion failure.
If n isn't an integer:
- if !PyObject_IsTrue(n), the
Oren Milman added the comment:
Shouldn't we close this issue?
--
___
Python tracker
<https://bugs.python.org/issue28129>
___
___
Python-bugs-list m
Change by Oren Milman :
--
pull_requests: +3789
___
Python tracker
<https://bugs.python.org/issue31285>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Oren Milman :
--
pull_requests: +3791
___
Python tracker
<https://bugs.python.org/issue31285>
___
___
Python-bugs-list mailing list
Unsubscribe:
Oren Milman added the comment:
In 2.7, PyUnicode_Splitlines() first does:
string = PyUnicode_FromObject(string);
So i thought that PyUnicode_Splitlines() would be fine with receiving a string.
But now i realize that even in case i was right there, PyUnicode_Splitlines()
returns a unicode, and
Oren Milman added the comment:
Another thought - the existing code assumes that splitlines() returned a string.
So maybe we could just check that get_source() returned a string, and then call
the method str.splitlines() on it?
--
___
Python tracker
Oren Milman added the comment:
oh, of course, checking that get_source() returned a string before passing it to
str.splitlines() is not needed.
--
___
Python tracker
<https://bugs.python.org/issue31
Oren Milman added the comment:
But in case get_source() returned a unicode, is it likely that the splitlines()
method
of this unicode would return a 8-bit string? Currently show_warning() doesn't
handle this
scenario, as it assumes splitlines() returned an 8-bit string. Or do you think
New submission from Oren Milman :
The following code:
from ctypes import *
from _testcapi import PY_SSIZE_T_MAX, LONG_MAX
if LONG_MAX == PY_SSIZE_T_MAX == (1 << 31) - 1:
class MyArray(Array):
_type_ = c_longlong
_length_ = 1 << 29
arr = MyArray()
for
Oren Milman added the comment:
oh, i missed that. sorry.
--
___
Python tracker
<https://bugs.python.org/issue31637>
___
___
Python-bugs-list mailing list
Unsub
Change by Oren Milman :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue31637>
___
___
Change by Oren Milman :
--
pull_requests: +3807
___
Python tracker
<https://bugs.python.org/issue29843>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Oren Milman :
--
pull_requests: +3808
___
Python tracker
<https://bugs.python.org/issue31285>
___
___
Python-bugs-list mailing list
Unsubscribe:
Oren Milman added the comment:
I would be happy to write a PR that implements that.
However, i am not sure which way is better to construct a list from the return
value (an iterable, hopefully) of keys() etc.:
- Call PyList_Type() (in each of PyMapping_Keys() etc.) on the iterable, and
Oren Milman added the comment:
(for knowledge preservation's sake)
Resolving this issue would also resolve #31486.
--
___
Python tracker
<https://bugs.python.org/is
Change by Oren Milman :
--
keywords: +patch
pull_requests: +3821
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue28280>
___
___
Python-
Change by Oren Milman :
--
pull_requests: +3826
___
Python tracker
<https://bugs.python.org/issue31478>
___
___
Python-bugs-list mailing list
Unsubscribe:
Oren Milman added the comment:
IMHO, Lib/ctypes/test/test_cast.py is the relevant test.
Mark, do you still wish to provide a fix for that?
(Otherwise, i would be happy to open a PR.)
--
nosy: +Oren Milman
___
Python tracker
<ht
Oren Milman added the comment:
Should i remove the code that i wasn't able to test from the PR, and
leave such changes to someone that is able to test it?
(of course, if there is some way i can do it using a VM, please point
that out, and i would try to set up th
Change by Oren Milman :
--
keywords: +patch
pull_requests: +3839
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue21983>
___
___
Python-
Change by Oren Milman :
--
versions: +Python 3.7 -Python 2.7, Python 3.4
___
Python tracker
<https://bugs.python.org/issue21983>
___
___
Python-bugs-list mailin
Change by Oren Milman :
--
versions: +Python 2.7, Python 3.4
___
Python tracker
<https://bugs.python.org/issue21983>
___
___
Python-bugs-list mailing list
Unsub
Oren Milman added the comment:
sure
--
___
Python tracker
<https://bugs.python.org/issue31271>
___
___
Python-bugs-list mailing list
Unsubscribe:
Oren Milman added the comment:
I am not sure, but ISTM that it isn't possible for the encoder to return a
unicode and not fail later.
This is because _textiowrapper_writeflush() would call _io.BytesIO.write()
(after it called _PyBytes_Join()), and bytesio_write() calls
PyObject_GetB
New submission from Oren Milman :
On my 64-bit Windows 10, the echo here would print -1073741571:
python -c "import faulthandler; faulthandler._fatal_error(b'a' * 2 ** 22)"
echo %errorlevel%
This is code c0fd, which windbg describes as 'Stack overflow'.
This
Oren Milman added the comment:
IIUC:
In Lang's example, doing `queue = None` caused the destruction of the shared
queue, which caused a call to BaseProxy._decref() (in
multiprocessing/managers.py),
which dispatched a decref request to the manager's server process.
Meanwhile, the poo
Oren Milman added the comment:
Prof Plum, i changed the type of the issue to 'behavior', because Lang and me
both got a KeyError. if your interpreter actually crashed, please change it
back to 'crash'.
--
___
Python tracker
<
Oren Milman added the comment:
Here is some similar code that crashes for the same reasons:
# create a circular reference with a malicious __del__().
class A:
def __del__(*args):
del list1[0]
circ_ref_obj = A()
circ_ref_obj._self = circ_ref_obj
list1 = [None]
list2 = []
del
Oren Milman added the comment:
Davin and Antoine, i added you to the nosy list because you are listed
as multiprocessing experts :)
--
nosy: +davin, pitrou
___
Python tracker
<https://bugs.python.org/issue31
101 - 200 of 357 matches
Mail list logo