1499 Commits

Author SHA1 Message Date
⬢ Samuel Colvin ef8f9fe51b Uprev all dependencies (#4955)
* Uprev all dependencies

* use ruff instead of flake8 for docs examples linting
2023-01-15 09:57:09 -08:00
⬢ Samuel Colvin 8b9756d6cc simplify analytics more (#4930) 2023-01-13 16:21:41 +00:00
⬢ Samuel Colvin 426799f6eb remove remains of ads, add custom analytics (#4927) 2023-01-13 16:21:34 +00:00
Matthew Gamble bc1f09b3e4 Support kwargs model config in Mypy plugin (#4912)
Previously, the Mypy plugin only supported drawing settings from a
Config class. Now, it fully supports drawing settings from class kwargs
too.

Co-authored-by: Matthew Gamble <matthew.gamble@rea-group.com>
2023-01-13 13:54:26 +00:00
Raju komati f1e27ae6cf removed excluded fields from __fields_set__ when copying the object (#4920)
* removed excluded fields from __fields_set__ when copying the object using copy()

* reformatted code

* refactored code

* fixed mypy error

* added test cases

Co-authored-by: Raju Komati <raju.komati@fangtechnologies.com>
2023-01-11 17:00:59 +00:00
Hasan Ramezani 63566cf57c Update email-validator optional dependency to >= 1.3.0 (#4933) 2023-01-11 16:58:01 +00:00
kennethreitz 83c0b57b6c add myself as a reviewer (#4934)
Co-authored-by: = <=>
2023-01-11 16:55:34 +00:00
Daniel Kjellid eb960ca711 Fix typo in Field function docstring (#4931) 2023-01-11 12:46:11 +00:00
Hasan Ramezani 3c1c3505d6 Update email-validator optional dependency to > 1.2.0 (#4926) 2023-01-09 17:16:01 +01:00
florianfischer91 775f2d8b32 fix field inheritance (#4911)
* first try to fix inherited fields

* handle different design of __annotations__ in py39 and older

* simplify getting inherited field from base class

* add extra, very simple test

* implement suggestions

* fix merge

Co-authored-by: Samuel Colvin <s@muelcolvin.com>
2023-01-05 12:32:35 +00:00
florianfischer91 f55515820a Rename model methods (#4889)
* renaming .json -> .model_dump_json

* renaming .dict -> .model_dump

* renaming .__fields__ -> .model_fields

* renaming .schema -> .model_json_schema

* renaming .construct -> .model_construct

* renaming .parse_obj -> .model_validate

* make linters happy

* add changes md-file

Co-authored-by: Samuel Colvin <s@muelcolvin.com>
2023-01-05 11:30:44 +00:00
Jim Kring 08f7cf63c9 config variable to raise UserWarning if model not fully defined (#4882)
* added config var warn_on_undefined_types
raises a UserWarning if model not fully defined and will need rebuild

* black formatting

* use | instead of Optional[]

* suppress undefined types warning in existing tests

* ran pre-commit to fix linting

* changed to use Optional since | failing in CI

* changes following initial code review

* added some preliminary documentation

* fix linting

* fixed linting

* fixed linting

* assert model partially built when suppressing warn

* moved check for ForwardRef into existing for loop

* change assertion to dict instead of json

* cleanup of undefined_types_warning tests and docs

* Update docs/examples/types_undefined_warning.py

* Update docs/examples/types_undefined_warning.py

* fix EOL (trim trailing whitespace) lint error

Co-authored-by: Samuel Colvin <s@muelcolvin.com>
2023-01-04 19:23:39 +00:00
dependabot[bot] dcf3567876 build(deps): bump carloscastrojumo/github-cherry-pick-action (#4895)
Bumps [carloscastrojumo/github-cherry-pick-action](https://github.com/carloscastrojumo/github-cherry-pick-action) from 1.0.4 to 1.0.6.
- [Release notes](https://github.com/carloscastrojumo/github-cherry-pick-action/releases)
- [Commits](https://github.com/carloscastrojumo/github-cherry-pick-action/compare/v1.0.4...v1.0.6)

---
updated-dependencies:
- dependency-name: carloscastrojumo/github-cherry-pick-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-01 21:06:45 +00:00
Samuel Colvin 92ba0fe722 set dependency check to only run occationally 2022-12-30 19:45:39 +00:00
Samuel Colvin 708422e63f fix dependencies-check.yml, take 3 🤷 2022-12-30 19:12:17 +00:00
Samuel Colvin 852cd5cde2 fix dependencies-check.yml, take 2 2022-12-30 19:08:37 +00:00
Samuel Colvin 09e451154c fix dependencies-check.yml 2022-12-30 18:52:40 +00:00
Samuel Colvin 36bc193916 add dependencies check workflow (#4891) 2022-12-30 18:37:09 +00:00
Samuel Colvin 7208ebc096 increase minimum typing-extensions version, see #4885 2022-12-30 09:56:09 +00:00
Samuel Colvin 75d90ab9c5 uprev mypy (#4735)
* uprev mypy

* --disable-recursive-aliases and other fixes

* fix other mypy requirement pin
2022-12-28 19:22:18 +00:00
Samuel Colvin 1e370ac537 uprev certif to molify Dependabot 2022-12-28 19:20:13 +00:00
Marcelo Trylesinski 2e17c85810 Delete setup.py (#4881) 2022-12-27 20:33:17 +00:00
gr8jam 7c6e7e3bac Fixed datetime format specifier in docs (#4876) 2022-12-27 09:17:16 +01:00
Jim Kring a96794ddc1 move xfail from module to individual failing tests (#4843)
* move xfail from module to individual failing tests

* missed a test. fixed formatting.

* removed xfail mark from a passing test
2022-12-21 12:10:48 +00:00
Hasan Ramezani b221981f5d Replace deprecated get_event_loop with asyncio.run (#4859) 2022-12-20 16:31:45 +00:00
Muhammad Abdur Rakib f2b129a8bc fixed documentation typo (#4855) 2022-12-20 13:53:01 +01:00
Hasan Ramezani 9588c9e22d Fix typo in types usage documentation. (#4825) 2022-12-15 11:58:24 +00:00
Lie Ryan 55fd51fbdf ByteSize.human_readable() should not have decimal point with B suffix (#4777)
ByteSize can only represent whole number of bytes, so displaying a
decimal would be misleading and doesn't really make sense in most cases
where ByteSize is used.

Outside pure mathematics, it is very rare to use non-whole number bytes.

Co-authored-by: Samuel Colvin <s@muelcolvin.com>
2022-12-15 11:28:29 +00:00
Hasan Ramezani 73aa0a8f7d Add newline before Outputs: when printing json output in docs (#4802) 2022-12-15 11:23:38 +00:00
Samuel Colvin f985335527 Moving docs to docs.pydantic.dev (#4818)
* moving docs to docs.pydantic.dev

* use the wrangler gh action

* :face-palm:

* 🤦 disable tag check

* uncomment ci checks

* set branch for cf pages publish
2022-12-06 14:12:38 +00:00
Samuel Colvin 585ec35bd7 continue from #4809 (#4814) 2022-12-05 10:07:22 +00:00
dependabot[bot] 90f42508a9 build(deps): bump carloscastrojumo/github-cherry-pick-action (#4809)
Bumps [carloscastrojumo/github-cherry-pick-action](https://github.com/carloscastrojumo/github-cherry-pick-action) from 1.0.3 to 1.0.4.
- [Release notes](https://github.com/carloscastrojumo/github-cherry-pick-action/releases)
- [Commits](https://github.com/carloscastrojumo/github-cherry-pick-action/compare/v1.0.3...v1.0.4)

---
updated-dependencies:
- dependency-name: carloscastrojumo/github-cherry-pick-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-05 10:48:56 +01:00
Marcelo Trylesinski b6264ae8a1 Add dependencies to fake setup.py (#4804) 2022-11-30 17:39:59 +00:00
Marcelo Trylesinski caa318c908 Remove trailing "```" (#4799) 2022-11-29 15:43:30 +01:00
Arseny Boykov 8b7c568794 [1.10.x] Properly encode model and dataclass default for schema (#4781)
* Properly encode model and dataclass default for schema

* Wrap type annotation in quotes

* Fix compatibility

* Add changes file

* Remove unnecessary import

Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>

* Add a blank line back

* Reorder conditions

As per suggestion in https://github.com/pydantic/pydantic/pull/4781#discussion_r1034709528.

Co-authored-by: Hasan Ramezani <hasan.r67@gmail.com>
2022-11-29 13:14:29 +00:00
Samuel Colvin 1ac1199f08 docs build, bust cache? (#4778) 2022-11-23 09:40:27 +00:00
Samuel Colvin 182e182f4a Add Jina AI to sponsors (#4767)
* add Jina AI to sponsors

* add change description
2022-11-22 22:28:51 +00:00
kgolawski f9e8c64f12 Fix code typo in docs (#4776) 2022-11-22 13:33:48 +01:00
Pierre Bonneau 21b8e22214 Renaming BaseModel (#4758)
Hello

BaseModel is an import from pydantic.
Using that same name for the Base from sqlachemy can be misleading, and not aligned to the other examples.

I therefore suggest to use the same naming that the other example.

Pierre
2022-11-17 10:01:56 +00:00
Irfanuddin Shafi Ahmed 9949786caf fix typo in docs (#4764) 2022-11-17 10:01:00 +00:00
Adrian Garcia Badaracco 13ad034e44 Add strict option to BaseConfig (#4753) 2022-11-11 20:59:22 +00:00
Samuel Colvin 35c7aff1c4 Use 3.10 for all reqs resolution and add a Makefile target for re-locking (#4748) 2022-11-10 11:16:07 -06:00
Volker Hilsenstein 2f090a5cca Fix broken cross-references (#4743)
Co-authored-by: Volker Hilsenstein <volker.hilsenstein@embl.de>
2022-11-10 16:32:49 +00:00
Samuel Colvin be72998a1e Revert "test docs with all.txt"
This reverts commit b2e70742c3.
2022-11-10 10:41:44 +00:00
Samuel Colvin b2e70742c3 test docs with all.txt 2022-11-10 10:39:04 +00:00
Samuel Colvin 581d287d3b more friendly PR template 2022-11-10 10:26:16 +00:00
Samuel Colvin 4d773bb96b skip mypy tests on py3.11, switch pytest-sugar -> pytest-pretty (#4738)
* skip mypy tests on py3.11

* improve comment

* switch pytest-sugar -> pytest-pretty, other uprevs
2022-11-08 11:57:13 +00:00
Johnny Hsieh a73d62b8f4 Fix improper parsing of Enum document (#4734)
* Clean schema document for Enum

* Import inspect

* Make inspect import locally

* Add test
2022-11-08 11:25:51 +00:00
Samuel Colvin a7656fcd09 Support extracting attributes from the parent namespace (#4663)
* support extracting attributes from the parent namespace

* fix more tested test

* move parent_frame_namespace
2022-11-08 10:26:24 +00:00
Samuel Colvin 8d98c499df url parsing in pydantic-core (#4732)
* url parsing in pydantic-core

* fix tests

* fix mypy tests
2022-11-08 09:42:38 +00:00