Skip to content

Conversation

tiangolo
Copy link
Contributor

@tiangolo tiangolo commented Jan 5, 2019

Change Summary

Make BaseConfig by default have min_anystr_length and max_anystr_length set to None.

All the discussion/motivation is in issue #349 .

Related issue number

#349

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • HISTORY.rst has been updated
    • if this is the first change since a release, please add a new section
    • include the issue number or this pull request number #<number>
    • include your github username @<whomever>

@codecov
Copy link

codecov bot commented Jan 5, 2019

Codecov Report

Merging #350 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #350   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          14     14           
  Lines        1824   1824           
  Branches      356    356           
=====================================
  Hits         1824   1824

@samuelcolvin
Copy link
Member

I agree.

The original rationale was to avoid dos like attacks by avoiding someone submitting {'a': 'x' * 1e20} etc, but that should really be taken care of by client_max_body_size or equivalent. This check wasn't good anyway since it didn't check lists or multiple strings.

@samuelcolvin samuelcolvin merged commit 32d5cdc into pydantic:master Jan 7, 2019
@tiangolo
Copy link
Contributor Author

tiangolo commented Jan 7, 2019

Awesome, thanks!

@tiangolo tiangolo deleted the baseconfig-max-any-none branch January 7, 2019 15:03
alexdrydew pushed a commit to alexdrydew/pydantic that referenced this pull request Dec 23, 2023
* add docstrings and docstring tests

* account for multiple matches

* update test_docstrings

* improve test

* fix

* address comments

* address comments

* Update pydantic_core/core_schema.py

Co-authored-by: Samuel Colvin <s@muelcolvin.com>

* Update pydantic_core/core_schema.py

Co-authored-by: Samuel Colvin <s@muelcolvin.com>

* Update pydantic_core/core_schema.py

Co-authored-by: Samuel Colvin <s@muelcolvin.com>

* Update pydantic_core/core_schema.py

Co-authored-by: Samuel Colvin <s@muelcolvin.com>

* Update pydantic_core/core_schema.py

Co-authored-by: Samuel Colvin <s@muelcolvin.com>

* Update pydantic_core/core_schema.py

Co-authored-by: Samuel Colvin <s@muelcolvin.com>

* Update pydantic_core/core_schema.py

Co-authored-by: Samuel Colvin <s@muelcolvin.com>

* Update pydantic_core/core_schema.py

Co-authored-by: Samuel Colvin <s@muelcolvin.com>

* move ref

* fix lint

Co-authored-by: Samuel Colvin <s@muelcolvin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants