[issue34086] logging.Handler.handleError regressed in python3

2018-07-10 Thread Oren
New submission from Oren : In python2, calling Handler.handleError may not be strictly correct, but it doesn't raise an exception. However, this has regressed since this patch: https://hg.python.org/cpython/rev/d7b868cdd9bb $ cat logbug.py import logging class CustomHandler(logging.Ha

[issue34086] logging.Handler.handleError regressed in python3

2018-07-10 Thread Oren
Oren added the comment: I realize that there is a legitimate argument that handleError() is being used wrong in the example, but since it used to work, it'd be nice if it still did. I came across this after converting a codebase to python3 and it took a while for this problem to a

[issue34086] logging.Handler.handleError regressed in python3

2018-07-10 Thread Oren
Change by Oren : -- nosy: +vinay.sajip ___ Python tracker <https://bugs.python.org/issue34086> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34086] logging.Handler.handleError regressed in python3

2018-07-11 Thread Oren
Oren added the comment: I totally agree that this involves misusing handleError. I ended up fixing the code that originally caused the problem, since it was wrong in the first place. The reason I filed this bug and that I think it's worth fixing is that in previous versions, the pr

[issue34086] logging.Handler.handleError regressed in python3

2018-07-11 Thread Oren
Oren added the comment: The code that was causing this problem looked something like: -- def emit(self, record): ... response = requests.post(...) if not response.ok: self.handleError(record) ... -- In this case, something does apparently go wrong, but it doesn't act

[issue34086] logging.Handler.handleError regressed in python3

2018-07-11 Thread Oren
Oren added the comment: You're right - I misread those examples, sorry about that. It looks like my former colleague may have invented the bad code in question. I'm ok with closing as "not a bug" - I do think not fixing it adds a small potential friction for people upg

[issue9035] os.path.ismount on windows doesn't support windows mount points

2011-10-04 Thread Oren Held
Oren Held added the comment: Anything wrong with the following simple approach? (e.g. is it bad to depend on win32file?) def win_ismount(path): import win32file volume_path = win32file.GetVolumePathName(path) return volume_path == path # May have to ignore a trailing backslash

[issue11102] configure doesn't find "major()" on HP-UX v11.31

2011-06-14 Thread Oren Held
Oren Held added the comment: Any tip on how to make this patch get committed? :) -- ___ Python tracker <http://bugs.python.org/issue11102> ___ ___ Python-bug

[issue1516897] Use dynload_shlib on newer HP-UX versions

2011-05-04 Thread Oren Held
Oren Held added the comment: ajaksu2: the ticket you referred to fixed it for Darwin only, afaik. HP-UX, regardless of versions, still use the old dynload_hpux.c. -- nosy: +Oren_Held ___ Python tracker <http://bugs.python.org/issue1516

[issue1487481] Could BIND_FIRST be removed on HP-UX?

2011-05-04 Thread Oren Held
Changes by Oren Held : -- nosy: +Oren_Held ___ Python tracker <http://bugs.python.org/issue1487481> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7242] Forking in a thread raises RuntimeError

2010-12-18 Thread Oren Held
Oren Held added the comment: Just adding some info: This bug is not Solaris-specific; I reproduced it on HP-UX 11.31. On Python 2.6.4, thread_test.py fails with the same RunTime error exception. On Python 2.6.6, it passes and things look good. -- nosy: +Oren_Held

[issue10800] libffi build failure on HP-UX 11/PA

2011-01-02 Thread Oren Held
Oren Held added the comment: I confirm that on Python 2.7.1, on HP-UX 11.31, ia64 architecture). dlmalloc.c is the problematic file, a part of libffi. I reported the same problem and solution + patch in here: http://sourceware.org/ml/libffi-discuss/2010/msg00203.html -- nosy

[issue11047] Bad description for a change

2011-01-28 Thread Oren Held
New submission from Oren Held : In the "what's new in 2.7", there is some mistake in the description of issue 7902. 7902, afaik, disables the fallback to absolute import, when requesting a relative import fails. If I got it right, the description states the opposite.

[issue11102] configure doesn't find "major()" on HP-UX v11.31

2011-02-02 Thread Oren Held
New submission from Oren Held : The effect eventually is that on HP-UX v3 there are no os.major() and os.minor() functions. I tried to dig deeper to find out what's wrong, and it seems that 'configure' script fails on 'major' check and thus disables the 'majo

[issue11102] configure doesn't find "major()" on HP-UX v11.31

2011-02-02 Thread Oren Held
Oren Held added the comment: Attaching a patch I've made for fixing the problem in HP-UX, simply by #including sys/types.h on the configure test.. 1. I'm not sure it'll be good for all platforms; maybe we need more 'configure' magic here to make it #include on this

[issue11102] configure doesn't find "major()" on HP-UX v11.31

2011-02-04 Thread Oren Held
Oren Held added the comment: Just a small note: after this patch applied, building Python 2.7.1 was successful on Linux (SLES 11, RHEL 5, Ubuntu 10.10), Solaris 10, and HP-UX 11 v3. (I didn't get to build Python on other platforms) -- ___ P

[issue10800] libffi build failure on HP-UX 11/PA

2011-02-08 Thread Oren Held
Oren Held added the comment: quick update: libffi (upstream) has this fixed now in git commit dc411e8f991 . -- ___ Python tracker <http://bugs.python.org/issue10

[issue3676] Obsolete references to PEP 291 in py3k lib

2008-08-25 Thread Oren Tirosh
New submission from Oren Tirosh <[EMAIL PROTECTED]>: The comments in the following modules contain references to PEP 291 or to remaining compatible with version 2.x. However, they all include non backward compatible python 3 syntax like "except x as y". decimal.py modulefind

[issue7902] relative import broken

2010-02-12 Thread Oren Held
Changes by Oren Held : -- nosy: +Oren_Held ___ Python tracker <http://bugs.python.org/issue7902> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8599] _execvpe should behaves inconsistently when PATH includes a filename

2010-05-02 Thread Oren Held
New submission from Oren Held : A. Description When running os._execvpe with a relative pathname that does not exist, I'd expect to get ENOENT error. But there is an edge case in which Python throws ENOTDIR error - when the LAST element in PATH is a regular file (e.g. /bin/ls). This ca

[issue8599] _execvpe behaves inconsistently when PATH includes a filename

2010-05-02 Thread Oren Held
Changes by Oren Held : -- title: _execvpe should behaves inconsistently when PATH includes a filename -> _execvpe behaves inconsistently when PATH includes a filename ___ Python tracker <http://bugs.python.org/iss

[issue15988] Inconsistency in overflow error messages of integer argument

2017-08-03 Thread Oren Milman
Oren Milman added the comment: How do we proceed? should I update (if needed) each of the patches I uploaded in March to eliminate commit conflicts? or can someone review them as they are now? -- ___ Python tracker <http://bugs.python.org/issue15

[issue31147] a mostly useless check in list_extend()

2017-08-08 Thread Oren Milman
New submission from Oren Milman: in listobject.c, in case list_extend() receives an 'iterable' which isn't 'self' nor a tuple nor a list, we have the following (heavily edited for brevity): mn = Py_SIZE(self) + PyObject_LengthHint(iterable); list_resize(self,

[issue31187] suboptimal code in Py_ReprEnter()

2017-08-12 Thread Oren Milman
New submission from Oren Milman: in Objects/object.c, Py_ReprEnter() does the following: - try to retrieve the Py_Repr list from the thread-state dict. - in case the list is not in the dict, add it to the dict as an empty list. - check whether the received object is in the Py_Repr

[issue31147] a suboptimal check in list_extend()

2017-08-12 Thread Oren Milman
Changes by Oren Milman : -- title: a mostly useless check in list_extend() -> a suboptimal check in list_extend() ___ Python tracker <http://bugs.python.org/issu

[issue31147] a suboptimal check in list_extend()

2017-08-13 Thread Oren Milman
Oren Milman added the comment: thank you for the elaborate reply :) do you feel the same about changing the check to (Py_SIZE(self) < (self->allocated >> 1)) ? -- ___ Python tracker <http://bugs.python

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-08-16 Thread Oren Milman
Oren Milman added the comment: I replied to your comments in Rietveld, Serhiy. (http://bugs.python.org/review/28261) also, i found two places with a quite similar issue: - in Objects/exceptions.c in ImportError_init: >>> ImportError(1, 2, 3, 4, a=5, b=6, c=7) Traceback (mo

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-08-17 Thread Oren Milman
Oren Milman added the comment: After more looking, I found this issue in two more places: - in Modules/itertoolsmodule.c in product_new: >>> itertools.product(0, a=1, b=2, c=3, d=4, e=5, f=6) Traceback (most recent call last): File "", line 1, in TypeError:

[issue28332] silent truncations in socket.htons and socket.ntohs

2017-08-17 Thread Oren Milman
Changes by Oren Milman : -- title: Deprecated silent truncations in socket.htons and socket.ntohs. -> silent truncations in socket.htons and socket.ntohs ___ Python tracker <http://bugs.python.org/issu

[issue28332] keyword arguments

2017-08-17 Thread Oren Milman
Changes by Oren Milman : -- title: silent truncations in socket.htons and socket.ntohs -> keyword arguments ___ Python tracker <http://bugs.python.org/issu

[issue28332] Deprecated silent truncations in socket.htons and socket.ntohs.

2017-08-17 Thread Oren Milman
Changes by Oren Milman : -- title: keyword arguments -> Deprecated silent truncations in socket.htons and socket.ntohs. ___ Python tracker <http://bugs.python.org/issu

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-08-17 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3157 ___ Python tracker <http://bugs.python.org/issue28261> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31229] wrong error messages when too many kwargs are received

2017-08-17 Thread Oren Milman
New submission from Oren Milman: Some functions produce wrong error messages in case they receive too many keyword arguments: - in Objects/exceptions.c - ImportError_init: >>> ImportError(1, 2, 3, 4, a=5, b=6, c=7) TypeError: ImportError() takes at most 2 arguments (3 given) -

[issue31229] wrong error messages when too many kwargs are received

2017-08-17 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch Added file: http://bugs.python.org/file47091/issue31229_ver1.diff ___ Python tracker <http://bugs.python.org/issue31

[issue31236] improve some error messages of min() and max()

2017-08-18 Thread Oren Milman
New submission from Oren Milman: currently, we have the following: >>> min(0, a=1) TypeError: 'a' is an invalid keyword argument for this function >>> max(0, a=1) TypeError: 'a' is an invalid keyword argument for this function >>>

[issue31236] improve some error messages of min() and max()

2017-08-18 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3181 ___ Python tracker <http://bugs.python.org/issue31236> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29843] errors raised by ctypes.Array for invalid _length_ attribute

2017-08-19 Thread Oren Milman
Oren Milman added the comment: I am not sure I understood your question, Igor. I compiled with https://github.com/python/cpython/pull/3006, and got: class T(ctypes.Array): _type_ = ctypes.c_int _length_ = 2 ** 1000 Traceback (most recent call last): File "&quo

[issue29832] Don't refer to getsockaddrarg in error messages

2017-08-20 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3199 ___ Python tracker <http://bugs.python.org/issue29832> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29832] Don't refer to getsockaddrarg in error messages

2017-08-20 Thread Oren Milman
Oren Milman added the comment: here is a dirty script to test my PR. the script contains tests to anything I managed to test using my Windows 10 and Ubuntu 16.04 VM, i.e. all of the changes, except for the 'unsupported CAN protocol' message, and the changes of the code that h

[issue31243] checks whether PyArg_ParseTuple returned a negative int

2017-08-21 Thread Oren Milman
New submission from Oren Milman: according to the docs (https://docs.python.org/3.7/c-api/arg.html?highlight=pyarg_parsetuple#c.PyArg_ParseTuple), PyArg_ParseTuple returns true for success or false for failure. I also looked at the implementation in Python/getargs.c, and it seems that indeed

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-08-21 Thread Oren Milman
Oren Milman added the comment: it seems that I have missed some places which are part of this issue, at least in Modules/_io/textio.c (one of them is mentioned in #31243). also, when fixing these, we should also add a check before the call to PyArg_ParseTuple (in case such check doesn't al

[issue31243] checks whether PyArg_ParseTuple returned a negative int

2017-08-21 Thread Oren Milman
Oren Milman added the comment: yes, soon. (just wanted to hear your opinion before doing that.) -- ___ Python tracker <http://bugs.python.org/issue31243> ___ ___

[issue31229] wrong error messages when too many kwargs are received

2017-08-21 Thread Oren Milman
Oren Milman added the comment: I already wrote a patch, but I thought it would be better to wait until #31236 is resolved. this is because #31236 would change the error messages of min() and max(), and test_call tests exact error messages in CFunctionCallsErrorMessages, which is where I thought

[issue31243] checks whether PyArg_ParseTuple returned a negative int

2017-08-21 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3208 ___ Python tracker <http://bugs.python.org/issue31243> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31229] wrong error messages when too many kwargs are received

2017-08-22 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3218 ___ Python tracker <http://bugs.python.org/issue31229> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-08-24 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3237 ___ Python tracker <http://bugs.python.org/issue28261> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31271] an assertion failure in io.TextIOWrapper.write

2017-08-24 Thread Oren Milman
New submission from Oren Milman: currently, the following causes an assertion in Modules/_io/textio.c in _io_TextIOWrapper_write_impl() to fail: import codecs import io class BadEncoder(): def encode(self, dummy): return 42 def _get_bad_encoder(dummy): return BadEncoder

[issue31271] an assertion failure in io.TextIOWrapper.write

2017-08-24 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3240 ___ Python tracker <http://bugs.python.org/issue31271> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31271] an assertion failure in io.TextIOWrapper.write

2017-08-24 Thread Oren Milman
Oren Milman added the comment: Just checked on current 3.6 on my Windows 10. The assertion failes, and it is in line 1337. oh my. -- ___ Python tracker <http://bugs.python.org/issue31

[issue31271] an assertion failure in io.TextIOWrapper.write

2017-08-25 Thread Oren Milman
Oren Milman added the comment: As Serhiy pointed out on github, the assertion failure can be easily reproduced by the following: import codecs import io rot13 = codecs.lookup("rot13") rot13._is_text_encoding = True t = io.TextIOWrapper(io.BytesIO(b'foo'), encoding=&

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-08-25 Thread Oren Milman
Oren Milman added the comment: sure -- ___ Python tracker <http://bugs.python.org/issue28261> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue31271] an assertion failure in io.TextIOWrapper.write

2017-08-26 Thread Oren Milman
Oren Milman added the comment: all three versions do 'self->pending_bytes_count += PyBytes_GET_SIZE(b);', while 'b' is the object the encoder returned. in 3.6 and 3.7, the implementation of PyBytes_GET_SIZE() includes 'assert(PyBytes_Check(op))',

[issue31271] an assertion failure in io.TextIOWrapper.write

2017-08-26 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3247 ___ Python tracker <http://bugs.python.org/issue31271> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-08-26 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3248 ___ Python tracker <http://bugs.python.org/issue28261> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples

2017-08-26 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3251 ___ Python tracker <http://bugs.python.org/issue28261> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-08-26 Thread Oren Milman
New submission from Oren Milman: 1. the following causes an assertion failure in Python/_warnings.c in show_warning(): import warnings class BadLoader: def get_source(self, fullname): class BadSource: def splitlines(self): return [42] return

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-08-26 Thread Oren Milman
Oren Milman added the comment: on a second thought, BadSource could be a subclass of str, so maybe we should just check whether module_globals['__loader__'].get_source(module_globals['__name__']).splitlines()[lineno-1] is a str, and whether module_globals['__loader__&#x

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-08-27 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3259 ___ Python tracker <http://bugs.python.org/issue31285> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31291] an assertion failure in zipimport.zipimporter.get_data()

2017-08-28 Thread Oren Milman
New submission from Oren Milman: on Windows, assuming the file 'foo.zip' exists, the following would cause an assertion failure in Modules/zipimport.c in zipimport_zipimporter_get_data_impl(): import zipimport class BadStr(str): def replace(self, old, new):

[issue31291] an assertion failure in zipimport.zipimporter.get_data()

2017-08-28 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3269 ___ Python tracker <http://bugs.python.org/issue31291> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-08-28 Thread Oren Milman
Oren Milman added the comment: ISTM that your solution is better than mine, Serhiy, so I updated the PR. -- ___ Python tracker <http://bugs.python.org/issue31

[issue31293] crashes in multiply_float_timedelta() and in truedivide_timedelta_float()

2017-08-28 Thread Oren Milman
New submission from Oren Milman: both of the following true division and multiplication operations crash the interpreter: import datetime class BadFloat(float): def as_integer_ratio(self): return (1 << 1000) - 1 datetime.timedelta() / BadFloat() datetime.timedelta() * Ba

[issue31293] crashes in multiply_float_timedelta() and in truedivide_timedelta_float()

2017-08-28 Thread Oren Milman
Oren Milman added the comment: i am working on a patch. BTW, is there anywhere a list of what counts as an extension module, and what counts as the interpreter core? -- ___ Python tracker <http://bugs.python.org/issue31

[issue31293] crashes in multiply_float_timedelta() and in truedivide_timedelta_float()

2017-08-28 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3270 ___ Python tracker <http://bugs.python.org/issue31293> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31293] crashes in multiply_float_timedelta() and in truedivide_timedelta_float()

2017-08-28 Thread Oren Milman
Oren Milman added the comment: I guess you meant for me to check whether the following has any problem: import decimal class BadFloat(float): def as_integer_ratio(self): return 1 << 1000 decimal.Decimal.from_float(BadFloat()) so it doesn't crash. if IIUC, this is be

[issue31291] an assertion failure in zipimport.zipimporter.get_data()

2017-08-28 Thread Oren Milman
Oren Milman added the comment: I understand that our goal is to make Python better, not to make me happier :) anyway, I haven't checked, but I am quite sure that similar code might crash the interpreter on a release build of Python. (just wanted to clarify that, as you used the term '

[issue31291] an assertion failure in zipimport.zipimporter.get_data()

2017-08-28 Thread Oren Milman
Oren Milman added the comment: just checked, and indeed on my Windows 10 the original code I posted here crashes the interpreter. The patch in the PR undermines duck-typing, and that's why I added a comment there, stating I wasn't sure about the patch. an alternate solution would be

[issue31243] checks whether PyArg_ParseTuple returned a negative int

2017-08-29 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3275 ___ Python tracker <http://bugs.python.org/issue31243> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31243] checks whether PyArg_ParseTuple returned a negative int

2017-08-29 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3276 ___ Python tracker <http://bugs.python.org/issue31243> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31291] zipimport.zipimporter.get_data() crashes when path.replace() returns a non-str

2017-08-30 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3287 ___ Python tracker <http://bugs.python.org/issue31291> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31311] SystemError raised by PyCData_setstate() in case __dict__ is not a dict

2017-08-30 Thread Oren Milman
New submission from Oren Milman: The following code causes PyCData_setstate() (in Modules/_ctypes/_ctypes.c) to raise a SystemError: import ctypes class BadStruct(ctypes.Structure): def __dict__(self): pass BadStruct().__setstate__({}, b'foo') this is because PyCDat

[issue31311] SystemError raised by PyCData_setstate() in case __dict__ is not a dict

2017-08-30 Thread Oren Milman
Oren Milman added the comment: typo - change the format to "O!s#" -- ___ Python tracker <http://bugs.python.org/issue31311> ___ ___ Python-bugs-l

[issue31311] a SystemError and a crash in PyCData_setstate() when __dict__ is bad

2017-08-31 Thread Oren Milman
Changes by Oren Milman : -- title: SystemError raised by PyCData_setstate() in case __dict__ is not a dict -> a SystemError and a crash in PyCData_setstate() when __dict__ is bad ___ Python tracker <http://bugs.python.org/issu

[issue31311] a SystemError and a crash in PyCData_setstate() when __dict__ is bad

2017-08-31 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3298 ___ Python tracker <http://bugs.python.org/issue31311> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31311] a SystemError and a crash in PyCData_setstate() when __dict__ is bad

2017-08-31 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3299 ___ Python tracker <http://bugs.python.org/issue31311> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31311] a SystemError and a crash in PyCData_setstate() when __dict__ is bad

2017-08-31 Thread Oren Milman
Changes by Oren Milman : -- components: +ctypes -Extension Modules ___ Python tracker <http://bugs.python.org/issue31311> ___ ___ Python-bugs-list mailin

[issue31315] assertion failure in imp.create_dynamic(), when spec.name is not a string

2017-08-31 Thread Oren Milman
New submission from Oren Milman: The following code causes an assertion failure in get_encoded_name(), which is called by _PyImport_LoadDynamicModuleWithSpec() (in Python/importdl.c): import imp class BadSpec: name = 42 origin = 'foo' imp.create_dynamic(BadSpec()) this

[issue31315] assertion failure in imp.create_dynamic(), when spec.name is not a string

2017-08-31 Thread Oren Milman
Oren Milman added the comment: do you mean that we should fix it to raise a TypeError? the assertion is there, but not explicitly. get_encoded_name() calls PyUnicode_FindChar(), which calls PyUnicode_READY(), which does assert(_PyUnicode_CHECK). so i get: >>> import imp >>>

[issue31315] assertion failure in imp.create_dynamic(), when spec.name is not a string

2017-08-31 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +3301 ___ Python tracker <http://bugs.python.org/issue31315> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31404] undefined behavior and crashes in case of a bad sys.modules

2017-09-09 Thread Oren Milman
New submission from Oren Milman: at least on my Windows, the following code: import sys sys.modules = [] - when run interactively, causes weird behavior, e.g. exit() doesn't exit the interpreter, and print() doesn't print. then, pressing Ctrl+C causes 'Assertion failed:

[issue31311] a SystemError and a crash in PyCData_setstate() when __dict__ is bad

2017-09-10 Thread Oren Milman
Oren Milman added the comment: just in case it was missed - I have opened two PRs for this issue. -- ___ Python tracker <https://bugs.python.org/issue31

[issue31406] crashes when comparing between a Decimal object and a bad Rational object

2017-09-10 Thread Oren Milman
New submission from Oren Milman: The following code crashes the interpreter: import decimal import fractions class BadRational(fractions.Fraction): numerator = None denominator = 42 decimal.Decimal() < BadRational() this is because numerator_as_decimal() (in Modules/_deci

[issue31406] crashes when comparing between a Decimal object and a bad Rational object

2017-09-10 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch pull_requests: +3467 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31406> ___ ___ Py

[issue31411] SystemError raised by warn_explicit() in case warnings.onceregistry is not a dict

2017-09-10 Thread Oren Milman
New submission from Oren Milman: The following code causes warn_explicit() (in Python/_warnings.c) to raise a SystemError: import warnings warnings.filterwarnings('once') warnings.onceregistry = None warnings.warn_explicit(message='foo', category=Wa

[issue31411] SystemError raised by warn_explicit() in case warnings.onceregistry is not a dict

2017-09-10 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch pull_requests: +3475 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31411> ___ ___ Py

[issue31416] assertion failures in warn_explicit() in case of a bad warnings.filters or warnings.defaultaction

2017-09-11 Thread Oren Milman
New submission from Oren Milman: The following code causes an assertion failure in warn_explicit() (in Python/_warnings.c): import warnings warnings.filters = [(None, None, Warning, None, 0)] warnings.warn_explicit(message='foo', category=Warning, filename='bar',

[issue31416] assertion failures in warn_explicit() in case of a bad warnings.filters or warnings.defaultaction

2017-09-11 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch pull_requests: +3489 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31416> ___ ___ Py

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-11 Thread Oren Milman
New submission from Oren Milman: The following code causes an assertion failure in PyErr_WriteUnraisable() (in Python/errors.c): class BadException(Exception): __module__ = None class BadClass: def __del__(self): raise BadException foo = BadClass() del foo this is because

[issue31428] ElementTree.Element.__deepcopy__() raises a SystemError in case of a bad memo

2017-09-12 Thread Oren Milman
New submission from Oren Milman: The following code causes ElementTree.Element.__deepcopy__() to raise a SystemError: class BadMemo: def get(*args): return None import xml.etree.ElementTree xml.etree.ElementTree.Element('foo').__deepcopy__(BadMemo()) this

[issue31428] ElementTree.Element.__deepcopy__() raises a SystemError in case of a bad memo

2017-09-12 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch pull_requests: +3507 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue31442] assertion failures on Windows in Python/traceback.c in case of a bad io.open

2017-09-13 Thread Oren Milman
New submission from Oren Milman: the following code causes an assertion failure on my Windows: import io def _bad_open(*args): return 42 io.open = _bad_open 1/0 this is because _Py_DisplaySourceLine() (in Python/traceback.c) assumes that the return value of io.open() is valid. IIUC, this

[issue31444] ResourceWarning in Python/traceback.c in case of a bad io.TextIOWrapper

2017-09-13 Thread Oren Milman
New submission from Oren Milman: the following code causes a ResourceWarning: import io def _bad_TextIOWrapper(*args): return None io.TextIOWrapper = _bad_TextIOWrapper 1/0 this is because _Py_DisplaySourceLine() (in Python/traceback.c) assumes that io.TextIOWrapper() returned a stream

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-13 Thread Oren Milman
Oren Milman added the comment: what do you mean by 'Implicit converting to str can raise a warning or exception if __module__ is a bytes object.'? should we treat __module__ differently in case it is a bytes object? -- ___ Python track

[issue31418] assertion failure in PyErr_WriteUnraisable() in case of an exception with a bad __module__

2017-09-13 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch pull_requests: +3534 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31418> ___ ___ Py

[issue31471] assertion failure in subprocess.Popen() in case the env arg has a bad keys() method

2017-09-14 Thread Oren Milman
New submission from Oren Milman: The following code causes an assertion failure on Windows: class BadEnv(dict): keys = None import subprocess import sys subprocess.Popen([sys.executable, "-c", "pass"], env=BadEnv()) this is because getenvironment() (in Modu

[issue31471] assertion failure in subprocess.Popen() in case the env arg has a bad keys() method

2017-09-14 Thread Oren Milman
Changes by Oren Milman : -- keywords: +patch pull_requests: +3570 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue31478] assertion failure in random.seed() in case the seed argument has a bad __abs__() method

2017-09-14 Thread Oren Milman
New submission from Oren Milman: The following code causes an assertion failure: class BadInt(int): def __abs__(self): return None import random random.seed(BadInt()) this is because random_seed() (in Modules/_randommodule.c) assumes that PyNumber_Absolute() returned an int, and

[issue31471] assertion failure in subprocess.Popen() in case the env arg has a bad keys() method

2017-09-14 Thread Oren Milman
Oren Milman added the comment: in 2.7 getenvironment() is in PC/_subprocess.c, and it also calls PyMapping_Values() immediately after calling PyMapping_Keys(). however, _PyObject_FastCallDict() doesn't exist here. in case of an error in both PyMapping_Keys() and PyMapping_Values(), the err

[issue31478] assertion failure in random.seed() in case the seed argument has a bad __abs__() method

2017-09-14 Thread Oren Milman
Oren Milman added the comment: sure. but what about the TypeError message? should it complain about the return value of abs(seed)? (the docs of random.seed don't mention abs().) -- ___ Python tracker <https://bugs.python.org/is

[issue31471] assertion failure in subprocess.Popen() in case the env arg has a bad keys() method

2017-09-14 Thread Oren Milman
Oren Milman added the comment: OK. but there isn't an assertion failure to test in 2.7, so is adding a test still relevant? -- ___ Python tracker <https://bugs.python.org/is

  1   2   3   4   >