[issue45985] AttributeError from @property inadvertantly flows into __getattr__

2021-12-05 Thread Ofer Koren
New submission from Ofer Koren : There's For quite a long time I've been seeing this bug: >>> class A(): ... @property ... def foo(self): ... return self.bar # < this is where it all starts ('bar' isn't found) ... ... def __getattr__(self, attr): ...

[issue38251] urllib.request memory leak / overflow

2019-09-23 Thread Ofer Sadan
Ofer Sadan added the comment: I appreciate the suggestion and the update, thank you! -- ___ Python tracker <https://bugs.python.org/issue38251> ___ ___ Pytho

[issue38251] urllib.request memory leak / overflow

2019-09-23 Thread Ofer Sadan
Ofer Sadan added the comment: I can confirm that testing with http instead of https this problem doesn't exist, on 3.7.4. Are the issues closed because this problem is fixed in the upcoming 3.7.5, or 3.8.0? -- ___ Python tracker <ht

[issue38251] urllib.request memory leak / overflow

2019-09-22 Thread Ofer Sadan
Ofer Sadan added the comment: Just to note: I'm using Python 3.7.4 on Windows 10 (64bit), the issue exists on both the 32bit/64bit python versions I could test on. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38251] urllib.request memory leak / overflow

2019-09-22 Thread Ofer Sadan
New submission from Ofer Sadan : running `urllib.request.urlopen` multiple times causes the memory usage to increase with each run, even after calling `close()` on the request or using `del` on the result To recreate this problem, run code: import urllib.request def ip(): r

[issue32696] Fix pickling exceptions with multiple arguments

2018-01-28 Thread Ofer
New submission from Ofer <horowitz.o...@gmail.com>: Pickling exceptions fails when a custom exception class requires multiple arguments. import pickle class MultipleArgumentsError(Exception): def __init__(self, a, b): self.a = a self.b = b pickle.loads(pickle

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2018-01-28 Thread Ofer
Ofer <horowitz.o...@gmail.com> added the comment: @jason.coombs as far as I can tell, this only works in python3, but not in python2, where it still produces the same error. -- versions: +Python 2.7 -Python 3.3 ___ Python tracke

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2018-01-28 Thread Ofer
Ofer <horowitz.o...@gmail.com> added the comment: Perhaps this is a problem for a different issue, but pickling custom exceptions fails when the exception gets more than one argument: import pickle class MultipleArgumentsError(Exception): def __init__(self, a, b):

[issue18162] Add index attribute to IndexError

2015-04-15 Thread Ofer Schwarz
Ofer Schwarz added the comment: I'm working on this now (patch hopefully coming soon), and I've hit an interesting issue: PySequence methods take care of negative indexes by adding +len before calling the subclass method (s.t. -1 becomes len-1 etc.). This means that if the subclass raises

[issue18162] Add index attribute to IndexError

2015-04-15 Thread Ofer Schwarz
Changes by Ofer Schwarz os.uran...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file39055/indexerror.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18162

[issue18162] Add index attribute to IndexError

2015-04-15 Thread Ofer Schwarz
Changes by Ofer Schwarz os.uran...@gmail.com: Added file: http://bugs.python.org/file39056/indexerror.tests ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18162

[issue18162] Add index attribute to IndexError

2015-04-15 Thread Ofer Schwarz
Changes by Ofer Schwarz os.uran...@gmail.com: Added file: http://bugs.python.org/file39060/indexerror_all.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18162

[issue18166] 'value' attribute for ValueError

2015-04-14 Thread Ofer Schwarz
Ofer Schwarz added the comment: There's actually no advantage for a weakref here, since the exception object already holds an indirect reference to all the raising frame's locals through __traceback__. -- nosy: +blackfawn ___ Python tracker rep

[issue18166] 'value' attribute for ValueError

2015-04-14 Thread Ofer Schwarz
Ofer Schwarz added the comment: So, this is actually impossible to do. Since exceptions are c-level classes, adding members to ValueError means anything that multiple-inherits from ValueError and any other complex exception gets a multiple bases layout conflict. There's already one such class

[issue23960] PyErr_SetImportError doesn't clean up on some errors

2015-04-14 Thread Ofer Schwarz
New submission from Ofer Schwarz: When creating kwargs to construct the ImportError, if PyDict_SetItemString fails the function returns without decref'ing the already-created locals. -- components: Interpreter Core files: importerrorcleanup.patch keywords: patch messages: 241052 nosy

[issue21345] multiprocessing.Pool._handle_workers sleeps too long

2015-04-13 Thread Ofer Schwarz
Ofer Schwarz added the comment: I couldn't reproduce this on my machine, but I have no idea if I'm using the wrong sequence of operations, or type of pool, or if my machine is just faster or something else entirely. Johannes, can you upload a repro code for this? -- nosy: +blackfawn