From 04f0b3830ee658923bfa457694668d7208180df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20H=E1=BB=93ng=20Qu=C3=A2n?= Date: Sat, 10 Jul 2021 14:59:48 +0700 Subject: [PATCH] Version 0.4.2: Support Python 3.6 --- .github/workflows/test.yml | 2 +- README.rst | 2 +- README.vi_VN.rst | 2 +- poetry.lock | 18 ++++++++++++++++-- pyproject.toml | 7 ++++--- tox.ini | 4 +++- 6 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c06ba64..5db6511 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,4 +25,4 @@ jobs: PLATFORM: ${{ matrix.platform }} strategy: matrix: - python-version: [3.7, 3.8] + python-version: [3.6, 3.7, 3.8, 3.9] diff --git a/README.rst b/README.rst index ee96090..aa7f6a7 100644 --- a/README.rst +++ b/README.rst @@ -137,7 +137,7 @@ Install pip3 install vietnam-provinces -This library is compatible with Python 3.7+ (due to the use of *dataclass*). +This library is compatible with Python 3.6+. Development diff --git a/README.vi_VN.rst b/README.vi_VN.rst index c030fda..20d36b8 100644 --- a/README.vi_VN.rst +++ b/README.vi_VN.rst @@ -134,7 +134,7 @@ Cài đặt pip3 install vietnam-provinces -Thư viện này tương thích với Python 3.7 trở lên (do có sử dụng *dataclass*). +Thư viện này tương thích với Python 3.6 trở lên. Phát triển diff --git a/poetry.lock b/poetry.lock index e40d816..47bf4f3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -47,6 +47,7 @@ python-versions = ">=3.6" [package.dependencies] appdirs = "*" click = ">=7.1.2" +dataclasses = {version = ">=0.6", markers = "python_version < \"3.7\""} mypy-extensions = ">=0.4.3" pathspec = ">=0.6,<1" regex = ">=2020.1.8" @@ -90,6 +91,14 @@ category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +[[package]] +name = "dataclasses" +version = "0.8" +description = "A backport of the dataclasses module for Python 3.6" +category = "main" +optional = false +python-versions = ">=3.6, <3.7" + [[package]] name = "devtools" version = "0.5.1" @@ -247,6 +256,7 @@ optional = false python-versions = ">=3.6.1" [package.dependencies] +dataclasses = {version = ">=0.6", markers = "python_version < \"3.7\""} typing-extensions = ">=3.7.4.3" [package.extras] @@ -416,8 +426,8 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" -python-versions = "^3.7" -content-hash = "8ae70a41925593a305a1ee1df9436d380b9d2519f64836cb5e56a9ea053ec78a" +python-versions = "^3.6.1" +content-hash = "85cf53dbc2ef088dc471e15398c4b8ebf3d29fb46e3477bfa0cfc391c7a3bdeb" [metadata.files] appdirs = [ @@ -455,6 +465,10 @@ colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] +dataclasses = [ + {file = "dataclasses-0.8-py3-none-any.whl", hash = "sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf"}, + {file = "dataclasses-0.8.tar.gz", hash = "sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97"}, +] devtools = [ {file = "devtools-0.5.1-py35.py36-none-any.whl", hash = "sha256:7a1f7db6ade0a71840ca4014d75dd72390aed2ef04e39e2b2445af7b3a3f4679"}, {file = "devtools-0.5.1.tar.gz", hash = "sha256:51ca8d2e15b8a862875a4837db2bafbc6cda409c069e960aec3f4bbd91fe9c08"}, diff --git a/pyproject.toml b/pyproject.toml index 0d49ec2..10d6bf0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "vietnam-provinces" -version = "0.4.1" +version = "0.4.2" description = "Library to provide list of Vietnam administrative divisions (tỉnh thành, quận huyện, phường xã)." authors = ["Nguyễn Hồng Quân "] repository = "https://github.com/sunshine-tech/VietnamProvinces.git" @@ -21,11 +21,12 @@ classifiers = [ ] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.6.1" logbook = "^1.5.3" single-version = "^1.5.1" Unidecode = "^1.1.2" fast-enum = "^1.3.0" +dataclasses = { version = "^0.8", markers = "python_version < '3.7'" } [tool.poetry.dev-dependencies] @@ -36,7 +37,7 @@ astor = "^0.8.1" python-rapidjson = "^0.9.1" requests = "^2.23.0" click = "^7.0" -pydantic = "^1.7.3" +pydantic = "^1.8.2" black = "^20.8b1" [build-system] diff --git a/tox.ini b/tox.ini index fa6a4cc..941ea91 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,12 @@ [tox] -envlist = py37,py38,py39 +envlist = py36,py37,py38,py39 isolated_build = True skipsdist = True skip_missing_interpreters = true [testenv] +deps= + py36: pip >= 20 whitelist_externals = poetry commands = poetry install -v