[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-07-04 Thread Osvaldo Santana Neto
Osvaldo Santana Neto added the comment: Hi Serhiy Storchaka, I need to thank you for your valuable guidance. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-06-26 Thread Osvaldo Santana Neto
Osvaldo Santana Neto added the comment: Pull Request #2409 (https://github.com/python/cpython/pull/2409) opened. -- pull_requests: +2457 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-25 Thread Osvaldo Santana Neto
Osvaldo Santana Neto added the comment: New version of patch: 1. Use RLock instead of Lock (Mark & Antoine recomendation) 2. Add lock acquire at `__setitem__` and `__delitem__` as following (Mark & Antoine recomendation) 3. Add lock protection in `__repr__` implementation. I've some q

[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-24 Thread Osvaldo Santana Neto
Osvaldo Santana Neto added the comment: This is an alternative implementation using `threading.Lock()`. The main issue with this implementation relies on the fact that we've to import the `threading` module during CPython interpreter loading (currently it's not imported by default

[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-24 Thread Osvaldo Santana Neto
Osvaldo Santana Neto added the comment: This patch implements a lock protection (as suggested by Antoine) using `_thread.allocate_lock()` module (instead of `threading.Lock()`) due to the fact that CPython interpreter already imports `_thread` module during its bootstrap process

[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-24 Thread Osvaldo Santana Neto
Osvaldo Santana Neto added the comment: There are exceptions being raised in many applications (as reported here and in http://bugs.python.org/issue25641) and there are three paths to follow: 1. We handle this exception somewhere; 2. We avoid raising it; 3. Just leave it. I don't care about

[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-23 Thread Osvaldo Santana Neto
Osvaldo Santana Neto added the comment: I agree with Jelle about the fix's implementation. But I disagree of suggestion to implement lock at the application side. I disagree because some external libraries may want to access os.environ in a concurrent fashion without lock acquiring. That's

[issue30441] os.environ raises RuntimeError: dictionary changed size during iteration

2017-05-23 Thread Osvaldo Santana Neto
New submission from Osvaldo Santana Neto: We're facing ocasional RuntimeError exceptions in a multithreaded application when one of the threads creates new entries to the environment (os.environ). I'm not so sure if the attached patch fixes this issue the right way, so, feel free to propose

[issue21183] Doctest capture only AssertionError but not printed text

2014-04-08 Thread Osvaldo Santana Neto
New submission from Osvaldo Santana Neto: The following doctest should pass, but it fails: def spam(): print(eggs) ... assert spam() eggs Traceback (most recent call last): AssertionError But if we remove the print output from printed results the test pass: def

[issue21183] Doctest capture only AssertionError but not printed text

2014-04-08 Thread Osvaldo Santana Neto
Osvaldo Santana Neto added the comment: Hi Tim, I tried to find more information in documentation before opening this bug but I need to confess that I didn't read the footnote. Thanks and sorry for the invalid report. -- resolution: - invalid status: open - closed

Python for Maemo -- new version released

2007-01-16 Thread Osvaldo Santana
be found at http://pymaemo.garage.maemo.org/pymaemo25_releasenotes.html. We encourage everybody to try the software and report bugs/improvement requests. Thanks, Osvaldo Santana Neto [1] http://europe.nokia.com/phones/n800 -- Osvaldo Santana Neto (aCiDBaSe) http://www.pythonologia.org -- http