limits 5.4.0__tar.gz → 5.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- limits-5.6.0/.devcontainer/devcontainer.json +28 -0
- limits-5.6.0/.gitattributes +2 -0
- limits-5.6.0/.github/FUNDING.yml +2 -0
- limits-5.6.0/.github/ISSUE_TEMPLATE/bug-report.md +39 -0
- limits-5.6.0/.github/ISSUE_TEMPLATE/feature.md +17 -0
- limits-5.6.0/.github/dependabot.yml +11 -0
- limits-5.6.0/.github/workflows/compatibility.yml +71 -0
- limits-5.6.0/.github/workflows/main.yml +262 -0
- limits-5.6.0/.gitignore +15 -0
- limits-5.6.0/.readthedocs.yml +12 -0
- limits-5.6.0/CODE_OF_CONDUCT.md +128 -0
- {limits-5.4.0 → limits-5.6.0}/HISTORY.rst +23 -0
- {limits-5.4.0 → limits-5.6.0}/MANIFEST.in +0 -5
- limits-5.6.0/Makefile +11 -0
- {limits-5.4.0 → limits-5.6.0}/PKG-INFO +27 -47
- limits-5.6.0/_netlify_headers +6 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/index.rst +2 -2
- limits-5.6.0/docker-compose.yml +267 -0
- {limits-5.4.0 → limits-5.6.0}/limits/__init__.py +1 -1
- limits-5.6.0/limits/_version.py +34 -0
- limits-5.6.0/limits/_version.pyi +1 -0
- limits-5.6.0/push-release.sh +8 -0
- limits-5.6.0/pyproject.toml +141 -0
- limits-5.6.0/pytest.ini +26 -0
- limits-5.6.0/scripts/github_release_notes.sh +8 -0
- {limits-5.4.0 → limits-5.6.0}/setup.cfg +1 -6
- limits-5.6.0/tag.sh +25 -0
- limits-5.6.0/tests/__init__.py +0 -0
- limits-5.6.0/tests/aio/__init__.py +0 -0
- limits-5.6.0/tests/aio/storage/__init__.py +0 -0
- limits-5.6.0/tests/aio/storage/test_memory.py +17 -0
- limits-5.6.0/tests/aio/storage/test_redis.py +21 -0
- limits-5.6.0/tests/aio/test_storage.py +462 -0
- limits-5.6.0/tests/aio/test_strategy.py +361 -0
- limits-5.6.0/tests/benchmarks/__init__.py +0 -0
- limits-5.6.0/tests/benchmarks/conftest.py +60 -0
- limits-5.6.0/tests/benchmarks/test_storage.py +266 -0
- limits-5.6.0/tests/conftest.py +383 -0
- limits-5.6.0/tests/data/memcached_auth.txt +2 -0
- limits-5.6.0/tests/integration/test_concurrency.py +171 -0
- limits-5.6.0/tests/storage/__init__.py +0 -0
- limits-5.6.0/tests/storage/test_memory.py +17 -0
- limits-5.6.0/tests/storage/test_redis.py +26 -0
- limits-5.6.0/tests/tls/ca.crt +32 -0
- limits-5.6.0/tests/tls/ca.key +52 -0
- limits-5.6.0/tests/tls/ca.txt +1 -0
- limits-5.6.0/tests/tls/client.crt +26 -0
- limits-5.6.0/tests/tls/client.key +28 -0
- limits-5.6.0/tests/tls/openssl.cnf +7 -0
- limits-5.6.0/tests/tls/redis.crt +23 -0
- limits-5.6.0/tests/tls/redis.dh +8 -0
- limits-5.6.0/tests/tls/redis.key +28 -0
- limits-5.6.0/tests/tls/server.crt +26 -0
- limits-5.6.0/tests/tls/server.key +28 -0
- limits-5.6.0/tests/utils.py +305 -0
- limits-5.6.0/uv.lock +1837 -0
- limits-5.4.0/limits/_version.py +0 -21
- limits-5.4.0/limits/version.py +0 -3
- limits-5.4.0/limits.egg-info/PKG-INFO +0 -279
- limits-5.4.0/limits.egg-info/SOURCES.txt +0 -95
- limits-5.4.0/limits.egg-info/dependency_links.txt +0 -1
- limits-5.4.0/limits.egg-info/not-zip-safe +0 -1
- limits-5.4.0/limits.egg-info/requires.txt +0 -40
- limits-5.4.0/limits.egg-info/top_level.txt +0 -1
- limits-5.4.0/pyproject.toml +0 -25
- limits-5.4.0/requirements/ci.txt +0 -1
- limits-5.4.0/requirements/dev.txt +0 -9
- limits-5.4.0/requirements/docs.txt +0 -11
- limits-5.4.0/requirements/main.txt +0 -3
- limits-5.4.0/requirements/storage/async-memcached.txt +0 -1
- limits-5.4.0/requirements/storage/async-mongodb.txt +0 -1
- limits-5.4.0/requirements/storage/async-redis.txt +0 -1
- limits-5.4.0/requirements/storage/async-valkey.txt +0 -1
- limits-5.4.0/requirements/storage/memcached.txt +0 -1
- limits-5.4.0/requirements/storage/mongodb.txt +0 -1
- limits-5.4.0/requirements/storage/redis.txt +0 -1
- limits-5.4.0/requirements/storage/rediscluster.txt +0 -1
- limits-5.4.0/requirements/storage/valkey.txt +0 -1
- limits-5.4.0/requirements/test.txt +0 -23
- limits-5.4.0/setup.py +0 -67
- limits-5.4.0/versioneer.py +0 -2277
- {limits-5.4.0 → limits-5.6.0}/CLASSIFIERS +0 -0
- {limits-5.4.0 → limits-5.6.0}/CONTRIBUTIONS.rst +0 -0
- {limits-5.4.0 → limits-5.6.0}/LICENSE.txt +0 -0
- {limits-5.4.0 → limits-5.6.0}/README.rst +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/Makefile +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/_static/custom.css +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/api.rst +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/async.rst +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/changelog.rst +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/conf.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/custom-storage.rst +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/ext/_static/benchmark-chart.css +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/ext/_static/js/benchmark-chart.js +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/ext/_static/js/benchmark-details.js +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/ext/_static/js/benchmark-loader.js +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/ext/_templates/git_info.js +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/ext/bench_chart.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/installation.rst +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/performance.rst +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/quickstart.rst +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/storage.rst +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/strategies.rst +0 -0
- {limits-5.4.0 → limits-5.6.0}/doc/source/theme_config.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/aio/__init__.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/aio/storage/__init__.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/aio/storage/base.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/aio/storage/memcached/__init__.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/aio/storage/memcached/bridge.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/aio/storage/memcached/emcache.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/aio/storage/memcached/memcachio.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/aio/storage/memory.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/aio/storage/mongodb.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/aio/storage/redis/__init__.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/aio/storage/redis/bridge.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/aio/storage/redis/coredis.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/aio/storage/redis/redispy.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/aio/storage/redis/valkey.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/aio/strategies.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/errors.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/limits.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/py.typed +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/resources/redis/lua_scripts/acquire_moving_window.lua +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/resources/redis/lua_scripts/acquire_sliding_window.lua +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/resources/redis/lua_scripts/clear_keys.lua +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/resources/redis/lua_scripts/incr_expire.lua +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/resources/redis/lua_scripts/moving_window.lua +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/resources/redis/lua_scripts/sliding_window.lua +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/storage/__init__.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/storage/base.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/storage/memcached.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/storage/memory.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/storage/mongodb.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/storage/redis.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/storage/redis_cluster.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/storage/redis_sentinel.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/storage/registry.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/strategies.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/typing.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/limits/util.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/tests/test_limit_granularities.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/tests/test_limits.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/tests/test_ratelimit_parser.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/tests/test_storage.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/tests/test_strategy.py +0 -0
- {limits-5.4.0 → limits-5.6.0}/tests/test_utils.py +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
|
2
|
+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
|
|
3
|
+
{
|
|
4
|
+
"name": "Python 3",
|
|
5
|
+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
|
6
|
+
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
|
|
7
|
+
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
|
|
8
|
+
"workspaceFolder": "/workspace",
|
|
9
|
+
// Features to add to the dev container. More info: https://containers.dev/features.
|
|
10
|
+
"features": {
|
|
11
|
+
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
|
|
12
|
+
},
|
|
13
|
+
"mounts": [
|
|
14
|
+
"type=bind,source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,target=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh,readonly"
|
|
15
|
+
],
|
|
16
|
+
|
|
17
|
+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
|
18
|
+
// "forwardPorts": [],
|
|
19
|
+
|
|
20
|
+
// Use 'postCreateCommand' to run commands after the container is created.
|
|
21
|
+
"postCreateCommand": "pip install --no-binary protobuf -r requirements/ci.txt"
|
|
22
|
+
|
|
23
|
+
// Configure tool-specific properties.
|
|
24
|
+
// "customizations": {},
|
|
25
|
+
|
|
26
|
+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
|
27
|
+
// "remoteUser": "root"
|
|
28
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: Submit a bug report
|
|
4
|
+
labels: 'bug'
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!--- Provide a general summary of the issue in the Title above -->
|
|
9
|
+
|
|
10
|
+
## Expected Behaviour
|
|
11
|
+
|
|
12
|
+
<!--- What should happen -->
|
|
13
|
+
|
|
14
|
+
## Current Behaviour
|
|
15
|
+
|
|
16
|
+
<!--- What happens instead of the expected behaviour -->
|
|
17
|
+
|
|
18
|
+
## Steps to Reproduce
|
|
19
|
+
|
|
20
|
+
<!---
|
|
21
|
+
Provide a link to an example, or an unambiguous set of steps to
|
|
22
|
+
reproduce this bug. Include code to reproduce, if relevant
|
|
23
|
+
--->
|
|
24
|
+
1.
|
|
25
|
+
1.
|
|
26
|
+
1.
|
|
27
|
+
1.
|
|
28
|
+
|
|
29
|
+
## Your Environment
|
|
30
|
+
|
|
31
|
+
<!--- Include as many relevant details about the environment you experienced the bug in -->
|
|
32
|
+
|
|
33
|
+
- limits version:
|
|
34
|
+
- Operating system:
|
|
35
|
+
|
|
36
|
+
<!--
|
|
37
|
+
You can freely edit this text. Remove any lines you believe are unnecessary.
|
|
38
|
+
-->
|
|
39
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature or Enhancement
|
|
3
|
+
about: Propose a new feature or enhancement
|
|
4
|
+
labels: 'enhancement'
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!--- Provide a general summary of the proposal in the Title above -->
|
|
9
|
+
|
|
10
|
+
## Expected Behaviour
|
|
11
|
+
|
|
12
|
+
<!--- How should this new feature work -->
|
|
13
|
+
|
|
14
|
+
<!--
|
|
15
|
+
You can freely edit this text. Remove any lines you believe are unnecessary.
|
|
16
|
+
-->
|
|
17
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "uv"
|
|
9
|
+
directory: "/"
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "daily"
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: Compatibility
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ['master']
|
|
6
|
+
tags: ['*']
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: 0 23 * * *
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
fail-fast: false
|
|
14
|
+
matrix:
|
|
15
|
+
service_version: ["ALL_LATEST=true"]
|
|
16
|
+
async_redis_implementation: ["coredis"]
|
|
17
|
+
marker: [not integration]
|
|
18
|
+
include:
|
|
19
|
+
- service_version: "LIMITS_REDIS_SERVER_VERSION=8.0"
|
|
20
|
+
marker: "redis or redis_cluster or redis_sentinel"
|
|
21
|
+
- service_version: "LIMITS_REDIS_SERVER_VERSION=7.4"
|
|
22
|
+
marker: "redis or redis_cluster or redis_sentinel"
|
|
23
|
+
- service_version: "LIMITS_REDIS_SERVER_VERSION=7.2"
|
|
24
|
+
marker: "redis or redis_cluster or redis_sentinel"
|
|
25
|
+
- service_version: "LIMITS_REDIS_SERVER_VERSION=7.0"
|
|
26
|
+
marker: "redis or redis_cluster or redis_sentinel"
|
|
27
|
+
- service_version: "LIMITS_REDIS_SERVER_VERSION=7.4"
|
|
28
|
+
marker: "redis or redis_cluster or redis_sentinel"
|
|
29
|
+
async_redis_implementation: "redispy"
|
|
30
|
+
- service_version: "LIMITS_REDIS_SERVER_VERSION=7.2"
|
|
31
|
+
marker: "redis or redis_cluster or redis_sentinel"
|
|
32
|
+
async_redis_implementation: "redispy"
|
|
33
|
+
- service_version: "LIMITS_REDIS_SERVER_VERSION=7.0"
|
|
34
|
+
marker: "redis or redis_cluster or redis_sentinel"
|
|
35
|
+
async_redis_implementation: "redispy"
|
|
36
|
+
- service_version: "LIMITS_MONGODB_SERVER_VERSION=8.0"
|
|
37
|
+
marker: "mongodb"
|
|
38
|
+
- service_version: "LIMITS_MONGODB_SERVER_VERSION=7.0"
|
|
39
|
+
marker: "mongodb"
|
|
40
|
+
- service_version: "LIMITS_MONGODB_SERVER_VERSION=6.0"
|
|
41
|
+
marker: "mongodb"
|
|
42
|
+
- service_version: "LIMITS_MONGODB_SERVER_VERSION=5.0"
|
|
43
|
+
marker: "mongodb"
|
|
44
|
+
- service_version: "LIMITS_MEMCACHED_SERVER_VERSION=1.6.15"
|
|
45
|
+
marker: "memcached"
|
|
46
|
+
- service_version: "LIMITS_MEMCACHED_SERVER_VERSION=1.6.6"
|
|
47
|
+
marker: "memcached"
|
|
48
|
+
- service_version: "LIMITS_MEMCACHED_SERVER_VERSION=1.5.16"
|
|
49
|
+
marker: "memcached"
|
|
50
|
+
- service_version: "LIMITS_VALKEY_SERVER_VERSION=7.2"
|
|
51
|
+
marker: "valkey"
|
|
52
|
+
- service_version: "LIMITS_VALKEY_SERVER_VERSION=8.0"
|
|
53
|
+
marker: "valkey"
|
|
54
|
+
|
|
55
|
+
steps:
|
|
56
|
+
- uses: actions/checkout@v4
|
|
57
|
+
- name: Install uv and Python
|
|
58
|
+
uses: astral-sh/setup-uv@v6
|
|
59
|
+
with:
|
|
60
|
+
enable-cache: true
|
|
61
|
+
python-version: ${{ matrix.python-version }}
|
|
62
|
+
- name: Setup uv venv
|
|
63
|
+
run: |
|
|
64
|
+
uv sync --locked --all-extras --group ci
|
|
65
|
+
- name: Tests
|
|
66
|
+
env:
|
|
67
|
+
CI: "True"
|
|
68
|
+
ASYNC_REDIS_IMPLEMENTATION: "${{ matrix.async_redis_implementation }}"
|
|
69
|
+
run: |
|
|
70
|
+
eval "export ${{ matrix.service_version }}"
|
|
71
|
+
uv run py.test -m "${{ matrix.marker }} and not benchmark" --cov-report=xml --cov-branch --max-runs=3
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
lint:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
strategy:
|
|
9
|
+
matrix:
|
|
10
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- name: Install uv and Python
|
|
14
|
+
uses: astral-sh/setup-uv@v6
|
|
15
|
+
with:
|
|
16
|
+
enable-cache: true
|
|
17
|
+
python-version: ${{ matrix.python-version }}
|
|
18
|
+
- name: Setup uv venv
|
|
19
|
+
run: |
|
|
20
|
+
uv sync --locked --all-extras --group ci
|
|
21
|
+
- name: Lint with ruff
|
|
22
|
+
run: |
|
|
23
|
+
uv run ruff check --select I limits tests
|
|
24
|
+
uv run ruff format --check limits tests
|
|
25
|
+
uv run ruff check limits tests
|
|
26
|
+
- name: Check types
|
|
27
|
+
run: |
|
|
28
|
+
uv run mypy limits
|
|
29
|
+
test:
|
|
30
|
+
strategy:
|
|
31
|
+
fail-fast: false
|
|
32
|
+
matrix:
|
|
33
|
+
python-version: ["3.10"]
|
|
34
|
+
marker: [not (integration or benchmark)]
|
|
35
|
+
os: [ubuntu-latest]
|
|
36
|
+
async_redis_implementation: ["coredis"]
|
|
37
|
+
include:
|
|
38
|
+
- python-version: "3.10"
|
|
39
|
+
marker: 'not benchmark'
|
|
40
|
+
os: ubuntu-latest
|
|
41
|
+
- python-version: "3.11"
|
|
42
|
+
marker: 'not benchmark'
|
|
43
|
+
os: ubuntu-latest
|
|
44
|
+
- python-version: "3.12"
|
|
45
|
+
marker: 'not benchmark'
|
|
46
|
+
os: ubuntu-latest
|
|
47
|
+
- python-version: "3.12"
|
|
48
|
+
marker: 'not benchmark and (redis or redis_cluster or redis_sentinel) and asyncio'
|
|
49
|
+
os: ubuntu-latest
|
|
50
|
+
async_redis_implementation: "redispy"
|
|
51
|
+
- python-version: "3.13"
|
|
52
|
+
marker: 'not benchmark and (redis or redis_cluster or redis_sentinel) and asyncio'
|
|
53
|
+
os: ubuntu-latest
|
|
54
|
+
async_redis_implementation: "redispy"
|
|
55
|
+
- python-version: "3.12"
|
|
56
|
+
marker: 'not benchmark and (memcached and asyncio)'
|
|
57
|
+
os: ubuntu-latest
|
|
58
|
+
async_memcached_implementation: "emcache"
|
|
59
|
+
- python-version: "3.13"
|
|
60
|
+
marker: 'not benchmark'
|
|
61
|
+
os: ubuntu-latest
|
|
62
|
+
runs-on: "${{ matrix.os }}"
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/checkout@v4
|
|
65
|
+
- name: Install uv and Python
|
|
66
|
+
uses: astral-sh/setup-uv@v6
|
|
67
|
+
with:
|
|
68
|
+
enable-cache: true
|
|
69
|
+
python-version: ${{ matrix.python-version }}
|
|
70
|
+
- name: Setup uv venv
|
|
71
|
+
run: |
|
|
72
|
+
uv sync --locked --all-extras --group ci
|
|
73
|
+
- name: Tests
|
|
74
|
+
env:
|
|
75
|
+
CI: "True"
|
|
76
|
+
ASYNC_REDIS_IMPLEMENTATION: "${{ matrix.async_redis_implementation }}"
|
|
77
|
+
ASYNC_MEMCACHED_IMPLEMENTATION: "${{ matrix.async_memcached_implementation }}"
|
|
78
|
+
run: |
|
|
79
|
+
uv run py.test -m "${{ matrix.marker }}" --junitxml=junit.xml -o junit_family=legacy --cov-branch --max-runs=3
|
|
80
|
+
- name: Upload coverage to Codecov
|
|
81
|
+
uses: codecov/codecov-action@v5
|
|
82
|
+
env:
|
|
83
|
+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
84
|
+
- name: Upload test results to Codecov
|
|
85
|
+
if: ${{ !cancelled() }}
|
|
86
|
+
uses: codecov/test-results-action@v1
|
|
87
|
+
with:
|
|
88
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
89
|
+
|
|
90
|
+
benchmark:
|
|
91
|
+
needs: [lint]
|
|
92
|
+
runs-on: ubuntu-latest
|
|
93
|
+
strategy:
|
|
94
|
+
matrix:
|
|
95
|
+
python-version: ["3.13"]
|
|
96
|
+
env:
|
|
97
|
+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
|
|
98
|
+
COMMIT: ${{ github.sha }}
|
|
99
|
+
steps:
|
|
100
|
+
- uses: actions/checkout@v4
|
|
101
|
+
- name: Install uv and Python
|
|
102
|
+
uses: astral-sh/setup-uv@v6
|
|
103
|
+
with:
|
|
104
|
+
enable-cache: true
|
|
105
|
+
python-version: ${{ matrix.python-version }}
|
|
106
|
+
- name: Setup uv venv
|
|
107
|
+
run: |
|
|
108
|
+
uv sync --locked --all-extras --group ci
|
|
109
|
+
- name: Set up Node
|
|
110
|
+
uses: actions/setup-node@v4
|
|
111
|
+
- name: Install dependencies
|
|
112
|
+
run: |
|
|
113
|
+
npm install -g netlify-cli
|
|
114
|
+
- name: Benchmark
|
|
115
|
+
env:
|
|
116
|
+
CI: "True"
|
|
117
|
+
run: |
|
|
118
|
+
mkdir -p benchmarks
|
|
119
|
+
uv run pytest -m "benchmark" --benchmark-json=benchmarks/full.json
|
|
120
|
+
- name: Split results
|
|
121
|
+
run: |
|
|
122
|
+
mv benchmarks/full.json benchmarks/full_raw.json
|
|
123
|
+
jq '.benchmarks |= map(. + {name: (.name | sub("^test_"; "")), fullname: (.fullname | sub("^.*::test_"; ""))})' benchmarks/full_raw.json > benchmarks/benchmark.json
|
|
124
|
+
jq '.benchmarks |= map(del(.stats.data))' benchmarks/benchmark.json > benchmarks/benchmark-summary.json
|
|
125
|
+
storages=("memory" "redis" "memcached" "mongodb");
|
|
126
|
+
for storage in "${storages[@]}"; do
|
|
127
|
+
cat benchmarks/benchmark.json | jq --arg storage "$storage" '.benchmarks |= map(select(.params.storage_type==$storage))' > benchmarks/benchmark-$storage.json
|
|
128
|
+
cat benchmarks/benchmark-summary.json | jq --arg storage "$storage" '.benchmarks |= map(select(.params.storage_type==$storage))' > benchmarks/benchmark-$storage-summary.json
|
|
129
|
+
done
|
|
130
|
+
rm benchmarks/full_raw.json
|
|
131
|
+
- name: Upload benchmark results
|
|
132
|
+
if: github.repository_owner == 'alisaifee' && github.event_name == 'push'
|
|
133
|
+
uses: actions/upload-artifact@v4
|
|
134
|
+
with:
|
|
135
|
+
name: benchmark
|
|
136
|
+
path: benchmarks/*
|
|
137
|
+
- name: Deploy to Netlify
|
|
138
|
+
if: github.repository_owner == 'alisaifee' && github.event_name == 'push'
|
|
139
|
+
env:
|
|
140
|
+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
|
141
|
+
run: |
|
|
142
|
+
cp _netlify_headers benchmarks/_headers
|
|
143
|
+
netlify deploy --site ${{ secrets.NETLIFY_SITE_ID }} --alias $COMMIT --dir=benchmarks --message "Benchmarks for $COMMIT"
|
|
144
|
+
netlify deploy --site ${{ secrets.NETLIFY_SITE_ID }} --alias $BRANCH_NAME --dir=benchmarks --message "Benchmarks for $BRANCH_NAME"
|
|
145
|
+
build_wheels:
|
|
146
|
+
needs: [lint]
|
|
147
|
+
name: Build wheel
|
|
148
|
+
runs-on: ubuntu-latest
|
|
149
|
+
steps:
|
|
150
|
+
- uses: actions/checkout@v4
|
|
151
|
+
with:
|
|
152
|
+
fetch-depth: 0
|
|
153
|
+
- name: Install uv and Python
|
|
154
|
+
uses: astral-sh/setup-uv@v6
|
|
155
|
+
with:
|
|
156
|
+
enable-cache: true
|
|
157
|
+
python-version: ${{ matrix.python-version }}
|
|
158
|
+
- name: Setup uv venv
|
|
159
|
+
run: |
|
|
160
|
+
uv sync --locked --all-extras --group ci
|
|
161
|
+
- name: Build wheels
|
|
162
|
+
run: |
|
|
163
|
+
uv build --wheel
|
|
164
|
+
- uses: actions/upload-artifact@v4
|
|
165
|
+
with:
|
|
166
|
+
name: wheels
|
|
167
|
+
path: ./dist/*.whl
|
|
168
|
+
build_sdist:
|
|
169
|
+
needs: [lint]
|
|
170
|
+
name: Build source distribution
|
|
171
|
+
runs-on: ubuntu-latest
|
|
172
|
+
steps:
|
|
173
|
+
- uses: actions/checkout@v4
|
|
174
|
+
with:
|
|
175
|
+
fetch-depth: 0
|
|
176
|
+
- name: Install uv and Python
|
|
177
|
+
uses: astral-sh/setup-uv@v6
|
|
178
|
+
with:
|
|
179
|
+
enable-cache: true
|
|
180
|
+
python-version: ${{ matrix.python-version }}
|
|
181
|
+
- name: Setup uv venv
|
|
182
|
+
run: |
|
|
183
|
+
uv sync --locked --all-extras --group ci
|
|
184
|
+
- name: Build sdist
|
|
185
|
+
run: |
|
|
186
|
+
uv build --sdist
|
|
187
|
+
- uses: actions/upload-artifact@v4
|
|
188
|
+
with:
|
|
189
|
+
name: src_dist
|
|
190
|
+
path: dist/*.tar.gz
|
|
191
|
+
upload_pypi:
|
|
192
|
+
needs: [test, build_wheels, build_sdist]
|
|
193
|
+
runs-on: ubuntu-latest
|
|
194
|
+
if: github.ref == 'refs/heads/master'
|
|
195
|
+
permissions:
|
|
196
|
+
id-token: write
|
|
197
|
+
steps:
|
|
198
|
+
- uses: actions/download-artifact@v4
|
|
199
|
+
with:
|
|
200
|
+
name: wheels
|
|
201
|
+
path: dist
|
|
202
|
+
- uses: actions/download-artifact@v4
|
|
203
|
+
with:
|
|
204
|
+
name: src_dist
|
|
205
|
+
path: dist
|
|
206
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
207
|
+
with:
|
|
208
|
+
repository_url: https://test.pypi.org/legacy/
|
|
209
|
+
skip_existing: true
|
|
210
|
+
upload_pypi_release:
|
|
211
|
+
needs: [test, benchmark, build_wheels, build_sdist]
|
|
212
|
+
runs-on: ubuntu-latest
|
|
213
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
214
|
+
permissions:
|
|
215
|
+
id-token: write
|
|
216
|
+
steps:
|
|
217
|
+
- uses: actions/download-artifact@v4
|
|
218
|
+
with:
|
|
219
|
+
name: wheels
|
|
220
|
+
path: dist
|
|
221
|
+
- uses: actions/download-artifact@v4
|
|
222
|
+
with:
|
|
223
|
+
name: src_dist
|
|
224
|
+
path: dist
|
|
225
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
226
|
+
github_release:
|
|
227
|
+
needs: [upload_pypi_release]
|
|
228
|
+
name: Create Release
|
|
229
|
+
runs-on: ubuntu-latest
|
|
230
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
|
231
|
+
steps:
|
|
232
|
+
- name: Checkout code
|
|
233
|
+
uses: actions/checkout@v4
|
|
234
|
+
with:
|
|
235
|
+
fetch-depth: 0
|
|
236
|
+
- name: Download wheel artifacts
|
|
237
|
+
uses: actions/download-artifact@v4
|
|
238
|
+
with:
|
|
239
|
+
name: wheels
|
|
240
|
+
path: dist
|
|
241
|
+
- name: Download source artifacts
|
|
242
|
+
uses: actions/download-artifact@v4
|
|
243
|
+
with:
|
|
244
|
+
name: src_dist
|
|
245
|
+
path: dist
|
|
246
|
+
- name: Download benchmark results
|
|
247
|
+
uses: actions/download-artifact@v4
|
|
248
|
+
with:
|
|
249
|
+
name: benchmark
|
|
250
|
+
path: benchmarks
|
|
251
|
+
- name: Generate release notes
|
|
252
|
+
run: |
|
|
253
|
+
./scripts/github_release_notes.sh > release_notes.md
|
|
254
|
+
- name: Create Release
|
|
255
|
+
uses: ncipollo/release-action@v1
|
|
256
|
+
with:
|
|
257
|
+
artifacts: "dist/*,benchmarks/*"
|
|
258
|
+
bodyFile: release_notes.md
|
|
259
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
limits-5.6.0/.gitignore
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
+
and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the
|
|
26
|
+
overall community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or
|
|
31
|
+
advances of any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email
|
|
35
|
+
address, without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official e-mail address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
.
|
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
+
|
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
68
|
+
|
|
69
|
+
## Enforcement Guidelines
|
|
70
|
+
|
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
+
|
|
74
|
+
### 1. Correction
|
|
75
|
+
|
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
+
unprofessional or unwelcome in the community.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
|
82
|
+
|
|
83
|
+
### 2. Warning
|
|
84
|
+
|
|
85
|
+
**Community Impact**: A violation through a single incident or series
|
|
86
|
+
of actions.
|
|
87
|
+
|
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
+
like social media. Violating these terms may lead to a temporary or
|
|
93
|
+
permanent ban.
|
|
94
|
+
|
|
95
|
+
### 3. Temporary Ban
|
|
96
|
+
|
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
|
98
|
+
sustained inappropriate behavior.
|
|
99
|
+
|
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
+
communication with the community for a specified period of time. No public or
|
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
+
Violating these terms may lead to a permanent ban.
|
|
105
|
+
|
|
106
|
+
### 4. Permanent Ban
|
|
107
|
+
|
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
+
|
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within
|
|
113
|
+
the community.
|
|
114
|
+
|
|
115
|
+
## Attribution
|
|
116
|
+
|
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
+
version 2.0, available at
|
|
119
|
+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
120
|
+
|
|
121
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
122
|
+
enforcement ladder](https://github.com/mozilla/diversity).
|
|
123
|
+
|
|
124
|
+
[homepage]: https://www.contributor-covenant.org
|
|
125
|
+
|
|
126
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
127
|
+
https://www.contributor-covenant.org/faq. Translations are available at
|
|
128
|
+
https://www.contributor-covenant.org/translations.
|
|
@@ -3,6 +3,27 @@
|
|
|
3
3
|
Changelog
|
|
4
4
|
=========
|
|
5
5
|
|
|
6
|
+
v5.6.0
|
|
7
|
+
------
|
|
8
|
+
Release Date: 2025-09-29
|
|
9
|
+
|
|
10
|
+
* Development
|
|
11
|
+
|
|
12
|
+
* Move all project metadata to pyproject
|
|
13
|
+
* Use uv for development
|
|
14
|
+
* Use hatch for package build
|
|
15
|
+
* Remove versioneer for versioning
|
|
16
|
+
|
|
17
|
+
v5.5.0
|
|
18
|
+
------
|
|
19
|
+
Release Date: 2025-08-05
|
|
20
|
+
|
|
21
|
+
* Compatibility
|
|
22
|
+
|
|
23
|
+
* Relax upper bound of ``packaging`` requirement
|
|
24
|
+
* Increase upper bound of ``coredis`` requirement
|
|
25
|
+
* Increase upper bound of ``redis`` requirement
|
|
26
|
+
|
|
6
27
|
v5.4.0
|
|
7
28
|
------
|
|
8
29
|
Release Date: 2025-06-16
|
|
@@ -877,3 +898,5 @@ Release Date: 2015-01-08
|
|
|
877
898
|
|
|
878
899
|
|
|
879
900
|
|
|
901
|
+
|
|
902
|
+
|
|
@@ -3,12 +3,7 @@ include LICENSE.txt
|
|
|
3
3
|
include HISTORY.rst
|
|
4
4
|
include CONTRIBUTIONS.rst
|
|
5
5
|
include CLASSIFIERS
|
|
6
|
-
include versioneer.py
|
|
7
|
-
recursive-include requirements *.txt
|
|
8
|
-
recursive-include requirements/storage *.txt
|
|
9
6
|
recursive-include doc/source *
|
|
10
7
|
recursive-include doc *.py Make*
|
|
11
|
-
include limits/_version.py
|
|
12
|
-
include limits/py.typed
|
|
13
8
|
recursive-include limits *.lua
|
|
14
9
|
recursive-include limits/resources *
|
limits-5.6.0/Makefile
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
lint:
|
|
2
|
+
uv run ruff check --select I limits tests doc
|
|
3
|
+
uv run ruff check limits tests doc
|
|
4
|
+
uv run ruff format --check limits tests doc
|
|
5
|
+
uv run mypy limits
|
|
6
|
+
|
|
7
|
+
lint-fix:
|
|
8
|
+
uv run ruff check --select I --fix limits tests doc
|
|
9
|
+
uv run ruff check --fix limits tests doc
|
|
10
|
+
uv run ruff format limits tests doc
|
|
11
|
+
uv run mypy limits
|