
GITHUB . COM {
}
Detected CMS Systems:
- Wordpress (2 occurrences)
Title:
BaseConfig's max_anystr_length default Β· Issue #349 Β· pydantic/pydantic
Description:
Bug: BaseConfig's max_anystr_length default Currently, str and bytes are validated using the Config class. By default, it imposes a validation of max_anystr_length of 2 ** 16. The result is tha...
Website Age:
17 years and 8 months (reg. 2007-10-09).
Matching Content Categories {π}
- Personal Finance
- Technology & Computing
- Mobile Technology & AI
Content Management System {π}
What CMS is github.com built with?
Github.com is built with WORDPRESS.
Traffic Estimate {π}
What is the average monthly size of github.com audience?
ππ Tremendous Traffic: 10M - 20M visitors per month
Based on our best estimate, this website will receive around 10,000,019 visitors per month in the current month.
However, some sources were not loaded, we suggest to reload the page to get complete results.
check SE Ranking
check Ahrefs
check Similarweb
check Ubersuggest
check Semrush
How Does Github.com Make Money? {πΈ}
Subscription Packages {π³}
We've located a dedicated page on github.com that might include details about subscription plans or recurring payments. We identified it based on the word pricing in one of its internal links. Below, you'll find additional estimates for its monthly recurring revenues.How Much Does Github.com Make? {π°}
Subscription Packages {π³}
Prices on github.com are in US Dollars ($).
They range from $4.00/month to $21.00/month.
We estimate that the site has approximately 4,989,889 paying customers.
The estimated monthly recurring revenue (MRR) is $20,957,532.
The estimated annual recurring revenues (ARR) are $251,490,385.
Wordpress Themes and Plugins {π¨}
What WordPress theme does this site use?
It is strange but we were not able to detect any theme on the page.
What WordPress plugins does this website use?
It is strange but we were not able to detect any plugins on the page.
Keywords {π}
default, pydantic, maxanystrlength, str, import, schema, sign, issue, bytes, class, code, baseconfigs, basemodel, modelbasemodel, json, version, type, python, samuelcolvin, navigation, pull, requests, actions, security, closed, tiangolo, bug, config, validation, model, maxlength, doesnt, make, constraint, defaults, fixed, option, standard, constrained, add, extra, github, labels, projects, milestone, footer, skip, content, menu, product,
Topics {βοΈ}
add extra code pydantic import basemodel activity tiangolo mentioned personal information baseconfig' hold binary data applicable feature request completed alexdrydew added comment metadata assignees constrained json schema default extra constraint verified 82d071a sign json schema config class max_anystr_length default default constraint constrained version fixed default baseconfig' pydantic str = schema default max_length suggest changing complex rationale bugs/questions master branch test case fixed number assigned labels projects milestone milestone relationships labels type type projects bug github model python standard str default basemodel validation max_anystr_length sys version type sign config standard str max_length=2 16 skip
Payment Methods {π}
- Braintree
Questions {β}
- Already have an account?
- Is there a more complex rationale for the fixed default that I'm not seeing?
Schema {πΊοΈ}
DiscussionForumPosting:
context:https://schema.org
headline:BaseConfig's max_anystr_length default
articleBody:<!-- Questions, Feature Requests, and Bug Reports are all welcome -->
<!-- delete as applicable: -->
# Bug: BaseConfig's max_anystr_length default
Currently, `str` and `bytes` are validated using the `Config` class. By default, it imposes a validation of
`max_anystr_length` of `2 ** 16`.
The result is that declaring a model:
```Python
from pydantic import BaseModel
class Model(BaseModel):
a: str
```
would be equivalent (with respect to validations) to:
```Python
from pydantic import BaseModel
class Model(BaseModel):
a: constr(max_length=2 ** 16)
```
or
```Python
from pydantic import BaseModel, Schema
class Model(BaseModel):
a: str = Schema(..., max_length=2 ** 16)
```
(although the JSON schema currently doesn't show the default max_length).
---
Given that `bytes` are made to hold binary data that might be large, I think it doesn't make much sense to have that default constraint, especially for `bytes`. I can also imagine a whole book in a `str` would have the same problem.
I would suggest changing the defaults of `min_anystr_length` and `max_anystr_length` to `None`. Is there a more complex rationale for the fixed default that I'm not seeing?
One option is to set the defaults of `Config` to `None` (I vote for this).
The other option is to make the generated JSON Schema match the actual default validation behavior.
But I think it would probably seem counterintuitive to declare a model with a standard `str` or `bytes` and get a constrained version (and a constrained JSON Schema). And having to add extra code to remove a default extra constraint, while using a "standard" type (unconstrained in Python).
For bugs/questions:
* OS: **All**
* Python version `import sys; print(sys.version)`: **All**
* Pydantic version `import pydantic; print(pydantic.VERSION)`: **`master` branch**
Where possible please include a self contained code snippet describing your
bug, question, or where applicable feature request:
> PR with test case in 5 min.
author:
url:https://github.com/tiangolo
type:Person
name:tiangolo
datePublished:2019-01-05T14:26:10.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:1
url:https://github.com/349/pydantic/issues/349
context:https://schema.org
headline:BaseConfig's max_anystr_length default
articleBody:<!-- Questions, Feature Requests, and Bug Reports are all welcome -->
<!-- delete as applicable: -->
# Bug: BaseConfig's max_anystr_length default
Currently, `str` and `bytes` are validated using the `Config` class. By default, it imposes a validation of
`max_anystr_length` of `2 ** 16`.
The result is that declaring a model:
```Python
from pydantic import BaseModel
class Model(BaseModel):
a: str
```
would be equivalent (with respect to validations) to:
```Python
from pydantic import BaseModel
class Model(BaseModel):
a: constr(max_length=2 ** 16)
```
or
```Python
from pydantic import BaseModel, Schema
class Model(BaseModel):
a: str = Schema(..., max_length=2 ** 16)
```
(although the JSON schema currently doesn't show the default max_length).
---
Given that `bytes` are made to hold binary data that might be large, I think it doesn't make much sense to have that default constraint, especially for `bytes`. I can also imagine a whole book in a `str` would have the same problem.
I would suggest changing the defaults of `min_anystr_length` and `max_anystr_length` to `None`. Is there a more complex rationale for the fixed default that I'm not seeing?
One option is to set the defaults of `Config` to `None` (I vote for this).
The other option is to make the generated JSON Schema match the actual default validation behavior.
But I think it would probably seem counterintuitive to declare a model with a standard `str` or `bytes` and get a constrained version (and a constrained JSON Schema). And having to add extra code to remove a default extra constraint, while using a "standard" type (unconstrained in Python).
For bugs/questions:
* OS: **All**
* Python version `import sys; print(sys.version)`: **All**
* Pydantic version `import pydantic; print(pydantic.VERSION)`: **`master` branch**
Where possible please include a self contained code snippet describing your
bug, question, or where applicable feature request:
> PR with test case in 5 min.
author:
url:https://github.com/tiangolo
type:Person
name:tiangolo
datePublished:2019-01-05T14:26:10.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:1
url:https://github.com/349/pydantic/issues/349
Person:
url:https://github.com/tiangolo
name:tiangolo
url:https://github.com/tiangolo
name:tiangolo
InteractionCounter:
interactionType:https://schema.org/CommentAction
userInteractionCount:1
interactionType:https://schema.org/CommentAction
userInteractionCount:1
External Links {π}(2)
Analytics and Tracking {π}
- Site Verification - Google
Libraries {π}
- Clipboard.js
- D3.js
- Lodash
Emails and Hosting {βοΈ}
Mail Servers:
- aspmx.l.google.com
- alt1.aspmx.l.google.com
- alt2.aspmx.l.google.com
- alt3.aspmx.l.google.com
- alt4.aspmx.l.google.com
Name Servers:
- dns1.p08.nsone.net
- dns2.p08.nsone.net
- dns3.p08.nsone.net
- dns4.p08.nsone.net
- ns-1283.awsdns-32.org
- ns-1707.awsdns-21.co.uk
- ns-421.awsdns-52.com
- ns-520.awsdns-01.net