Commit Graph

59 Commits

Author SHA1 Message Date
Samuel Colvin 9baec86270 try speeding up ci using caching and rearranging jobs (#3974)
* try speeding up ci using caching and rearranging jobs

* fix job references

* cache lint and docs install

* tweak caching

* tweak caching to avoid conflicts

* correct use of runner.os

* bump

* stop skipping steps depending on cache

* prevent hypothesis flakeyness

* try skipping install steps again

* remove skipping install :-(
2022-05-14 15:32:53 +01:00
Samuel Colvin b246bc6859 update mypy ci (#4073)
* update mypy ci

* test against older mypy
2022-05-14 12:31:29 +01:00
Samuel Colvin 74403c2f15 test pyright with pydantic (#3972)
* test pyright with pydantic

* rename file to avoid pytest running it

* try another name 😴

* add docs about BaseSettings and Field

* add change
2022-05-11 19:00:37 +01:00
dependabot[bot] d128f45077 build(deps): bump actions/download-artifact from 2 to 3 (#4034)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-11 18:00:51 +01:00
dependabot[bot] b826ff65ec build(deps): bump actions/upload-artifact from 2 to 3 (#4035)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-11 18:00:41 +01:00
Eric Jolibois 5490ad5173 fix: Config.copy_on_model_validation does a deep copy and not a shallow one (#3642)
* fix: `Config.copy_on_model_validation` does a deep copy and not a shallow one

closes #3641

* fix: typo

* use python 3.10 to run fastapi tests

* fix fastapi test call

Co-authored-by: Samuel Colvin <s@muelcolvin.com>
2022-05-11 17:03:48 +01:00
Samuel Colvin 8997cc5961 Remove benchmarks completely (#3973)
* removing benchmarks completely

* [no ci] add change
2022-04-04 13:29:17 +01:00
Samuel Colvin df8b2e100f Combine dependabot prs (#3969)
* allow combining of dependabot PRs

* add combine-dependabot.yml
2022-04-02 13:44:30 +01:00
dependabot[bot] bf5fdfc618 build(deps): bump black from 21.12b0 to 22.3.0 (#3950)
* build(deps): bump black from 21.12b0 to 22.3.0

Bumps [black](https://github.com/psf/black) from 21.12b0 to 22.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/commits/22.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* apply new black styles, fix docs

* try upgrading pip before fastapi tests

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Samuel Colvin <s@muelcolvin.com>
2022-04-02 08:35:55 +01:00
dependabot[bot] 2b0d4d90eb build(deps): bump actions/checkout from 2 to 3 (#3869)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-01 22:33:43 +00:00
dependabot[bot] 2c980eaf60 build(deps): bump actions/setup-python from 2 to 3 (#3868)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-01 22:33:04 +00:00
Eric Jolibois 9d631a3429 fix(ci): update fastapi tests (#3690)
* use python 3.10 to run fastapi tests

* fix fastapi test call
2022-01-17 22:30:39 +01:00
Samuel Colvin 6f46a5a146 drop python3.6 support (#3605)
* drop python3.6 support

* revert small change

* fix 3.7 failures

* more cases and cleanup

* add change description
2022-01-02 13:53:45 +00:00
Samuel Colvin 6f26a1ce18 Support mypy 0.910 to 0.930 including CI tests (#3594)
* cleanup bumping mypy to 0.930, #3573

* add tests for old mypy

* tweak test-old-mypy job

* alter mypy plugin to work with older versions

* mypy.py compatibility with multiple versions

* fix mypy tests to allow for varied output

* toml parsing, fix #3579

* formatting :-(

* ignore missing types for toml package

* remove unused ignore_missing_imports

* undo removal of ignore_missing_imports for dotenv

* tweak coverage ignore

* fully uninstall mypy and toml/tomli
2021-12-30 13:49:43 +00:00
Samuel Colvin 2d3d266d0a remove failing release step
Remove failing "upload pypi files to release" step
from deploy job, see
https://github.com/svenstaro/upload-release-action/issues/61
2021-12-29 16:39:36 +00:00
Samuel Colvin ef4678999f add step to upload pypi files to release 2021-12-24 14:07:08 +00:00
Marcin Bachry a6692d177b Build Python 3.10 wheels (#3539) 2021-12-18 23:43:22 +00:00
Samuel Colvin d36bb74e83 generate x86_64 and arm64 binaries to support MacOS M1 CPU (#3514)
* generate x86_64 and arm64 binaries for macos

* Uncomment check
2021-12-12 00:13:48 +00:00
Eric Jolibois 1b1ec08f1e ci: bump to python 3.10 stable release (#3364) 2021-10-27 01:24:07 +02:00
Eric Jolibois 18e1361e8b chore(ci): switch to 3.10.0-rc2 (#3199) 2021-09-10 13:48:55 +02:00
Eric Jolibois 796a7531cd chore(deps): bump requirements (#3166)
* chore(deps): bump requirements

* chore(deps-dev): bump lint requirements

* chore(deps-dev): add test requirements

* chore(deps-dev): last bumps

* fix: mypy update

* chore: docs bumps
2021-09-03 23:47:51 +02:00
Eric Jolibois 21d002ec6e chore(ci): update to python 3.10.0-rc.1 (#3085)
* refactor: rename `is_union` into `is_union_origin`

* fix: "new" union and generic types are not the same as `typing.GenericAlias`

* chore: rename param

* fix(ci): name changed for 3.10

* fix: mypy
2021-09-03 22:56:11 +02:00
Eric Jolibois 0c26c1c4e2 chore(ci): update python 3.10 version (#3000)
* chore(ci): update python 3.10 version

* Revert "fix: enum repr is different with 3.10+"

This reverts commit b1c8d9ef1396959ff9d88bb2ed16d99dd3146151.
2021-07-19 20:25:05 +02:00
Eric Jolibois 4a54f393ad Add python 3.10 support (#2885)
* refactor: extra `BaseConfig` and `Extra` in dedicated `config` module

* refactor: clean useless `#noqa: F401`

* refactor: clean useless `#noqa: F811`

* refactor: replace enum check

Error with 3.10
> DeprecationWarning: accessing one member from another is not supported

* refactor: avoid using `distutils` directly

error with python 3.10
> DeprecationWarning: The distutils package is deprecated and slated
> for removal in Python 3.12.
> Use setuptools or check PEP 632 for potential alternatives

* fix: `__annotations__` always exists

* fix: origin of `typing.Hashable` is not `None`

* ci: add run with 3.10.0b2

* docs: add 3.10

* feat: support `|` union operator properly

`|` operator has origin `types.Union` (and not `typing.Union`)

* fix: enum repr is different with 3.10+

* fix: error message changed a bit

change from basic `__init__` to `test_hashable_required.<locals>.MyDataclass.__init__()` (with `__qualname__`)

* fix:  always exists and is not inherited anymore

* fix: avoid calling `asyncio.get_event_loop` directly

With python 3.10, calling it results in
> DeprecationWarning: There is no current event loop

* fix(ci): do not run 3.10 on linux for now

For now it can not be compiled.
Let's just skip the check on linux for now instead of tuning the CI pipeline

* fix(ci): ignore DeprecationWarning raised by `mypy` on windows

* docs: add change file
2021-07-19 14:23:07 +01:00
Samuel Colvin 046fc53324 disable "label-assign" for PR reviews again, :-( 2021-05-09 11:55:12 +01:00
Samuel Colvin 42033cfe1c try enabling "label-assign" for PR reviews 2021-05-09 11:05:41 +01:00
Samuel Colvin 5921d5ec96 use latest label-and-assign docker image 2021-05-03 22:03:58 +01:00
Samuel Colvin c7aea15d2a remove unused step from label-and-assign 2021-05-03 18:17:44 +01:00
Samuel Colvin 298a54a024 add label-and-assign github action (#2739)
* add label-and-assign github action

* remove pull_request_review trigger :-(
2021-05-03 18:12:06 +01:00
Samuel Colvin 26faf8ab94 add token permissions to upload-previews 2021-05-02 11:54:04 +01:00
Samuel Colvin 7416012227 remove test code 🙈 2021-04-02 18:16:02 +01:00
Samuel Colvin fd1a838551 fix previews using workflow_run 2021-04-02 17:43:18 +01:00
Samuel Colvin 15c0ba5242 correct usage of workflow_run actions 2021-04-01 20:46:30 +01:00
Samuel Colvin e921d5b852 fix docs-upload.yml 2021-04-01 20:41:33 +01:00
Samuel Colvin cd404f9340 switch to use workflow_run event in actions 2021-04-01 20:30:05 +01:00
Samuel Colvin e68c277afe avoid using pull_request_target 2021-04-01 17:57:25 +01:00
Samuel Colvin 368f014080 use pull_request_target on docs preview 2021-04-01 16:37:57 +01:00
Samuel Colvin 57377cf846 use "pull_request_target" in ci 2021-04-01 13:10:49 +01:00
Samuel Colvin 908257914c docs preview and coverage using smokeshow (#2580)
* docs preview using smokeshow

* switch to using smokeshow for coverage

* fix macos and windows builds

* correct coverage prep.

* tweak coverage build logic

* print more coverage info

* mess with coverage setup, set config [PATHS]

* updating badges

* add context to coverage reports

* adding smokeshow status context
2021-03-27 18:36:52 +00:00
Samuel Colvin b7a8ef25c6 fix coverage and make typing-extensions a required dependency (#2368)
* fixing coverage by simplifying Annotated import logic, fix #2367

* avoid checking against annotated if it's None

* make typing-extensions required WIP

* more making typing-extensions required

* fix docs and get_origin for python 3.6

* fix mypy test

* fix docs

* update docs, cleanup and add change

* clean docs/examples/schema_annotated.py

* move AnnotatedTypeNames
2021-02-17 19:17:30 +00:00
Eric Jolibois 60ef8cc733 combined version bumps (#2339)
* build(deps): bump mkdocs-material from 6.2.3 to 6.2.8

* build(deps): bump codecov/codecov-action from v1.1.1 to v1.2.1

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.1.1 to v1.2.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.1.1...e156083f13aff6830c92fc5faa23505779fbf649)

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump pytest-cov from 2.10.1 to 2.11.1

Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 2.10.1 to 2.11.1.
- [Release notes](https://github.com/pytest-dev/pytest-cov/releases)
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-cov/compare/v2.10.1...v2.11.1)

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump pytest-mock from 3.4.0 to 3.5.1

Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.4.0 to 3.5.1.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases)
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.4.0...v3.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump isort from 5.6.4 to 5.7.0

Bumps [isort](https://github.com/pycqa/isort) from 5.6.4 to 5.7.0.
- [Release notes](https://github.com/pycqa/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/pycqa/isort/compare/5.6.4...5.7.0)

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump mypy from 0.790 to 0.800

* build(deps): bump pytest from 6.2.1 to 6.2.2

* build(deps): bump coverage from 5.3.1 to 5.4

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-02-11 00:48:02 +01:00
dependabot[bot] 191647c970 build(deps): bump codecov/codecov-action from v1.0.15 to v1.1.1 (#2230)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.15 to v1.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.15...1fc7722ded4708880a5aea49f2bfafb9336f0c8d)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-01 14:25:15 +00:00
Eric Jolibois 3496a473c7 build(deps): bump to pytest 6.2.1, pytest-mock 3.4.0, mkdocs-material 6.1.7 and codecov-action v1.0.15 (#2201)
* build(deps): bump to pytest 6.2.1, pytest-mock 3.4.0, mkdocs-material 6.1.7 and codecov-action v1.0.15

replaces #2199, #2180 and #2164

* fix: yield_fixture is deprecated

* chore: add dotenv in optional deps
2020-12-17 23:28:07 +01:00
dependabot[bot] 6c50a86df4 Bump codecov/codecov-action from v1.0.13 to v1.0.14 (#2080)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from v1.0.13 to v1.0.14.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.0.13...7d5dfa54903bd909319c580a00535b483d1efcf3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-11-01 15:25:40 +00:00
dependabot[bot] 52889203ac Bump devtools from 0.6.0 to 0.6.1 (#2037)
* Bump devtools from 0.6.0 to 0.6.1

Bumps [devtools](https://github.com/samuelcolvin/python-devtools) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/samuelcolvin/python-devtools/releases)
- [Changelog](https://github.com/samuelcolvin/python-devtools/blob/master/HISTORY.md)
- [Commits](https://github.com/samuelcolvin/python-devtools/compare/v0.6...v0.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

* remove unnecessary dependencies

* tweaks while testing 3.9

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Samuel Colvin <s@muelcolvin.com>
2020-10-26 09:53:28 +00:00
Samuel Colvin a25aba26b5 linting as a separate CI step (#2030)
* linting as a separate ci step

* CI and docs improvements

* fix docs preview

* fix docs, benchmarks fastapi tests

* fix formatting and docs build

* tweak publishing docs

* fix for new download-artifact action

* skip check tag to check docs build

* prepare for merge
2020-10-25 15:03:33 +00:00
PrettyWood 794d0bccf9 feat: add basic support for python 3.9 (#1844)
* feat: use partially get_origin and get_args from typing

Rework of d86a184072655d93652d6ea941421005f34de962 by @hmvp
We cannot directly use `typing.get_origin` and `typing.get_args` for
our custom types for which args and origin are wrong by default.
But at least we now have a unified behaviour, which can be improved
in the near future

* feat: add fallback in `get_args` for generics in python 3.9

* feat: add new `_evaluate` for python 3.9

In python 3.9, `typing._evaluate` has a new required
positional argument `recursive_guard`

* chore: add pragma no cover for python 3.9 fallbacks

* chore: add change file

* chore: add comments

* feat(ci): add python 3.9 support

* fix: mypy assumption is wrong
2020-10-18 20:36:18 +01:00
dependabot[bot] 078e7090d0 Bump pytest from 6.0.1 to 6.1.1 (#1965)
* Bump pytest from 6.0.1 to 6.1.1

Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.0.1 to 6.1.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.0.1...6.1.1)

Signed-off-by: dependabot[bot] <support@github.com>

* add pytest-mock to binaries build

* unchange build step of ci

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Samuel Colvin <s@muelcolvin.com>
2020-10-09 10:20:08 +01:00
Samuel Colvin 296d929904 updating all deps (#1907)
* updating all deps

* uprev github actions docs
2020-09-06 13:04:41 +01:00
Samuel Colvin 5dbb1272f6 use codecov github action to do retries (#1709) 2020-07-11 13:00:53 +01:00