Skip to content

Commit 78a781f

Browse files
authored
Merge pull request #7 from ramonaoptics/compatibility_with_filelock_3.13
Compatibility with filelock 3.13
2 parents ffde78f + e143aa1 commit 78a781f

5 files changed

Lines changed: 36 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ['3.7', '3.9', '3.11']
14+
python-version: ['3.7', '3.9', '3.10', '3.11', '3.12']
1515
fail-fast: false
1616

1717
steps:

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
## 0.0.6 (2023/04/18)
1+
## 0.0.8 (2023/10/30)
2+
3+
- Fix compatibility with filelock 3.13.0.
4+
5+
## 0.0.7 (2023/04/18)
26

37
- Fix compatibility with filelock 3.12.0.
48
- multiuserfilelock (all version) are incompatible with filelock 3.11.0.

multiuserfilelock/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,21 @@
3131

3232

3333
class MultiUserFileLock(FileLock):
34+
def __new__(cls, *args, **kwargs):
35+
# Can be removed if upstream accepts our fix for this
36+
# https://github.com/tox-dev/filelock/pull/284
37+
if Version(filelock.__version__) >= Version("3.13.0"):
38+
if 'group' in kwargs:
39+
kwargs.pop('group')
40+
if 'chmod' in kwargs:
41+
kwargs.pop('chmod')
42+
if 'user' in kwargs:
43+
kwargs.pop('user')
44+
45+
return super().__new__(cls, *args, **kwargs)
46+
else:
47+
return super().__new__(cls)
48+
3449
def __init__(self, *args, user=None, group=None, chmod=0o666, **kwargs):
3550
if os.name == 'nt':
3651
self._user = None

setup.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,19 @@
1616
long_description_content_type='text/markdown',
1717
license='BSD',
1818
python_requires='>=3.7',
19+
classifiers=[
20+
'Development Status :: 2 - Pre-Alpha',
21+
'Intended Audience :: Developers',
22+
'License :: OSI Approved :: BSD License',
23+
'Natural Language :: English',
24+
'Programming Language :: Python :: 3',
25+
'Programming Language :: Python :: 3.7',
26+
'Programming Language :: Python :: 3.8',
27+
'Programming Language :: Python :: 3.9',
28+
'Programming Language :: Python :: 3.10',
29+
'Programming Language :: Python :: 3.11',
30+
'Programming Language :: Python :: 3.12',
31+
],
1932
install_requires=[
2033
'filelock!=3.11.0',
2134
],

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ setenv =
1414
deps =
1515
-r{toxinidir}/requirements_dev.txt
1616
3.9: filelock==3.10.7
17+
3.10: filelock==3.12.4
18+
3.11: filelock==3.13.0
1719
; If you want to make tox run the tests with the same versions, create a
1820
; requirements.txt with the pinned versions and uncomment the following line:
1921
; -r{toxinidir}/requirements.txt

0 commit comments

Comments
 (0)