
GITHUB . COM {
}
Detected CMS Systems:
- Wordpress (2 occurrences)
Title:
Model signature generation makes incorrect signature for models with extras allowed and `data` attribute in spec Β· Issue #1418 Β· pydantic/pydantic
Description:
Bug Output of python -c "import pydantic.utils; print(pydantic.utils.version_info())": pydantic version: 1.5 pydantic compiled: False install path: /home/jrootjunior/.cache/pypoetry/virtualenvs/aiogram-BAWpo_Vh-py3.8/lib/python3.8/site-p...
Website Age:
17 years and 8 months (reg. 2007-10-09).
Matching Content Categories {π}
- Technology & Computing
- Mobile Technology & AI
- Social Networks
Content Management System {π}
What CMS is github.com built with?
Github.com uses 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 {π}
signature, pydantic, generation, data, issue, bug, extra, sign, attribute, import, class, file, line, fix, field, model, incorrect, allowed, optionalstr, parameter, added, navigation, code, pull, requests, actions, security, makes, models, extras, spec, closed, jrootjunior, python, version, optional, myobjectbasemodel, config, information, related, prettywood, names, samuelcolvin, github, type, projects, milestone, footer, skip, content,
Topics {βοΈ}
cache/pypoetry/virtualenvs/aiogram-bawpo_vh-py3 /home/jrootjunior/work/aiogram3/expetiment 8/site-packages/pydantic/main incorrect signature 8/site-packages/pydantic/utils signature generation 2ddb9da prettywood mentioned comment metadata assignees typing import optional wrong parameter order model pydantic import basemodel variadic keyword parameter parameter information /usr/lib/python3 verified b287146 sign pydantic v1 /home/jrootjunior/ pydantic version import pydantic 8/lib/python3 __signature__ = generate_model_signature optional[str] = 3-arch1-1-x86_64 exception traceback recent call parameters=list projects milestone milestone relationships extra arguments data argument class config field names 2349c9b fix field na⦠extras allowed extra = extra data attribute `data` attribute github type projects pydantic python 8/inspect class utils __init__ valueerror keyword extra
Payment Methods {π}
- Braintree
Questions {β}
- Already have an account?
Schema {πΊοΈ}
DiscussionForumPosting:
context:https://schema.org
headline:Model signature generation makes incorrect signature for models with extras allowed and `data` attribute in spec
articleBody:# Bug
Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`:
```
pydantic version: 1.5
pydantic compiled: False
install path: /home/jrootjunior/.cache/pypoetry/virtualenvs/aiogram-BAWpo_Vh-py3.8/lib/python3.8/site-packages/pydantic
python version: 3.8.2 (default, Apr 8 2020, 14:31:25) [GCC 9.3.0]
platform: Linux-5.6.3-arch1-1-x86_64-with-glibc2.2.5
optional deps. installed: ['typing-extensions']
```
## Explanation
Feature from #1034 breaks things when model has `data` attribute and extra arguments is allowed and this attribute is not the last one in class.
## Code snippet
```py
import inspect
from typing import Optional
from pydantic import BaseModel, Extra
class MyObject(BaseModel):
foo: Optional[str] = None
data: Optional[str] = None
bar: Optional[str] = None
class Config:
extra = Extra.allow
```
## Caused an exception
```py
Traceback (most recent call last):
File "/home/jrootjunior/work/aiogram3/expetiment.py", line 7, in <module>
class MyObject(BaseModel):
File "/home/jrootjunior/.cache/pypoetry/virtualenvs/aiogram-BAWpo_Vh-py3.8/lib/python3.8/site-packages/pydantic/main.py", line 303, in __new__
cls.__signature__ = generate_model_signature(cls.__init__, fields, config)
File "/home/jrootjunior/.cache/pypoetry/virtualenvs/aiogram-BAWpo_Vh-py3.8/lib/python3.8/site-packages/pydantic/utils.py", line 185, in generate_model_signature
return Signature(parameters=list(merged_params.values()), return_annotation=None)
File "/usr/lib/python3.8/inspect.py", line 2785, in __init__
raise ValueError(msg)
ValueError: wrong parameter order: variadic keyword parameter before keyword-only parameter
```
## Information from debugger
As i see the `data` argument has incorrect signature:

author:
url:https://github.com/JrooTJunior
type:Person
name:JrooTJunior
datePublished:2020-04-22T21:33:54.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:0
url:https://github.com/1418/pydantic/issues/1418
context:https://schema.org
headline:Model signature generation makes incorrect signature for models with extras allowed and `data` attribute in spec
articleBody:# Bug
Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`:
```
pydantic version: 1.5
pydantic compiled: False
install path: /home/jrootjunior/.cache/pypoetry/virtualenvs/aiogram-BAWpo_Vh-py3.8/lib/python3.8/site-packages/pydantic
python version: 3.8.2 (default, Apr 8 2020, 14:31:25) [GCC 9.3.0]
platform: Linux-5.6.3-arch1-1-x86_64-with-glibc2.2.5
optional deps. installed: ['typing-extensions']
```
## Explanation
Feature from #1034 breaks things when model has `data` attribute and extra arguments is allowed and this attribute is not the last one in class.
## Code snippet
```py
import inspect
from typing import Optional
from pydantic import BaseModel, Extra
class MyObject(BaseModel):
foo: Optional[str] = None
data: Optional[str] = None
bar: Optional[str] = None
class Config:
extra = Extra.allow
```
## Caused an exception
```py
Traceback (most recent call last):
File "/home/jrootjunior/work/aiogram3/expetiment.py", line 7, in <module>
class MyObject(BaseModel):
File "/home/jrootjunior/.cache/pypoetry/virtualenvs/aiogram-BAWpo_Vh-py3.8/lib/python3.8/site-packages/pydantic/main.py", line 303, in __new__
cls.__signature__ = generate_model_signature(cls.__init__, fields, config)
File "/home/jrootjunior/.cache/pypoetry/virtualenvs/aiogram-BAWpo_Vh-py3.8/lib/python3.8/site-packages/pydantic/utils.py", line 185, in generate_model_signature
return Signature(parameters=list(merged_params.values()), return_annotation=None)
File "/usr/lib/python3.8/inspect.py", line 2785, in __init__
raise ValueError(msg)
ValueError: wrong parameter order: variadic keyword parameter before keyword-only parameter
```
## Information from debugger
As i see the `data` argument has incorrect signature:

author:
url:https://github.com/JrooTJunior
type:Person
name:JrooTJunior
datePublished:2020-04-22T21:33:54.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:0
url:https://github.com/1418/pydantic/issues/1418
Person:
url:https://github.com/JrooTJunior
name:JrooTJunior
url:https://github.com/JrooTJunior
name:JrooTJunior
InteractionCounter:
interactionType:https://schema.org/CommentAction
userInteractionCount:0
interactionType:https://schema.org/CommentAction
userInteractionCount:0
External Links {π}(3)
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