Here's how GITHUB.COM makes money* and how much!

*Please read our disclaimer before using our estimates.
Loading...

GITHUB . COM {}

Detected CMS Systems:

  1. Analyzed Page
  2. Matching Content Categories
  3. CMS
  4. Monthly Traffic Estimate
  5. How Does Github.com Make Money
  6. How Much Does Github.com Make
  7. Wordpress Themes And Plugins
  8. Keywords
  9. Topics
  10. Payment Methods
  11. Questions
  12. Schema
  13. External Links
  14. Analytics And Tracking
  15. Libraries
  16. Hosting Providers

We are analyzing https://github.com/pydantic/pydantic/issues/2044.

Title:
When Config.validate_assignment is true, raising an unexpected exception type in a field validator results in the field being removed from model.__dict__ Β· Issue #2044 Β· pydantic/pydantic
Description:
Checks I added a descriptive title to this issue I have searched (google, github) for similar issues and couldn't find anything I have read and followed the docs and still think this is a bug D...
Website Age:
17 years and 9 months (reg. 2007-10-09).

Matching Content Categories {πŸ“š}

  • TV
  • Photography
  • Fitness & Wellness

Content Management System {πŸ“}

What CMS is github.com built with?


Github.com operates using 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,666,394 visitors per month in the current month.

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 5,347,507 paying customers.
The estimated monthly recurring revenue (MRR) is $22,459,531.
The estimated annual recurring revenues (ARR) are $269,514,368.

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 {πŸ”}

exception, field, validator, raising, type, true, unexpected, pydantic, configvalidateassignment, removed, bug, results, model, printf, modeldict, issue, johnsabath, sign, title, github, docs, raises, foo, modelfoo, file, line, fieldvalue, navigation, issues, pull, requests, actions, security, closed, added, read, raise, exceptions, valueerror, typeerror, assertionerror, destructive, set, assigned, selfdictpopname, dict, class, raiseexception, modelfoofieldvalue, printmodel,

Topics {βœ’οΈ}

sabath/venv/pydantic-issue/lib/python3 sabath/random/pydantic-issue/main 7/site-packages/pydantic/main pydantic import validator comment metadata assignees unhandled exception occurs 'field1_value'} caught exception unexpected exception type type=optional[str] field validator results pydantic v1 similar issues field validator raises johnsabath changed bug disclaimer f' model={model}' docs state pydantic/main foo='field1_value' unexpected exceptions 'caught exception validator error' type projects bug added exception types raise exception f' model docs model = model __fields__={'foo' issue type valueerror __dict__={'foo' raise exceptions accident/ignorance problematic loc def validate_fields __name__ == '__main__' foo = 'raise_exception' required=false recent call /users/john prevent fields projects milestone milestone relationships personal information raising exception __fields__={model __dict__={model

Payment Methods {πŸ“Š}

  • Braintree

Questions {❓}

  • Already have an account?

Schema {πŸ—ΊοΈ}

DiscussionForumPosting:
      context:https://schema.org
      headline:When Config.validate_assignment is true, raising an unexpected exception type in a field validator results in the field being removed from model.__dict__
      articleBody:### Checks * [X] I added a descriptive title to this issue * [X] I have searched (google, github) for similar issues and couldn't find anything * [X] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and still think this is a bug # Disclaimer While I understand that the docs state that validators should only raise exceptions of ValueError, TypeError, or AssertionError, it's not unreasonable to assume that other Exception types could be raised by accident/ignorance. Since Pydantic is acting on these unexpected exceptions in a destructive way, I still felt the need to report a bug. # Bug This is a regression that was introduced with Pydantic 3.7 If a field validator raises an exception that isn't of type ValueError, TypeError, or AssertionError, while Config.validate_assignment is set to True, the field that was being validated is removed from `model.__dict__` and can no longer be read or assigned. [Problematic LoC](https://github.com/samuelcolvin/pydantic/blob/master/pydantic/main.py#L387) As far as I can tell, the destructive `self.__dict__.pop(name)` operation could be replaced with `self.__dict__[name]`. This way even if an unhandled exception occurs afterwards, the field will still exist on `__dict__` and will still have its original value set. Reproduction of the issue: ```py from pydantic import validator, BaseModel class Model(BaseModel): foo: str = None class Config: validate_assignment = True @validator('foo') def validate_fields(cls, value): if value == 'raise_exception': raise Exception('Example validator error') return value if __name__ == '__main__': model = Model(foo='field1_value') print('Model before raising exception in validator') print(f' model={model}') print(f' model.__fields__={model.__fields__}') print(f' model.__dict__={model.__dict__}') try: model.foo = 'raise_exception' except Exception: print('Caught exception as expected') print('Model after raising exception in validator') print(f' model={model}') print(f' model.__fields__={model.__fields__}') print(f' model.__dict__={model.__dict__}') # Raises KeyError: 'foo' # File "pydantic/main.py", line 387, in pydantic.main.BaseModel.__setattr__ model.foo = 'field1_value' ``` Output: ```bash Model before raising exception in validator model=foo='field1_value' model.__fields__={'foo': ModelField(name='foo', type=Optional[str], required=False, default=None)} model.__dict__={'foo': 'field1_value'} Caught exception as expected Model after raising exception in validator model= model.__fields__={'foo': ModelField(name='foo', type=Optional[str], required=False, default=None)} model.__dict__={} Traceback (most recent call last): File "/Users/john.sabath/random/pydantic-issue/main.py", line 45, in <module> model.foo = 'field1_value' File "/Users/john.sabath/venv/pydantic-issue/lib/python3.7/site-packages/pydantic/main.py", line 387, in __setattr__ original_value = self.__dict__.pop(name) KeyError: 'foo' ```
      author:
         url:https://github.com/johnsabath
         type:Person
         name:johnsabath
      datePublished:2020-10-27T00:09:24.000Z
      interactionStatistic:
         type:InteractionCounter
         interactionType:https://schema.org/CommentAction
         userInteractionCount:0
      url:https://github.com/2044/pydantic/issues/2044
      context:https://schema.org
      headline:When Config.validate_assignment is true, raising an unexpected exception type in a field validator results in the field being removed from model.__dict__
      articleBody:### Checks * [X] I added a descriptive title to this issue * [X] I have searched (google, github) for similar issues and couldn't find anything * [X] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and still think this is a bug # Disclaimer While I understand that the docs state that validators should only raise exceptions of ValueError, TypeError, or AssertionError, it's not unreasonable to assume that other Exception types could be raised by accident/ignorance. Since Pydantic is acting on these unexpected exceptions in a destructive way, I still felt the need to report a bug. # Bug This is a regression that was introduced with Pydantic 3.7 If a field validator raises an exception that isn't of type ValueError, TypeError, or AssertionError, while Config.validate_assignment is set to True, the field that was being validated is removed from `model.__dict__` and can no longer be read or assigned. [Problematic LoC](https://github.com/samuelcolvin/pydantic/blob/master/pydantic/main.py#L387) As far as I can tell, the destructive `self.__dict__.pop(name)` operation could be replaced with `self.__dict__[name]`. This way even if an unhandled exception occurs afterwards, the field will still exist on `__dict__` and will still have its original value set. Reproduction of the issue: ```py from pydantic import validator, BaseModel class Model(BaseModel): foo: str = None class Config: validate_assignment = True @validator('foo') def validate_fields(cls, value): if value == 'raise_exception': raise Exception('Example validator error') return value if __name__ == '__main__': model = Model(foo='field1_value') print('Model before raising exception in validator') print(f' model={model}') print(f' model.__fields__={model.__fields__}') print(f' model.__dict__={model.__dict__}') try: model.foo = 'raise_exception' except Exception: print('Caught exception as expected') print('Model after raising exception in validator') print(f' model={model}') print(f' model.__fields__={model.__fields__}') print(f' model.__dict__={model.__dict__}') # Raises KeyError: 'foo' # File "pydantic/main.py", line 387, in pydantic.main.BaseModel.__setattr__ model.foo = 'field1_value' ``` Output: ```bash Model before raising exception in validator model=foo='field1_value' model.__fields__={'foo': ModelField(name='foo', type=Optional[str], required=False, default=None)} model.__dict__={'foo': 'field1_value'} Caught exception as expected Model after raising exception in validator model= model.__fields__={'foo': ModelField(name='foo', type=Optional[str], required=False, default=None)} model.__dict__={} Traceback (most recent call last): File "/Users/john.sabath/random/pydantic-issue/main.py", line 45, in <module> model.foo = 'field1_value' File "/Users/john.sabath/venv/pydantic-issue/lib/python3.7/site-packages/pydantic/main.py", line 387, in __setattr__ original_value = self.__dict__.pop(name) KeyError: 'foo' ```
      author:
         url:https://github.com/johnsabath
         type:Person
         name:johnsabath
      datePublished:2020-10-27T00:09:24.000Z
      interactionStatistic:
         type:InteractionCounter
         interactionType:https://schema.org/CommentAction
         userInteractionCount:0
      url:https://github.com/2044/pydantic/issues/2044
Person:
      url:https://github.com/johnsabath
      name:johnsabath
      url:https://github.com/johnsabath
      name:johnsabath
InteractionCounter:
      interactionType:https://schema.org/CommentAction
      userInteractionCount:0
      interactionType:https://schema.org/CommentAction
      userInteractionCount:0

Analytics and Tracking {πŸ“Š}

  • Site Verification - Google

Libraries {πŸ“š}

  • Clipboard.js
  • D3.js
  • GSAP
  • 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
9.67s.