Skip to content

Commit

Permalink
Version 1.0.0 release (#87)
Browse files Browse the repository at this point in the history
* Version 1.0.0 release

* Fix CI

* Fix CI

* Fix CI

* Fix CI

* Fix CI
  • Loading branch information
sobolevn authored Apr 29, 2023
1 parent cbc499c commit 002c4b9
Show file tree
Hide file tree
Showing 7 changed files with 1,017 additions and 882 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,17 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
env-type: ['dev', 'redis', 'aioredis']
python-version: ['3.8', '3.9', '3.10', '3.11']
redis-image: ['redis:7.0-alpine']
env-type: ['redis']

include:
- python-version: '3.10'
env-type: 'aioredis'
redis-image: 'redis:7.0-alpine'
- python-version: '3.9'
env-type: 'dev'
redis-image: 'redis:7.0-alpine'

steps:
- uses: actions/checkout@v3
Expand All @@ -45,6 +54,8 @@ jobs:
run: |
docker-compose pull
docker-compose up --detach
env:
REDIS_IMAGE: ${{ matrix.redis-image }}

- name: Run checks
run: make test
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@
We follow [Semantic Versions](https://semver.org/).


## Version 1.0.0

### Features

- *breaking*: Removes `python3.7` support
- Adds `python3.11` support

### Misc

- Updates multiple deps


## Version 0.2.0

### Features

- Add support for `aioredis`
- Adds support for `aioredis`


## Version 0.1.1
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ unit:
.PHONY: package
package:
poetry check
poetry run pip check
# TODO: enable when [email protected]
# poetry run pip check
poetry run safety check --full-report

.PHONY: test
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Rate limiter for async functions using Redis as a backend.
- Works with any amount of processes
- Works with both [`redis.asyncio.client.Redis`](https://redis-py.readthedocs.io/en/stable/examples/asyncio_examples.html) and [`aioredis`](https://github.com/aio-libs/aioredis-py)
- Free of race-conditions (hopefully!)
- Supports `redis` since `7.0`
- Fully typed with annotations and checked with mypy, [PEP561 compatible](https://www.python.org/dev/peps/pep-0561/)


Expand All @@ -29,7 +30,7 @@ pip install asyncio-redis-rate-limit

Extras available:
- `pip install asyncio-redis-rate-limit[redis]`
- `pip install asyncio-redis-rate-limit[aioredis]`
- `pip install asyncio-redis-rate-limit[aioredis]` (for python versions `<3.11`)


## Example
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ version: '3.8'

services:
redis:
image: redis:alpine
image: ${REDIS_IMAGE:-'redis:alpine'}
ports:
- "6379:6379"
1,836 changes: 973 additions & 863 deletions poetry.lock

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "asyncio-redis-rate-limit"
description = "Rate limiter for async functions using Redis as a backend"
version = "0.2.0"
version = "1.0.0"
license = "MIT"
readme = "README.md"

Expand All @@ -20,7 +20,7 @@ keywords = [
]

classifiers = [
"Development Status :: 3 - Alpha",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
Expand All @@ -30,28 +30,28 @@ classifiers = [
"Funding" = "https://github.com/sponsors/wemake-services"

[tool.poetry.dependencies]
python = "^3.7"
python = "^3.8"

redis = { version = ">=4.3", optional = true }
aioredis = { version = ">=2.0", optional = true }
redis = { version = ">=4.5,<5", optional = true }
# aioredis and python3.11 are not compatible:
aioredis = { version = ">=2.0", optional = true, python = "<3.11" }
typing-extensions = ">=3.10"

[tool.poetry.group.test.dependencies]
mypy = "^0.982"
types-redis = "^4.3"
types-mock = "^4.0"
mypy = "^1.2"
types-redis = "^4.5"
types-mock = "^5.0"

wemake-python-styleguide = "^0.17"
flake8-pytest-style = "^1.6"
doc8 = "^1.0"
nitpick = "^0.32"
nitpick = "^0.33"

safety = "^2.3"

pytest = "^7.1"
pytest = "^7.2"
pytest-cov = "^4.0"
pytest-randomly = "^3.12"
pytest-asyncio = "^0.19"
pytest-asyncio = "^0.21"
pytest-freezegun = "^0.4"
pytest-repeat = "^0.9"

Expand All @@ -62,7 +62,7 @@ dev = ["redis", "aioredis"]


[build-system]
requires = ["poetry-core>=1.2.0"]
requires = ["poetry-core>=1.5.0"]
build-backend = "poetry.core.masonry.api"


Expand Down

0 comments on commit 002c4b9

Please sign in to comment.