Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from WoLpH/portalocker@develop #6

Open
wants to merge 301 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
301 commits
Select commit Hold shift + click to select a range
242e166
Incrementing version to v1.7.1
wolph Jul 16, 2020
59b2f40
Merge tag 'v1.7.1' into develop
wolph Jul 16, 2020
88e9787
Merge branch 'release/1.7.1'
wolph Jul 16, 2020
1a186cf
Merge pull request #53 from naggie/rmdeadcode
wolph Aug 1, 2020
65c318a
added boudned semaphore to fix #57
wolph Aug 2, 2020
596da9f
cleanup
wolph Aug 2, 2020
c8f749d
added base class for lock
wolph Aug 2, 2020
159d232
removed old python versions
wolph Aug 2, 2020
a2f19f9
Merge branch 'master' into develop
wolph Aug 2, 2020
be67c96
removed type hint to support python 3.5
wolph Aug 2, 2020
588b013
replaced pypy with pypy3
wolph Aug 2, 2020
fff2a4c
force converting pathlib to filename
wolph Aug 2, 2020
6d68184
Incrementing version to v2.0.0
wolph Aug 2, 2020
927d53e
Merge tag 'v2.0.0' into develop
wolph Aug 2, 2020
73cfb3a
Merge branch 'release/2.0.0'
wolph Aug 2, 2020
68347a4
Testing fix for `ResourceWarning` reported in #59
wolph Dec 15, 2020
addca52
fixed AlreadyLocked issue thanks to @BoniLindsley
wolph Jan 21, 2021
d53be62
merging...
wolph Jan 21, 2021
d3872fc
fixed appveyor tests
wolph Jan 21, 2021
216c613
attempting appveyor config update
wolph Jan 21, 2021
cdbefd4
removed python 2.7 from appveyor as well
wolph Jan 21, 2021
41de2a0
added full type hinting
wolph Jan 22, 2021
50151b8
added redis locking
wolph Jan 23, 2021
364f580
refactored and modernized code
wolph Jan 23, 2021
125b760
appveyor fix?
wolph Jan 23, 2021
76aff98
enabled redis tests
wolph Jan 23, 2021
a7d12c5
added redis docs
wolph Jan 23, 2021
10d5df0
updated python versions
wolph Jan 23, 2021
051190b
attempt to fix appveyor
wolph Jan 23, 2021
ee3d354
attempting travis fix
wolph Jan 23, 2021
a18add3
attempt to fix appveyor
wolph Jan 23, 2021
d0eda36
attempt to fix appveyor
wolph Jan 23, 2021
f9dc18f
attempt to fix appveyor
wolph Jan 23, 2021
38e59d7
attempt to fix appveyor
wolph Jan 23, 2021
0d876dd
attempt to fix appveyor
wolph Jan 23, 2021
79f1848
attempt to fix appveyor
wolph Jan 23, 2021
df37e4a
attempt to fix appveyor
wolph Jan 23, 2021
afca030
redis doesnt use redis exceptions on windows apparently
wolph Jan 23, 2021
c1682e8
ignoring redis from coverage
wolph Jan 23, 2021
0330730
Incrementing version to v2.1.0
wolph Jan 23, 2021
4f1c95f
Merge tag 'v2.1.0' into develop
wolph Jan 23, 2021
921b8a6
Merge branch 'release/2.1.0'
wolph Jan 23, 2021
be0518f
Update README.rst
wolph Jan 23, 2021
ee98f12
made redis locks survive network drops as well
wolph Jan 30, 2021
34a8c1b
Incrementing version to v2.2.0
wolph Jan 30, 2021
c23f874
Merge branch 'release/2.2.0'
wolph Jan 30, 2021
4f3537f
Merge tag 'v2.2.0' into develop
wolph Jan 30, 2021
9abc99b
Merge branch 'develop' of github.com:WoLpH/portalocker into develop
wolph Jan 30, 2021
3c5ea79
updated travis location
wolph Jan 30, 2021
8e52808
removed debug statement
wolph Feb 3, 2021
ad33bc1
Incrementing version to v2.2.1
wolph Feb 3, 2021
638f67a
Merge tag 'v2.2.1' into develop
wolph Feb 3, 2021
061837e
Merge branch 'release/2.2.1'
wolph Feb 3, 2021
0e5da05
replaced prints with debug logs
lkindrat-xmos Mar 26, 2021
3347c2d
Merge pull request #62 from lkindrat-xmos/develop
wolph Mar 26, 2021
4ac4ade
added PEP 561 compliance thanks to @BoniLindsley
wolph Mar 26, 2021
e99c2d6
Incrementing version to v2.3.0
wolph Mar 28, 2021
631352f
Merge tag 'v2.3.0' into develop
wolph Mar 28, 2021
ec9f5da
Merge branch 'release/2.3.0'
wolph Mar 28, 2021
dde0ae6
renamed redis module to fix #65
wolph May 25, 2021
489e88a
Revert "renamed redis module to fix #65". Turned out not to be a bug :)
wolph May 26, 2021
0f420c8
alternative fix for #65
wolph May 26, 2021
5a23e40
Remove Python 2 classifier
rayluo Aug 20, 2021
a89f21a
Explicitly mentions Semantic Versioning
rayluo Aug 20, 2021
8cf8d17
Merge pull request #67 from rayluo/patch-1
wolph Aug 21, 2021
90d267a
Incrementing version to v2.3.1
wolph Aug 21, 2021
248e450
Merge branch 'release/2.3.1'
wolph Aug 21, 2021
d0eab05
Merge tag 'v2.3.1' into develop
wolph Aug 21, 2021
b28e6ed
Actually regulate the Python version requirement
rayluo Aug 21, 2021
d480d4e
updated pywin32 due to CVE-2021-32559
wolph Aug 27, 2021
fcef6eb
Merge branch 'patch-1' into develop
wolph Aug 27, 2021
6f89fcd
requiring python 3.5 or above due to type hinting
wolph Aug 27, 2021
ee0f8c0
Explicitly mentions Semantic Versioning
rayluo Aug 20, 2021
33f67e0
Merge pull request #68 from rayluo/patch-2
wolph Aug 27, 2021
4257ced
Incrementing version to v2.3.2
wolph Aug 27, 2021
0806422
Merge branch 'release/2.3.2'
wolph Aug 27, 2021
871814f
updated python version classifiers
wolph Aug 28, 2021
3025e66
added more type hinting to fix #60
wolph Sep 14, 2021
6989f2a
Fix typo
kianmeng Nov 15, 2021
b47d5f4
Merge pull request #71 from kianmeng/fix-typo
wolph Nov 15, 2021
f5823f8
`README.rst`: Trim outdated `.EXCLUSIVE` snippets
joshuacwnewton Feb 16, 2022
7750eb7
Added github actions tests
wolph Feb 17, 2022
94c9351
cleaned up old distutils and sphinx directives
wolph Feb 17, 2022
6dac360
fixing appveyor tests?
wolph Feb 17, 2022
b6d4409
Merge pull request #75 from joshuacwnewton/patch-1
wolph Feb 17, 2022
449b1ef
github actions using tox
wolph Feb 17, 2022
ee8305c
replacing travis
wolph Feb 17, 2022
cc989fe
added warning when combining timeout with blocking mode to fix #74
wolph Feb 17, 2022
277c2e4
fixed flake8 issues
wolph Feb 17, 2022
970b981
Incrementing version to v2.4.0
wolph Feb 17, 2022
00cffcb
Merge tag 'v2.4.0' into develop
wolph Feb 17, 2022
232c391
Merge branch 'release/2.4.0'
wolph Feb 17, 2022
c69616e
Run tests on Linux, OS X and Windows
wolph Jul 2, 2022
309fabc
added python 3.11 to builds
wolph Jul 2, 2022
ca9ea75
disabling 3.11 github builds for now as they're not supported
wolph Jul 2, 2022
7acfa6b
run tox in parallel
wolph Jul 2, 2022
5297d67
added pip caching to build
wolph Jul 2, 2022
bc61e11
More efficient testing
wolph Jul 2, 2022
a80fbeb
More efficient testing
wolph Jul 2, 2022
136eba9
Added extra shared locks tests
wolph Jul 2, 2022
8521cc5
Added multiprocessing test cases for more test scenarios
wolph Jul 4, 2022
89e2e32
Rewrote locking systems for Windows in an attempt to fix #64
wolph Jul 4, 2022
75cdf6e
PyCharm can be stupid at times
wolph Jul 5, 2022
1e9cb83
Removing legacy testing integration into setup.py and added pytest-ti…
wolph Jul 5, 2022
213b31d
Code and debug statement cleanup
wolph Jul 5, 2022
7951ed5
Github actions is slow... increase the timeouts
wolph Jul 5, 2022
d80b55b
Made the tox flake8 task use the config instead of overriding it... s…
wolph Jul 5, 2022
45aad98
windows tests on github actions can be _really_ slow
wolph Jul 5, 2022
ec5a037
Incrementing version to v2.5.0
wolph Jul 9, 2022
2644943
Merge branch 'release/2.5.0'
wolph Jul 9, 2022
e9bc4d0
Merge tag 'v2.5.0' into develop
wolph Jul 9, 2022
0bfa4b1
Added clear warning when locking in non-blocking mode without specify…
wolph Jul 9, 2022
f8adb50
Updated Python 2 example to Python 3
wolph Jul 9, 2022
9b7bfab
skip linux/unix/mac tests on windows
wolph Jul 9, 2022
41e059c
flake8 compliance
wolph Jul 9, 2022
fccafdd
skip linux/unix/mac tests on windows
wolph Jul 9, 2022
22d7639
Incrementing version to v2.5.1
wolph Jul 9, 2022
8b6456d
Merge tag 'v2.5.1' into develop
wolph Jul 9, 2022
f28b56a
Merge branch 'release/2.5.1'
wolph Jul 9, 2022
35b500b
Updated license to 3-clause BSD License. Fixes #79
wolph Aug 1, 2022
26a1522
testing fix for #80
wolph Oct 18, 2022
568d213
Added fileno() support. Fixes #80 on posix systems
wolph Oct 18, 2022
faf78f1
Incrementing version to v2.6.0
wolph Oct 18, 2022
823963f
Merge tag 'v2.6.0' into develop
wolph Oct 18, 2022
6a0d828
Merge branch 'release/2.6.0'
wolph Oct 18, 2022
b5c5db1
Fix license
shadchin Nov 2, 2022
7f9e070
Merge pull request #81 from shadchin/patch-1
wolph Nov 2, 2022
e8939e8
BoundedSemaphore: do not fail if fail_when_locked is False
flaviens Jan 12, 2023
a3b717f
Added `fail_when_locked=False` support to `BoundedSemaphore` thanks t…
wolph Jan 18, 2023
789f69d
fixed issue with new flake8 release
wolph Jan 18, 2023
19c2dac
Disabling warning as error for sphinx in tox. Somehow the docs build …
wolph Jan 18, 2023
2b24ca2
silly editor inserting tabs...
wolph Jan 18, 2023
821ec36
Incrementing version to v2.7.0
wolph Jan 18, 2023
147fa9f
Merge branch 'release/2.7.0'
wolph Jan 18, 2023
c189af2
Merge tag 'v2.7.0' into develop
wolph Jan 18, 2023
1935ea6
improved docs to fix #82
wolph Jan 21, 2023
6ffc39e
added security contact information
wolph Mar 13, 2023
393c595
Added stale action
wolph Aug 21, 2023
0f8d869
updated stale file
wolph Aug 29, 2023
98d143e
updated stale file
wolph Aug 29, 2023
deb1474
Add support for Python 3.11
hugovk Nov 16, 2022
e5906d3
Drop support for EOL Python 3.5 and 3.6
hugovk Nov 16, 2022
7c146b6
Upgrade Python syntax with pyupgrade --py37-plus
hugovk Nov 16, 2022
c5e6ee2
Bump GitHub Actions
hugovk Sep 11, 2023
9d31f8e
Drop support for EOL Python 3.7
hugovk Sep 11, 2023
aa0a674
Add colour to CI logs for readability
hugovk Sep 11, 2023
21bb3df
Merge pull request #85 from hugovk/develop
wolph Sep 13, 2023
c9a4d2a
Attempting appveyor build fix
wolph Sep 13, 2023
d84fca1
Made fully ruff, pyright and mypy compliant with automatic testing th…
wolph Sep 15, 2023
ea5e180
fixed several linting/testing issues
wolph Sep 16, 2023
1021d1f
Added NamedBoundedSemaphore to fix #87
wolph Sep 16, 2023
0b3940c
added explicit stacklevel to make ruff happy
wolph Sep 16, 2023
ff7d2c2
testing with python 3.12
wolph Sep 16, 2023
58d2552
disabled python 3.12 testing until the test environments supports it
wolph Sep 16, 2023
1bf6d4c
Incrementing version to v2.8.0
wolph Sep 16, 2023
3786504
Merge tag 'v2.8.0' into develop
wolph Sep 16, 2023
b4a0e8d
Merge branch 'release/2.8.0'
wolph Sep 16, 2023
17b9be5
Removed docs from build to fix #88
wolph Sep 16, 2023
9b8ee01
Incrementing version to v2.8.1
wolph Sep 16, 2023
219cb5b
Merge branch 'release/2.8.1'
wolph Sep 16, 2023
f8b7c61
Merge tag 'v2.8.1' into develop
wolph Sep 16, 2023
3b43b84
attempt #2 to fix #88
wolph Sep 16, 2023
365c5f6
Incrementing version to v2.8.2
wolph Sep 16, 2023
36229d2
Merge branch 'release/2.8.2'
wolph Sep 16, 2023
02d1929
Merge tag 'v2.8.2' into develop
wolph Sep 16, 2023
37dd63c
Remove redundant wheel dep from pyproject.toml
mgorny Sep 17, 2023
eea5bca
Merge pull request #89 from mgorny/wheel-dep
wolph Sep 19, 2023
92e5130
Fixed try..except block losing stack trace
oliver-s-lee Mar 11, 2024
4d4ca65
Fixed try..except around fcntl.flock() accidentally catching non-time…
oliver-s-lee Mar 11, 2024
75f0236
Added support for changing the locking implementation on linux (lockf…
oliver-s-lee Mar 11, 2024
ed3efdb
Fixed opening files readonly and locking with EXCLUSIVE or vice versa…
oliver-s-lee Mar 11, 2024
2335cd5
Added tests for both flock and lockf mechanisms
oliver-s-lee Mar 11, 2024
a0de45a
Added some comments to explain the exception raising logic in portalo…
oliver-s-lee Mar 12, 2024
bb31c06
Added catch for non LockException classes to make sure the file handl…
oliver-s-lee Mar 12, 2024
c348de8
Removed fcntl import from tests so windows tests can pass
oliver-s-lee Apr 26, 2024
1a7fba4
Added test for missing coverage of exception logic
oliver-s-lee Apr 26, 2024
47a620b
Fixed instance comparison for string literal
oliver-s-lee Apr 26, 2024
c55199f
Added skip for exception test on windows
oliver-s-lee Apr 26, 2024
07e66c4
Added patch for test in a desperate attempt to satisfy code coverage …
oliver-s-lee Apr 26, 2024
2261180
Added debugging to try and fix tests
oliver-s-lee May 11, 2024
96d0621
fixed pyright errors
wolph May 11, 2024
7c932d4
Merge branch 'develop' into Digichem-Project-develop
wolph May 11, 2024
a3acc9a
fixed several typing, linting and other small issues
wolph May 11, 2024
c584ef4
replaced format specifier with f-string to make ruff happy
wolph May 11, 2024
ef2c055
made mypy happy
wolph May 11, 2024
becd9d1
debugging combined file output
wolph May 11, 2024
5ee48d8
making ruff happy for tests
wolph May 11, 2024
f43234a
perhaps a fix for the combined file on linux?!
wolph May 11, 2024
94414e4
Fixed combine script to support multi-line import statements
wolph May 20, 2024
6c22661
tiny ruff fix
wolph May 20, 2024
dcc023f
windows tests on github actions can be _really_ slow
wolph May 20, 2024
a0c5c75
Simplified tests
wolph May 20, 2024
b775cf0
fixed tests for linux
wolph Jun 21, 2024
561f3c8
increased timeouts for slower platforms
wolph Jun 21, 2024
d7315a5
pyright fixes
wolph Jun 21, 2024
80d40bf
ruff fixes
wolph Jun 21, 2024
5cc3aad
made mypy happy
wolph Jun 21, 2024
f3d91af
type hinting improvements
wolph Jun 22, 2024
57ae441
typing protocols cannot be covered by tests
wolph Jun 22, 2024
eedc656
Incrementing version to v2.9.0
wolph Jun 22, 2024
c78d055
Incrementing version to v2.10.0
wolph Jun 22, 2024
06d58c4
Merge branch 'release/2.10.0'
wolph Jun 22, 2024
c91e04d
Merge tag 'v2.10.0' into develop
wolph Jun 22, 2024
d73b90c
Fix spelling error
harmstyler Jun 25, 2024
76ab42e
Merge pull request #96 from harmstyler/patch-1
wolph Jul 13, 2024
11cb7a8
increasing the timeouts to make the osx tests less flaky
wolph Jul 13, 2024
c2c433d
Incrementing version to v2.10.1
wolph Jul 13, 2024
4d5905f
Merge branch 'release/2.10.1'
wolph Jul 13, 2024
47339bb
Merge tag 'v2.10.1' into develop
wolph Jul 13, 2024
d42529f
testing new release with CI
wolph Nov 18, 2024
cada500
Fixed several bugs with the testing suite.
wolph Nov 18, 2024
db87193
made ruff happy, hopefully no issues with these updates.
wolph Nov 18, 2024
fdfd9cf
made ruff happy, hopefully no issues with these updates.
wolph Nov 18, 2024
446d7a2
made mypy happy-ish
wolph Nov 18, 2024
7a8f746
updated github actions
wolph Nov 18, 2024
5f9061f
fixed sphinx config to new format
wolph Nov 18, 2024
eb885f2
made flake8 happy too
wolph Nov 18, 2024
9d705ee
Dropped support for deprecated Python versions, only 3.9 and up are s…
wolph Nov 18, 2024
928b29d
Incrementing version to v3.0.0
wolph Nov 18, 2024
28cbe83
Merge tag 'v3.0.0' into develop
wolph Nov 18, 2024
582adc2
Merge branch 'release/3.0.0'
wolph Nov 18, 2024
8d4ea12
Include missing typehints (mostly function return value typehints)
jonded94 Dec 17, 2024
3710a17
Merge pull request #99 from jonded94/include-missing-typehints
wolph Dec 24, 2024
d3f04df
aded ruff config
wolph Dec 24, 2024
a9c3847
modernized mypy config
wolph Dec 24, 2024
422f630
mypy strict
wolph Dec 25, 2024
a993d64
fixed tests, pyright, ruff, etc...
wolph Dec 31, 2024
96bd076
Bump the actions group with 4 updates
dependabot[bot] Dec 31, 2024
59ecb63
Merge pull request #100 from wolph/dependabot/github_actions/master/a…
wolph Dec 31, 2024
46140ec
added retries to flaky tests
wolph Dec 31, 2024
fbd5006
testing appveyor fix
wolph Dec 31, 2024
6fdd217
fixed uv sync dependencies
wolph Dec 31, 2024
1ea2915
fixed uv sync dependencies
wolph Dec 31, 2024
9a02788
testing appveyor fix
wolph Dec 31, 2024
f8f257e
testing appveyor fix
wolph Dec 31, 2024
818cda9
testing appveyor fix
wolph Dec 31, 2024
43f2f59
testing appveyor fix
wolph Dec 31, 2024
433fbff
testing tox github actions fix
wolph Dec 31, 2024
a104dd3
testing tox github actions fix
wolph Dec 31, 2024
63c543a
increased timeout for lses flaky test
wolph Dec 31, 2024
f066f05
last attempt for appveyor
wolph Dec 31, 2024
fe481b6
Incrementing version to v3.1.0
wolph Dec 31, 2024
c0f15c6
Merge branch 'release/3.1.0'
wolph Dec 31, 2024
56ddd57
Merge tag 'v3.1.0' into develop
wolph Dec 31, 2024
69cb824
improved combine script
wolph Dec 31, 2024
d5086e1
removed accidental toml requirements
wolph Dec 31, 2024
22a68d0
Incrementing version to v3.1.1
wolph Dec 31, 2024
9155166
Merge branch 'release/3.1.1'
wolph Dec 31, 2024
025c198
Merge tag 'v3.1.1' into develop
wolph Dec 31, 2024
78104bd
Update stale.yml
wolph Jan 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[report]
ignore_errors = True
fail_under = 100
exclude_lines =
pragma: no cover
Expand All @@ -9,6 +10,10 @@ exclude_lines =
raise NotImplementedError
if 0:
if __name__ == .__main__.:
typing.Protocol

omit =
portalocker/redis.py

[run]
source = src
Expand Down
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: wolph
25 changes: 25 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
target-branch: master
labels:
- "meta: CI"
schedule:
interval: monthly
groups:
actions:
patterns:
- "*"

- package-ecosystem: pip
directory: /
target-branch: master
labels:
- "meta: deps"
schedule:
interval: monthly
groups:
actions:
patterns:
- "*"
51 changes: 51 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: lint

on:
push:
pull_request:

env:
FORCE_COLOR: 1

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Python version
run: python --version

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel mypy
python -m pip install -e '.[tests]'

- name: Linting with pyright
uses: jakebailey/pyright-action@v2
with:
path: portalocker portalocker_tests

- name: Linting with ruff
uses: jpetrucciani/ruff-check@main
with:
extra-args: portalocker portalocker_tests

- name: Linting with mypy
run: |
python -m mypy portalocker portalocker_tests

65 changes: 65 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: test

on:
push:
branches: [ develop, master ]
pull_request:
branches: [ develop ]

env:
FORCE_COLOR: 1

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Run os specific tests on the slower OS X/Windows machines
windows_osx:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
os: ['macos-latest', 'windows-latest']

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Python version
run: python --version
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e ".[tests]"
- name: Test with pytest
run: python -m pytest

# Run all tests including Redis on Linux
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4
- name: Start Redis
uses: supercharge/[email protected]
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Python version
run: python --version
- name: Install dependencies
run: |
python -m pip install tox
- name: Test with pytest
run: tox -p all
17 changes: 17 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Close stale issues and pull requests

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Run every day at midnight

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
days-before-stale: 30
days-before-pr-stale: -1
exempt-issue-labels: in-progress,help-wanted,pinned,security,enhancement
remove-issue-stale-when-updated: true
73 changes: 73 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
ci:
autoupdate_branch: "master"
autoupdate_commit_msg: "⬆️ update pre-commit hooks"
skip:
- basedpyright

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-illegal-windows-names
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
- id: fix-byte-order-marker
- id: forbid-submodules
- id: name-tests-test
args: [--pytest-test-first]
- id: no-commit-to-branch
args: [--branch, master]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.43.0
hooks:
- id: markdownlint

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.21
hooks:
- id: mdformat
additional_dependencies:
- mdformat-gfm
- mdformat-gfm-alerts

- repo: https://github.com/crate-ci/typos
rev: v1.28.4
hooks:
- id: typos

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args: [--fix, --show-fixes]
types_or: [python, pyi]

- id: ruff-format
types_or: [python, pyi]

- repo: local
hooks:
- id: basedpyright
name: basedpyright
entry: uv run --no-sync --locked basedpyright
language: system
types_or: [python, pyi]
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

29 changes: 29 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
For newer changes please look at the comments for the Git tags:
https://github.com/WoLpH/portalocker/tags

For more details the commit log for the master branch could be useful:
https://github.com/WoLpH/portalocker/commits/master

1.5:

* Moved tests to prevent collisions with other packages

1.4:

* Added optional file open parameters

1.3:

* Improved documentation
* Added file handle to locking exceptions

1.2:

* Added signed releases and tags to PyPI and Git


1.1:

* Added support for Python 3.6+
* Using real time to calculate timeout

1.0:

* Complete code refactor.
Expand Down
49 changes: 6 additions & 43 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,48 +1,11 @@
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
--------------------------------------------
Copyright 2022 Rick van Hattem

1. This LICENSE AGREEMENT is between the Python Software Foundation
("PSF"), and the Individual or Organization ("Licensee") accessing and
otherwise using this software ("Python") in source or binary form and
its associated documentation.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

2. Subject to the terms and conditions of this License Agreement, PSF hereby
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python alone or in any derivative version,
provided, however, that PSF's License Agreement and PSF's notice of copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Python Software Foundation; All Rights Reserved" are retained in Python alone or
in any derivative version prepared by Licensee.
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

3. In the event Licensee prepares a derivative work that is based on
or incorporates Python or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

4. PSF is making Python available to Licensee on an "AS IS"
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.

5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.

6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.

7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee. This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.

8. By copying, installing or otherwise using Python, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include CHANGELOG
include CHANGELOG.rst
include README.rst
include LICENSE
recursive-include tests *.py
recursive-include portalocker_tests *.py
Loading