[issue39363] zipfile with multiprocessing: zipfile.BadZipFile

2020-01-16 Thread maxime-lemonnier
maxime-lemonnier added the comment: Here's my console output: python3 test_filesource.py lock file access_mode = file, nb processes = 1, res = 110289, 0.08039402961730957 ms/frame file access_mode = file, nb processes = 4, res = 110289, 0.32297492027282715 ms/frame lock access_mode = loc

[issue39363] zipfile with multiprocessing: zipfile.BadZipFile

2020-01-16 Thread maxime-lemonnier
New submission from maxime-lemonnier : zipfile sometimes throws zipfile.BadZipFile when opening the same zip file from multiple processes see attached file to reproduce the error. You'll need a zipfile with multiple files in it to reproduce. -- components: Library (Lib)

[issue39363] zipfile with multiprocessing: zipfile.BadZipFile

2020-01-16 Thread maxime-lemonnier
Change by maxime-lemonnier : Added file: https://bugs.python.org/file48848/foo_bar_small.zip ___ Python tracker <https://bugs.python.org/issue39363> ___ ___ Python-bug

[issue6730] dict.fromkeys() should not cross reference mutable value by default

2009-08-18 Thread Maxime Lemonnier
Maxime Lemonnier added the comment: It does not suits my needs. what if keys are passed as an argument? I have to add this ugly loop : for key in keys: d[key] = [] I really think that : 1) The doc should warn about it, since it is a very weird behaviour 2) There could at least be

[issue6730] dict.fromkeys() should not cross reference mutable value by default

2009-08-18 Thread Maxime Lemonnier
New submission from Maxime Lemonnier : Consider the following code sample : keys = ['x', 'y', 'z'] d = dict.fromkeys(keys, []) d['x'].append('dont') d['y'].append('mix') d['z'].append('me!') print d