[issue29694] race condition in pathlib mkdir with flags parents=True
Christoph Böddeker added the comment: I had a problem that can be solved with the presented change. But I had also problems to reproduce it in a small example. I am not sure if a test is allowed to depend on external libraries. The code at the end executed with mpirun -np 3 python test.py always breaks with the current code of pathlib and works with the fix. Maybe this helps to write a test and shows a usecase where this fix is necessary. P.S.: I was not able to produce the error with multiprosessing. from mpi4py import MPI from pathlib import Path import tempfile comm = MPI.COMM_WORLD rank = comm.rank size = comm.size with tempfile.TemporaryDirectory() as tmp_dir: tmp_dir = comm.bcast(tmp_dir, root=0) p = Path(tmp_dir) / 'a' / 'b' comm.barrier() p.mkdir(parents=True, exist_ok=True) ------ nosy: +Christoph Böddeker ___ Python tracker <http://bugs.python.org/issue29694> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26062] IPython4 bash magic ! with {} does not work with Python 3.5.1
New submission from Christoph Böddeker: Hello, I found a wrong behavior with IPython 4 in combination with Python 3.5.1. Normally in a command like "In [2]: !echo {a}" everything inside {} is interpreted with python and inserted to executed the line with bash. After I done a upgrade tp Python 3.5.1 this wasn't working. After a downgrade (3.5.0) it was working. In the bottom is an example, where "In [2]: !echo {a}" are the important lines. In [2]: !echo {a} * Python 3.5.0 -> 3 * Python 3.5.1 -> {a} Best regards Christoph --- $ ipython Python 3.5.1 |Anaconda 2.4.0 (64-bit)| (default, Dec 7 2015, 11:16:01) Type "copyright", "credits" or "license" for more information. IPython 4.0.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]: a = 3 In [2]: !echo {a} {a} In [3]: --- conda install python=3.5.0 Fetching package metadata: Solving package specifications: Package plan for installation in environment /opt/anaconda3: The following packages will be DOWNGRADED: python: 3.5.1-0 --> 3.5.0-1 Proceed ([y]/n)? y Unlinking packages ... [ COMPLETE ]|###| 100% Linking packages ... [ COMPLETE ]|###| 100% --- $ ipython Python 3.5.0 |Anaconda 2.4.0 (64-bit)| (default, Oct 19 2015, 21:57:25) Type "copyright", "credits" or "license" for more information. IPython 4.0.0 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]: a = 3 In [2]: !echo {a} 3 In [3]: -- messages: 257833 nosy: Christoph Böddeker priority: normal severity: normal status: open title: IPython4 bash magic ! with {} does not work with Python 3.5.1 type: behavior versions: Python 3.5 ___ Python tracker <http://bugs.python.org/issue26062> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26062] IPython4 bash magic ! with {} does not work with Python 3.5.1
Christoph Böddeker added the comment: That's true. Now I have finde the reason. Someone has changed a function in lib/python3.5/string.py : _vformat. This function returns now a tuple (befor it was only one return value). IPython inherits from this object in lib/python3.5/site-packages/IPython/utils/text.py Because of this change the IPython code is not working. It seems to me, that this change in python is not nessesary. I don't, know how to find the commit, message who has changed this and why. Python 3.5.0: def _vformat( ..., auto_arg_index=0): ... format_spec = self._vformat( ..., auto_arg_index=auto_arg_index) ... return ''.join(result) Python 3.5.1: def _vformat( ..., auto_arg_index=0): ... format_spec, auto_arg_index = self._vformat( ..., auto_arg_index=auto_arg_index) ... return ''.join(result), auto_arg_index -- status: closed -> open ___ Python tracker <http://bugs.python.org/issue26062> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26062] IPython4 bash magic ! with {} does not work with Python 3.5.1
Christoph Böddeker added the comment: ok, thanks, I have opend there an issue https://github.com/ipython/ipython/issues/9120 -- ___ Python tracker <http://bugs.python.org/issue26062> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com