
GITHUB . COM {
}
Detected CMS Systems:
- Wordpress (2 occurrences)
Title:
Mypy plugin crashes with `explicit_package_bases` set as true Β· Issue #5191 Β· pydantic/pydantic
Description:
Initial Checks I have searched GitHub for a duplicate issue and I'm sure this is something new I have searched Google & StackOverflow for a solution and couldn't find anything I have re...
Website Age:
17 years and 8 months (reg. 2007-10-09).
Matching Content Categories {π}
- Technology & Computing
- TV
- Video & Online Content
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 {π}
mypy, true, dmontagu, pydantic, file, line, issue, code, marcelopgc, bug, error, version, commented, plugin, mypysemanalpy, sign, explicitpackagebases, github, unconfirmed, contributor, share, pull, description, added, config, optional, pydanticmypypy, run, python, install, data, type, samuelcolvin, mentioned, reproduce, fix, navigation, resources, requests, actions, security, crashes, set, closed, searched, docs, fastapi, attributes, strict, plugins,
Topics {βοΈ}
9/site-packages/pydantic python version /python/mypy/issues version src/app/models/stages io/en/stable/common_issues 1-microsoft-standard-wsl2-x86_64 a-development-mypy-build true install path support mypy v1 venv/lib/python3 comment metadata assignees prevent mypy errors optional static typing dmontagu closed orm mode plugins easily share code src/app /marcelopgc/pydantic1 mypy version pydantic v1 dmontagu mentioned resources/ pydantic/mypy unconfirmed type strict mypy toml config type projects docs response python python-devtools plugin 6 pydantic compiled duplicate issue updating mypy mypy master mypy/semanal mypy/nodes tools - mypy crashing mypy explicit_package_bases set explicit_package_bases configuration `explicit_package_bases` set bug run mypy searched github json optional attributes 31 optional deps added recent call set_frozen assertionerror
Payment Methods {π}
- Braintree
Questions {β}
- @marcelopgc I'm looking at this now β do you have example code you can share that causes this issue when you run mypy on it?
- Already have an account?
Schema {πΊοΈ}
DiscussionForumPosting:
context:https://schema.org
headline:Mypy plugin crashes with `explicit_package_bases` set as true
articleBody:### Initial Checks
- [X] I have searched GitHub for a duplicate issue and I'm sure this is something new
- [X] I have searched Google & StackOverflow for a solution and couldn't find anything
- [X] I have read and followed [the docs](https://docs.pydantic.dev) and still think this is a bug
- [X] I am confident that the issue is with pydantic (not my code, or another library in the ecosystem like [FastAPI](https://fastapi.tiangolo.com) or [mypy](https://mypy.readthedocs.io/en/stable))
### Description
After updating mypy to v1.1.1, I added the following `pyproject.toml` config, as descripted in the [documentation](https://docs.pydantic.dev/mypy_plugin/#plugin-settings), to prevent mypy errors on classes with Optional attributes:
``` txt
[tool.mypy]
strict = true
files = "src/app"
mypy_path = "src/"
namespace_packages = true
explicit_package_bases = true
follow_imports = "silent"
ignore_missing_imports = true
exclude = "(resources/.*)"
plugins = [
"pydantic.mypy"
]
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
# for strict mypy: (this is the tricky one :-))
disallow_untyped_defs = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
```
Using that config, I found an internal error while running mypy
```
src/app/models/stages.py:152: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 1.1.1
Traceback (most recent call last):
File "mypy/semanal.py", line 6261, in accept
File "mypy/nodes.py", line 1123, in accept
File "mypy/semanal.py", line 1561, in visit_class_def
File "mypy/semanal.py", line 1641, in analyze_class
File "mypy/semanal.py", line 1668, in analyze_class_body_common
File "mypy/semanal.py", line 1751, in apply_class_plugin_hooks
File "pydantic/mypy.py", line 150, in pydantic.mypy.PydanticPlugin._pydantic_model_class_maker_callback
File "pydantic/mypy.py", line 315, in pydantic.mypy.PydanticModelTransformer.transform
File "pydantic/mypy.py", line 524, in pydantic.mypy.PydanticModelTransformer.set_frozen
AssertionError:
src/app/models/stages.py:152: : note: use --pdb to drop into pdb
```
If remove the `explicit_package_bases` configuration, mypy is able to run without this setting.
mypy version:
```
name : mypy
version : 1.1.1
description : Optional static typing for Python
dependencies
- mypy-extensions >=1.0.0
- tomli >=1.1.0
- typing-extensions >=3.10
```
### Example Code
_No response_
### Python, Pydantic & OS Version
```Text
pydantic version: 1.10.6
pydantic compiled: True
install path: /workspace/.venv/lib/python3.9/site-packages/pydantic
python version: 3.9.16 (main, Jan 11 2023, 15:55:30) [GCC 10.2.1 20210110]
platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31
optional deps. installed: ['typing-extensions']
```
### Affected Components
- [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/)
- [ ] [Data validation/parsing](https://docs.pydantic.dev/usage/models/#basic-model-usage)
- [ ] [Data serialization](https://docs.pydantic.dev/usage/exporting_models/) - `.dict()` and `.json()`
- [ ] [JSON Schema](https://docs.pydantic.dev/usage/schema/)
- [ ] [Dataclasses](https://docs.pydantic.dev/usage/dataclasses/)
- [ ] [Model Config](https://docs.pydantic.dev/usage/model_config/)
- [ ] [Field Types](https://docs.pydantic.dev/usage/types/) - adding or changing a particular data type
- [ ] [Function validation decorator](https://docs.pydantic.dev/usage/validation_decorator/)
- [ ] [Generic Models](https://docs.pydantic.dev/usage/models/#generic-models)
- [ ] [Other Model behaviour](https://docs.pydantic.dev/usage/models/) - `construct()`, pickling, private attributes, ORM mode
- [X] [Plugins](https://docs.pydantic.dev/) and integration with other tools - mypy, FastAPI, python-devtools, Hypothesis, VS Code, PyCharm, etc.
author:
url:https://github.com/marcelopgc
type:Person
name:marcelopgc
datePublished:2023-03-14T20:16:04.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:6
url:https://github.com/5191/pydantic/issues/5191
context:https://schema.org
headline:Mypy plugin crashes with `explicit_package_bases` set as true
articleBody:### Initial Checks
- [X] I have searched GitHub for a duplicate issue and I'm sure this is something new
- [X] I have searched Google & StackOverflow for a solution and couldn't find anything
- [X] I have read and followed [the docs](https://docs.pydantic.dev) and still think this is a bug
- [X] I am confident that the issue is with pydantic (not my code, or another library in the ecosystem like [FastAPI](https://fastapi.tiangolo.com) or [mypy](https://mypy.readthedocs.io/en/stable))
### Description
After updating mypy to v1.1.1, I added the following `pyproject.toml` config, as descripted in the [documentation](https://docs.pydantic.dev/mypy_plugin/#plugin-settings), to prevent mypy errors on classes with Optional attributes:
``` txt
[tool.mypy]
strict = true
files = "src/app"
mypy_path = "src/"
namespace_packages = true
explicit_package_bases = true
follow_imports = "silent"
ignore_missing_imports = true
exclude = "(resources/.*)"
plugins = [
"pydantic.mypy"
]
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
# for strict mypy: (this is the tricky one :-))
disallow_untyped_defs = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
```
Using that config, I found an internal error while running mypy
```
src/app/models/stages.py:152: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 1.1.1
Traceback (most recent call last):
File "mypy/semanal.py", line 6261, in accept
File "mypy/nodes.py", line 1123, in accept
File "mypy/semanal.py", line 1561, in visit_class_def
File "mypy/semanal.py", line 1641, in analyze_class
File "mypy/semanal.py", line 1668, in analyze_class_body_common
File "mypy/semanal.py", line 1751, in apply_class_plugin_hooks
File "pydantic/mypy.py", line 150, in pydantic.mypy.PydanticPlugin._pydantic_model_class_maker_callback
File "pydantic/mypy.py", line 315, in pydantic.mypy.PydanticModelTransformer.transform
File "pydantic/mypy.py", line 524, in pydantic.mypy.PydanticModelTransformer.set_frozen
AssertionError:
src/app/models/stages.py:152: : note: use --pdb to drop into pdb
```
If remove the `explicit_package_bases` configuration, mypy is able to run without this setting.
mypy version:
```
name : mypy
version : 1.1.1
description : Optional static typing for Python
dependencies
- mypy-extensions >=1.0.0
- tomli >=1.1.0
- typing-extensions >=3.10
```
### Example Code
_No response_
### Python, Pydantic & OS Version
```Text
pydantic version: 1.10.6
pydantic compiled: True
install path: /workspace/.venv/lib/python3.9/site-packages/pydantic
python version: 3.9.16 (main, Jan 11 2023, 15:55:30) [GCC 10.2.1 20210110]
platform: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.31
optional deps. installed: ['typing-extensions']
```
### Affected Components
- [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/)
- [ ] [Data validation/parsing](https://docs.pydantic.dev/usage/models/#basic-model-usage)
- [ ] [Data serialization](https://docs.pydantic.dev/usage/exporting_models/) - `.dict()` and `.json()`
- [ ] [JSON Schema](https://docs.pydantic.dev/usage/schema/)
- [ ] [Dataclasses](https://docs.pydantic.dev/usage/dataclasses/)
- [ ] [Model Config](https://docs.pydantic.dev/usage/model_config/)
- [ ] [Field Types](https://docs.pydantic.dev/usage/types/) - adding or changing a particular data type
- [ ] [Function validation decorator](https://docs.pydantic.dev/usage/validation_decorator/)
- [ ] [Generic Models](https://docs.pydantic.dev/usage/models/#generic-models)
- [ ] [Other Model behaviour](https://docs.pydantic.dev/usage/models/) - `construct()`, pickling, private attributes, ORM mode
- [X] [Plugins](https://docs.pydantic.dev/) and integration with other tools - mypy, FastAPI, python-devtools, Hypothesis, VS Code, PyCharm, etc.
author:
url:https://github.com/marcelopgc
type:Person
name:marcelopgc
datePublished:2023-03-14T20:16:04.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:6
url:https://github.com/5191/pydantic/issues/5191
Person:
url:https://github.com/marcelopgc
name:marcelopgc
url:https://github.com/marcelopgc
name:marcelopgc
InteractionCounter:
interactionType:https://schema.org/CommentAction
userInteractionCount:6
interactionType:https://schema.org/CommentAction
userInteractionCount:6
External Links {π}(17)
- Discover the revenue of https://github.blog
- How much does https://docs.pydantic.dev earn?
- Monthly income for https://fastapi.tiangolo.com
- How much does https://mypy.readthedocs.io/en/stable bring in each month?
- Earnings of https://docs.pydantic.dev/mypy_plugin/#plugin-settings
- Revenue of https://docs.pydantic.dev/changelog/
- How much does https://docs.pydantic.dev/usage/models/#basic-model-usage make?
- What's the financial intake of https://docs.pydantic.dev/usage/exporting_models/?
- Explore the financials of https://docs.pydantic.dev/usage/schema/
- How profitable is https://docs.pydantic.dev/usage/dataclasses/?
- Profit of https://docs.pydantic.dev/usage/model_config/
- What are the earnings of https://docs.pydantic.dev/usage/types/?
- https://docs.pydantic.dev/usage/validation_decorator/ income
- What's the income of https://docs.pydantic.dev/usage/models/#generic-models?
- How much revenue does https://docs.pydantic.dev/usage/models/ produce monthly?
- How much does https://docs.pydantic.dev/ make?
- How profitable is https://www.githubstatus.com/?
Analytics and Tracking {π}
- Site Verification - Google
Libraries {π}
- Clipboard.js
- D3.js
- Lodash
- Typed.js
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