
GITHUB . COM {
}
Detected CMS Systems:
- Wordpress (2 occurrences)
Title:
New-style classes for python2.7 Β· Issue #2147 Β· pytest-dev/pytest
Description:
The problem: Pytest uses old-style classes everywhere. E.g., class MarkGenerator: β¦β¦β¦ class MarkDecorator: β¦β¦β¦ This causes unexpected behaviour in some cases. For example, when trying to get an item from a mark, AttributeError is raised ...
Website Age:
17 years and 8 months (reg. 2007-10-09).
Matching Content Categories {π}
- Fitness & Wellness
- Education
- Photography
Content Management System {π}
What CMS is github.com built with?
Github.com is based 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,653,877 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,316,156 paying customers.
The estimated monthly recurring revenue (MRR) is $22,327,854.
The estimated annual recurring revenues (ARR) are $267,934,248.
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 {π}
classes, newstyle, python, commented, issue, class, object, compatibility, type, nicoddemus, pytest, nolar, break, member, ronnypfannschmidt, michalthedude, sign, code, oldstyle, style, change, branch, contributor, feature, projects, inheritance, changing, introduced, special, pass, dont, features, mentioned, backward, goodboy, navigation, issues, pull, requests, actions, security, closed, behaviour, cases, attributeerror, raised, typeerror, long, libraries, instance,
Topics {βοΈ}
pytest/_pytest/vendored_packages/pluggy backward compatibility issues goodboy mentioned issue easy issue simple find/replace comment metadata assignees assigned labels good jinja template engine org/doc/newstyle/ major releases type style classes affect introducing attrs features branch type long time ago compiler commented type projects started learning python break behaiviour compatibility projects milestone 3 code anymore compiler member contributor type integrate pytest features branch terms pluggy style classes style classes libraries & frameworks nolar changed style syntax long deprecated code testing/ folder backward compatibility win32 type break compatibility unexpected behaviour weird behaviour explicitly inheriting braces syntax explicit mentioning recent call support indexing break things feature-branch feature branch carefully noted removal marks actual removal
Payment Methods {π}
- Braintree
Questions {β}
- 6 compatibility?
- @nolar would you like to contribute a PR?
- Already have an account?
- But what about classes in testing/ folder?
- I saw Issue #2179 and does it cover all classes?
- Should I add (object) into those folders?
- Should It be also changed?
Schema {πΊοΈ}
DiscussionForumPosting:
context:https://schema.org
headline:New-style classes for python2.7
articleBody:**The problem:**
Pytest uses old-style classes everywhere. E.g.,
```
class MarkGenerator:
β¦β¦β¦
class MarkDecorator:
β¦β¦β¦
```
This causes unexpected behaviour in some cases. For example, when trying to get an item from a mark, `AttributeError` is raised (as in the old-style classes) instead of `TypeError` (as in the new-style classes).
The old-style classes are long deprecated, and the modern libraries & young developers do not expect this weird behaviour in their code anymore. This causes errors when trying to integrate pytest with other libraries & frameworks. For instance, in Jinja template engine (pallets/jinja#631); but there may be other cases.
**The solution:**
It would be nice if all classes would be new-style classes, i.e. explicitly inheriting from `object`:
```
class MarkGenerator(object):
β¦β¦β¦
class MarkDecorator(object):
β¦β¦β¦
```
**Possible problems:**
This will probably break the compatibility with python < 2.7 (officially 2.6+ is declared for pytest).
Also, in python3, the no-braces syntax is a new normal (again), but causes the new-style classes with implicit inheritance from `object`. The 2.7's new-style syntax is supported.
So, explicit mentioning of `(object)` may be of use for python2.7 only. Hence, it should be discussed is it worth changing the code for this case.
**Notes:**
Python 2.7.10.
pytest==3.0.3
author:
url:https://github.com/nolar
type:Person
name:nolar
datePublished:2016-12-20T09:57:57.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:14
url:https://github.com/2147/pytest/issues/2147
context:https://schema.org
headline:New-style classes for python2.7
articleBody:**The problem:**
Pytest uses old-style classes everywhere. E.g.,
```
class MarkGenerator:
β¦β¦β¦
class MarkDecorator:
β¦β¦β¦
```
This causes unexpected behaviour in some cases. For example, when trying to get an item from a mark, `AttributeError` is raised (as in the old-style classes) instead of `TypeError` (as in the new-style classes).
The old-style classes are long deprecated, and the modern libraries & young developers do not expect this weird behaviour in their code anymore. This causes errors when trying to integrate pytest with other libraries & frameworks. For instance, in Jinja template engine (pallets/jinja#631); but there may be other cases.
**The solution:**
It would be nice if all classes would be new-style classes, i.e. explicitly inheriting from `object`:
```
class MarkGenerator(object):
β¦β¦β¦
class MarkDecorator(object):
β¦β¦β¦
```
**Possible problems:**
This will probably break the compatibility with python < 2.7 (officially 2.6+ is declared for pytest).
Also, in python3, the no-braces syntax is a new normal (again), but causes the new-style classes with implicit inheritance from `object`. The 2.7's new-style syntax is supported.
So, explicit mentioning of `(object)` may be of use for python2.7 only. Hence, it should be discussed is it worth changing the code for this case.
**Notes:**
Python 2.7.10.
pytest==3.0.3
author:
url:https://github.com/nolar
type:Person
name:nolar
datePublished:2016-12-20T09:57:57.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:14
url:https://github.com/2147/pytest/issues/2147
Person:
url:https://github.com/nolar
name:nolar
url:https://github.com/nolar
name:nolar
InteractionCounter:
interactionType:https://schema.org/CommentAction
userInteractionCount:14
interactionType:https://schema.org/CommentAction
userInteractionCount:14
External Links {π}(5)
- What's https://github.blog's gross income?
- How much does https://wiki.python.org/moin/NewClassVsClassicClass pull in?
- What is the monthly revenue of https://docs.python.org/2/library/functions.html?highlight=object#object?
- How much profit does https://www.python.org/doc/newstyle/ generate?
- What is the earnings of https://www.githubstatus.com/?
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