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

build: unpin PyYAML to support Python 3.10 #238

Merged
merged 3 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 4 additions & 3 deletions .azure-pipelines/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ jobs:
vmImage: "Ubuntu-20.04"
strategy:
matrix:
Py38:
PYTHON_VERSION: "3.8"
TOXENV: "py38"
Py39:
PYTHON_VERSION: "3.9"
Py310:
PYTHON_VERSION: "3.10"
steps:
- task: UsePythonVersion@0
displayName: Use python $(PYTHON_VERSION)
Expand Down
7 changes: 4 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ classifiers=
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
project_urls =
Bug Tracker = https://github.com/DataDog/apigentools/issues
Documentation = https://apigentools.readthedocs.io/en/latest/
Expand All @@ -38,7 +39,7 @@ install_requires =
chevron==0.13.1
click==7.1.2
jsonpath-ng==1.5.1
PyYAML==5.4.1
PyYAML>=5.4.1,<7.0.0
packaging==20.3
pydantic==1.7
setup_requires =
Expand All @@ -53,7 +54,7 @@ console_scripts =
[options.extras_require]
tests =
black>=20.8b1
flexmock>=0.10.4
flexmock>=0.10.4,<0.11
pytest>=5.2.4
pytest-cov
pytest-black
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import flexmock
import pytest
import yaml
from yaml import CSafeLoader

from apigentools.constants import REDACTED_OUT_SECRET
from apigentools.errors import SpecSectionNotFoundError
Expand Down Expand Up @@ -294,7 +295,7 @@ def test_write_full_spec(tmpdir):
)

with open(written, "r") as f:
assert yaml.load(f) == expected
assert yaml.load(f, Loader=CSafeLoader) == expected


def test_write_full_spec_section_not_found(tmpdir):
Expand Down