Skip to content

Commit

Permalink
upgraded grequests | fixing grequests/gevent monkey patch | fixing cs…
Browse files Browse the repository at this point in the history
…v output stream
  • Loading branch information
snyaggarwal committed May 31, 2022
1 parent 2b51741 commit 979ca10
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion datim/datimbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,16 @@
import datetime
import json
from io import StringIO
import requests

# below is needed because of https://github.com/spyoungtech/grequests/issues/103
from gevent import monkey
def stub(*args, **kwargs): # pylint: disable=unused-argument
pass
monkey.patch_all = stub
#########

import grequests
import requests
import settings
import ocldev.oclconstants
from requests.adapters import HTTPAdapter
Expand Down
2 changes: 1 addition & 1 deletion iol.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def get_as_csv(rows, start_columns=None, include_columns=None, exclude_columns=N
# Generate the CSV output
import csv
import io
output_stream = io.BytesIO()
output_stream = io.StringIO()
writer = csv.DictWriter(output_stream, fieldnames=csv_columns)
writer.writeheader()
for row in rows:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ enum34==1.1.6
eventlet==0.25.1
gevent==21.12.0
greenlet==1.1.2
grequests==0.4.0
grequests==0.6.0
idna==2.7
importlib-metadata==1.5.0
isort==4.3.4
Expand Down

0 comments on commit 979ca10

Please sign in to comment.