sk- / git-lint

improving source code one step at a time
Apache License 2.0
237 stars 78 forks source link

`utilities.py:_open_for_write` no longer has a race condition #119

Closed rawrgulmuffins closed 6 years ago

rawrgulmuffins commented 6 years ago

Fixes #117

Changes

Testing

% nosetests test/unittest
nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module
................................................................................
----------------------------------------------------------------------
Ran 80 tests in 1.818s

OK

NOTE

In a perfect would I would prove that there's no race condition using injected locks to stall the main process until the cache directory is created but I don't know how to do that with multiprocess.

rawrgulmuffins commented 6 years ago

Looks like in 3.4 Path.mkdir doesn't have the exists option. Switching to pathlib2 if running on Python3.4.

sk- commented 6 years ago

Thanks for the changes.

sk- commented 6 years ago

Version 0.1.2 was uploaded to pypi.