Skip to content

Commit

Permalink
Add support for Python 3.10 (#665)
Browse files Browse the repository at this point in the history
Python 3.10 supported and tested
  • Loading branch information
rochacbruno committed Oct 7, 2021
1 parent 2fd232b commit 7cab97c
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 50 deletions.
40 changes: 26 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
python-version: ["3.9"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade PIP
run: pip install --user --upgrade pip
- name: Install and lint
run: make clean install run-pre-commit

Expand All @@ -34,14 +36,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
python-version: ["3.8", "3.9", "3.10"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade PIP
run: pip install --user --upgrade pip
- name: Install project and test cli
run: |
python setup.py install
Expand All @@ -56,14 +60,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9]
python-version: ["3.8", "3.10"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade PIP
run: pip install --user --upgrade pip
- name: Install project
run: make ciinstall
- name: Run tests
Expand All @@ -75,7 +81,7 @@ jobs:
files: junit/**/*.xml
check_name: Test Results (Python ${{ matrix.python-version }})
- name: "Upload coverage to Codecov"
if: ${{ matrix.python-version == 3.8 }}
if: ${{ matrix.python-version == '3.8' }}
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: true
Expand All @@ -85,14 +91,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
python-version: ["3.8", "3.10"]
os: [macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade PIP
run: pip install --user --upgrade pip
- name: Install project
run: make ciinstall
- name: Run tests
Expand All @@ -105,14 +113,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8]
python-version: ["3.8", "3.10"]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade PIP
run: pip install --user --upgrade pip
- name: Install project
run: make ciinstall
- name: Run functional tests
Expand All @@ -123,7 +133,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
python-version: ["3.8", "3.10"]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -134,7 +144,7 @@ jobs:
- name: Install Pip
run: pip install --user --upgrade pip
- name: Install project
run: pip install -r requirements_dev.txt
run: pip install --use-deprecated=legacy-resolver .[test]
- name: run tests
run: py.test -v -l tests --junitxml=junit/test-results.xml -m "not integration"

Expand All @@ -143,7 +153,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8]
python-version: ["3.8", "3.10"]
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -154,9 +164,7 @@ jobs:
- name: Install Pip
run: pip install --user --upgrade pip
- name: Install project
run: |
python -m pip install -r requirements_dev.txt
python setup.py install
run: pip install --use-deprecated=legacy-resolver .[test]
- name: run tests
run: |
pushd example\common & cd & python program.py & popd
Expand Down Expand Up @@ -196,7 +204,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
python-version: ["3.8", "3.10"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
services:
Expand All @@ -209,6 +217,8 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade PIP
run: pip install --user --upgrade pip
- name: Install project
run: make ciinstall
- name: Run functional tests
Expand All @@ -219,7 +229,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
python-version: ["3.8", "3.10"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
services:
Expand All @@ -235,6 +245,8 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade PIP
run: pip install --user --upgrade pip
- name: Install project
run: make ciinstall
- name: Run functional tests
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ clean:
rm -rf *.egg-info
rm -rf htmlcov
rm -rf .tox/
rm -rf docs/_build
rm -rf site

docs:
rm -rf legacy_docs/_build
@cd legacy_docs;make html
rm -rf site
mkdocs build --clean

run-tox:
tox --recreate
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ site_description: Configuration Management for Python
site_author: Bruno Rocha
repo_name: rochacbruno/dynaconf
repo_url: https://github.com/rochacbruno/dynaconf
edit_uri: ''
edit_uri: 'https://github.com/rochacbruno/dynaconf/tree/master/docs'
nav:
- Home: index.md
- Configuration: configuration.md
Expand Down
15 changes: 0 additions & 15 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,11 @@ ipdb
python-minifier
pdbr[ipython]

# documentation
sphinx
recommonmark
docutils>=0.14
aafigure>=0.6

# MKDOCS
mkdocs>=1.1.2
mkdocs-git-revision-date-localized-plugin>=0.5.2
mkdocs-material>=5.3.2
mkdocs-material-extensions>=1.0
mkdocs-multilang>=0.1.3
mkdocs-nav-enhancements>=0.9.1
mkdocs-new-features-notifier>=0.1.6
mkdocs-versioning>=0.2.1
pymdown-extensions

# vim
pynvim
jedi

# editable dynaconf
--editable .
41 changes: 25 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,28 @@ def read(*names, **kwargs):
return content


test_requirements = [
"pytest",
"pytest-cov",
"pytest-xdist",
"pytest-mock",
"flake8",
"pep8-naming",
"flake8-debugger",
"flake8-print",
"flake8-todo",
"radon",
"flask>=0.12",
"django",
"python-dotenv",
"toml",
"codecov",
"redis",
"hvac",
"configobj",
]


setup(
name="dynaconf",
version=read("dynaconf", "VERSION"),
Expand Down Expand Up @@ -48,22 +70,7 @@ def read(*names, **kwargs):
include_package_data=True,
zip_safe=False,
platforms="any",
install_requires=["typing; python_version<'3.5'"],
tests_require=[
"pytest",
"pytest-cov",
"pytest-xdist",
"flake8",
"pep8-naming",
"flake8-debugger",
"flake8-print",
"flake8-todo",
"radon",
"flask>=0.12",
"python-dotenv",
"toml",
"codecov",
],
tests_require=test_requirements,
extras_require={
"redis": ["redis"],
"vault": ["hvac"],
Expand All @@ -72,6 +79,7 @@ def read(*names, **kwargs):
"ini": ["configobj"],
"configobj": ["configobj"],
"all": ["redis", "ruamel.yaml", "configobj", "hvac"],
"test": test_requirements,
},
python_requires=">=3.7",
entry_points={"console_scripts": ["dynaconf=dynaconf.cli:main"]},
Expand All @@ -90,6 +98,7 @@ def read(*names, **kwargs):
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Utilities",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
Expand Down
1 change: 0 additions & 1 deletion tests/test_base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os

import pytest
import yaml

from dynaconf import Dynaconf
from dynaconf import LazySettings
Expand Down

0 comments on commit 7cab97c

Please sign in to comment.