
GITHUB . COM {
}
Detected CMS Systems:
- Wordpress (2 occurrences)
Title:
TypeError in test collection when sys.stdin isn't an iterator Β· Issue #3314 Β· pytest-dev/pytest
Description:
In this build, I found that because of the construction of a csv.DictReader(sys.stdin) during import, the file can't be collected. Looking a --pdb trace on it, I see: >>>>>>&g...
Website Age:
17 years and 8 months (reg. 2007-10-09).
Matching Content Categories {π}
- Education
- Social Networks
- Transportation
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,634 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,035 paying customers.
The estimated monthly recurring revenue (MRR) is $22,327,346.
The estimated annual recurring revenues (ARR) are $267,928,149.
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 {π}
test, iterator, jaraco, collection, read, typeerror, pytest, issue, pdb, selfreader, readerf, dialect, args, kwds, error, dontreadfrominput, ref, sign, code, module, testpy, errors, commented, contributor, type, git, diff, apytestcapturepy, bpytestcapturepy, add, projects, csvdictreadersysstdin, import, libraryframeworkspythonframeworkversionslibpythoncsvpy, init, argument, pytestcapturedontreadfrominput, object, pytestbot, added, author, iter, def, raise, stdin, github, navigation, issues, pull, requests,
Topics {βοΈ}
def fileno /library/frameworks/python jaraco/financial/lifo /users/jaraco/clean 2f47624 jaraco mentioned py ______________________________________________________ test bb80c47 nicoddemus closed read comment metadata assignees personal information typeerror adding __next__ assigned labels type type projects projects milestone py index 36658acc addressed type __iter__ pytest test code runs 1 errors pytest collection docs loading pytest test collection named 'test' failing test pdb trace collected produce iterator import open py index 6e213944 python 2 framework/versions/3 7/lib/python3 reader = reader code issue minimally replicated suppress tracebacks bug problem raise unsupportedoperation reader detects raise ioerror milestone relationships making dontreadfrominput satisfy csv raises oserror patch fixes /_pytest/capture
Payment Methods {π}
- Braintree
Questions {β}
- Already have an account?
Schema {πΊοΈ}
DiscussionForumPosting:
context:https://schema.org
headline:TypeError in test collection when sys.stdin isn't an iterator
articleBody:In [this build](https://travis-ci.org/jaraco/jaraco.financial/jobs/354002885), I found that because of the construction of a `csv.DictReader(sys.stdin)` during import, the file can't be collected.
Looking a `--pdb` trace on it, I see:
```
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
jaraco/financial/lifo.py:82: in <module>
input: compose(csv.DictReader, open)=csv.DictReader(sys.stdin),
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/csv.py:87: in __init__
self.reader = reader(f, dialect, *args, **kwds)
E TypeError: argument 1 must be an iterator
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/csv.py(87)__init__()
-> self.reader = reader(f, dialect, *args, **kwds)
(Pdb) f
<_pytest.capture.DontReadFromInput object at 0x1035952e8>
```
Obviously, I could refactor the code to bypass the error, but since the code runs, I feel it should be supported for pytest collection.
Perhaps `DontReadFromInput` could be adapted to be an iterator to satisfy csv.DictReader.
The issue can be minimally replicated with
```
$ cat > test.py
import sys
import csv
csv.DictReader(sys.stdin)
$ rwt -q pytest -- -m pytest test.py
======================================================== test session starts =========================================================
platform darwin -- Python 3.7.0b2, pytest-3.4.2, py-1.5.2, pluggy-0.6.0
rootdir: /Users/jaraco/clean, inifile:
collected 0 items / 1 errors
=============================================================== ERRORS ===============================================================
______________________________________________________ ERROR collecting test.py ______________________________________________________
test.py:3: in <module>
csv.DictReader(sys.stdin)
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/csv.py:87: in __init__
self.reader = reader(f, dialect, *args, **kwds)
E TypeError: argument 1 must be an iterator
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
====================================================== 1 error in 0.09 seconds =======================================================
```
author:
url:https://github.com/jaraco
type:Person
name:jaraco
datePublished:2018-03-16T01:01:36.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:4
url:https://github.com/3314/pytest/issues/3314
context:https://schema.org
headline:TypeError in test collection when sys.stdin isn't an iterator
articleBody:In [this build](https://travis-ci.org/jaraco/jaraco.financial/jobs/354002885), I found that because of the construction of a `csv.DictReader(sys.stdin)` during import, the file can't be collected.
Looking a `--pdb` trace on it, I see:
```
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
jaraco/financial/lifo.py:82: in <module>
input: compose(csv.DictReader, open)=csv.DictReader(sys.stdin),
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/csv.py:87: in __init__
self.reader = reader(f, dialect, *args, **kwds)
E TypeError: argument 1 must be an iterator
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/csv.py(87)__init__()
-> self.reader = reader(f, dialect, *args, **kwds)
(Pdb) f
<_pytest.capture.DontReadFromInput object at 0x1035952e8>
```
Obviously, I could refactor the code to bypass the error, but since the code runs, I feel it should be supported for pytest collection.
Perhaps `DontReadFromInput` could be adapted to be an iterator to satisfy csv.DictReader.
The issue can be minimally replicated with
```
$ cat > test.py
import sys
import csv
csv.DictReader(sys.stdin)
$ rwt -q pytest -- -m pytest test.py
======================================================== test session starts =========================================================
platform darwin -- Python 3.7.0b2, pytest-3.4.2, py-1.5.2, pluggy-0.6.0
rootdir: /Users/jaraco/clean, inifile:
collected 0 items / 1 errors
=============================================================== ERRORS ===============================================================
______________________________________________________ ERROR collecting test.py ______________________________________________________
test.py:3: in <module>
csv.DictReader(sys.stdin)
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/csv.py:87: in __init__
self.reader = reader(f, dialect, *args, **kwds)
E TypeError: argument 1 must be an iterator
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
====================================================== 1 error in 0.09 seconds =======================================================
```
author:
url:https://github.com/jaraco
type:Person
name:jaraco
datePublished:2018-03-16T01:01:36.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:4
url:https://github.com/3314/pytest/issues/3314
Person:
url:https://github.com/jaraco
name:jaraco
url:https://github.com/jaraco
name:jaraco
InteractionCounter:
interactionType:https://schema.org/CommentAction
userInteractionCount:4
interactionType:https://schema.org/CommentAction
userInteractionCount:4
External Links {π}(5)
- Revenue of https://github.blog
- What's the financial outcome of https://travis-ci.org/jaraco/jaraco.financial/jobs/354002885?
- What's the financial gain of https://gitmate.io?
- https://docs.python.org/3/c-api/object.html#c.PyObject_GetIter income
- Find out how much https://www.githubstatus.com/ earns monthly
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