
GITHUB . COM {
}
Detected CMS Systems:
- Wordpress (2 occurrences)
Title:
Config.json_loads is not used with BaseModel.parse_file Β· Issue #1067 Β· pydantic/pydantic
Description:
Bug BaseModel.parse_file does not use the custom JSON decoder as specified in Config.json_loads. Please complete: OS: Ubuntu 18.04.3 LTS Python version import sys; print(sys.version): 3.8.0 (default, Oct 28 2019, 16:14:01) Pydantic versi...
Website Age:
17 years and 8 months (reg. 2007-10-09).
Matching Content Categories {π}
- Technology & Computing
- Mobile Technology & AI
- Business & Finance
Content Management System {π}
What CMS is github.com built with?
Github.com relies on 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 {π}
pydantic, bug, configjsonloads, basemodelparsefile, issue, json, import, sign, pull, added, samuelcolvin, kierandarcy, decoder, overwritten, file, navigation, search, code, issues, requests, actions, security, closed, version, default, docs, kwargs, hard, data, class, assert, related, wanted, request, change, commit, references, github, type, projects, milestone, footer, skip, content, menu, product, solutions, resources, open, source,
Topics {βοΈ}
wanted pull request 19c35ad alexdrydew added comment metadata assignees personal information config custom json decoder silly json decoder temporary json file verified b27455e sign pydantic v1 samuelcolvin added search docs issues class config change basemodel data = json assert raw_example temp file bug delete=false modify load_file projects milestone milestone relationships hjson file hard codes assert file_example parse_raw fyi github type projects pydantic config sys basemodel version decoder data[' json_loads sign parse_raw tmp_file file_example = hjson hard type parse_file skip jump complete os ubuntu 18
Payment Methods {π}
- Braintree
Questions {β}
- Already have an account?
Schema {πΊοΈ}
DiscussionForumPosting:
context:https://schema.org
headline:Config.json_loads is not used with BaseModel.parse_file
articleBody:# Bug
`BaseModel.parse_file` does not use the custom JSON decoder as specified in `Config.json_loads`.
Please complete:
* OS: **Ubuntu 18.04.3 LTS**
* Python version `import sys; print(sys.version)`: **3.8.0 (default, Oct 28 2019, 16:14:01)**
* Pydantic version `import pydantic; print(pydantic.VERSION)`: **1.2**
**Please read the [docs](https://pydantic-docs.helpmanual.io/) and search through issues to
confirm your bug hasn't already been reported.**
Where possible please include a self contained code snippet describing your bug:
```py
import json
import tempfile
from pydantic import BaseModel
def name_overwriting_decoder(*args, **kwargs):
"""A silly JSON decoder that hard codes a `name` value"""
data = json.loads(*args, **kwargs)
data['name'] = "Overwritten Name"
return data
class Example(BaseModel):
name = "Default Name"
class Config:
json_loads = name_overwriting_decoder
raw_example = Example.parse_raw(b'{"name": "Name To Overwrite"}')
assert raw_example.dict() == {"name": "Overwritten Name"}
# Create a temporary JSON file and write some JSON
tmp_file = tempfile.NamedTemporaryFile(delete=False)
tmp_file.write(b'{"name": "Name From Temp File"}')
tmp_file.close()
file_example = Example.parse_file(tmp_file.name)
assert file_example.dict() == {"name": "Overwritten Name"}
```
I would have expected `Example.parse_file` to use the same decoder as `Example.parse_raw`
FYI: I have a use-case where I parse a [Hjson](https://hjson.org/) file with [hjson.loads](https://hjson.github.io/hjson-py/#hjson.loads).
I am happy to produce a PR for this, if you think it is actually a bug :)
author:
url:https://github.com/kierandarcy
type:Person
name:kierandarcy
datePublished:2019-12-03T12:55:47.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:1
url:https://github.com/1067/pydantic/issues/1067
context:https://schema.org
headline:Config.json_loads is not used with BaseModel.parse_file
articleBody:# Bug
`BaseModel.parse_file` does not use the custom JSON decoder as specified in `Config.json_loads`.
Please complete:
* OS: **Ubuntu 18.04.3 LTS**
* Python version `import sys; print(sys.version)`: **3.8.0 (default, Oct 28 2019, 16:14:01)**
* Pydantic version `import pydantic; print(pydantic.VERSION)`: **1.2**
**Please read the [docs](https://pydantic-docs.helpmanual.io/) and search through issues to
confirm your bug hasn't already been reported.**
Where possible please include a self contained code snippet describing your bug:
```py
import json
import tempfile
from pydantic import BaseModel
def name_overwriting_decoder(*args, **kwargs):
"""A silly JSON decoder that hard codes a `name` value"""
data = json.loads(*args, **kwargs)
data['name'] = "Overwritten Name"
return data
class Example(BaseModel):
name = "Default Name"
class Config:
json_loads = name_overwriting_decoder
raw_example = Example.parse_raw(b'{"name": "Name To Overwrite"}')
assert raw_example.dict() == {"name": "Overwritten Name"}
# Create a temporary JSON file and write some JSON
tmp_file = tempfile.NamedTemporaryFile(delete=False)
tmp_file.write(b'{"name": "Name From Temp File"}')
tmp_file.close()
file_example = Example.parse_file(tmp_file.name)
assert file_example.dict() == {"name": "Overwritten Name"}
```
I would have expected `Example.parse_file` to use the same decoder as `Example.parse_raw`
FYI: I have a use-case where I parse a [Hjson](https://hjson.org/) file with [hjson.loads](https://hjson.github.io/hjson-py/#hjson.loads).
I am happy to produce a PR for this, if you think it is actually a bug :)
author:
url:https://github.com/kierandarcy
type:Person
name:kierandarcy
datePublished:2019-12-03T12:55:47.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:1
url:https://github.com/1067/pydantic/issues/1067
Person:
url:https://github.com/kierandarcy
name:kierandarcy
url:https://github.com/kierandarcy
name:kierandarcy
InteractionCounter:
interactionType:https://schema.org/CommentAction
userInteractionCount:1
interactionType:https://schema.org/CommentAction
userInteractionCount:1
External Links {π}(5)
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