Skip to content

Commit

Permalink
__aiter__ is not a coroutine anymore, it is working in this way since…
Browse files Browse the repository at this point in the history
… python 3.5 (#11)
  • Loading branch information
chexca authored Oct 25, 2019
1 parent b634927 commit 41a2e67
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
dist: xenial
language: python
python:
- '3.5'
- '3.6'
- '3.7'
install:
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Welcome to vt-py's documentation!
`vt-py <https://github.com/VirusTotal/vt-py>`_ is the official Python client library
for the `VirusTotal API v3 <https://developers.virustotal.com/v3.0/reference>`_.

This library requires Python 3.5.6+, Python 2.x is not supported. This is because vt-py
This library requires Python 3.6.0+, Python 2.x is not supported. This is because vt-py
makes use of the new `async/await <https://snarky.ca/how-the-heck-does-async-await-work-in-python-3-5/>`_
syntax for implementing asynchronous coroutines.

Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
<h1>Welcome to vt-py’s documentation!<a class="headerlink" href="#welcome-to-vt-py-s-documentation" title="Permalink to this headline"></a></h1>
<p><a class="reference external" href="https://github.com/VirusTotal/vt-py">vt-py</a> is the official Python client library
for the <a class="reference external" href="https://developers.virustotal.com/v3.0/reference">VirusTotal API v3</a>.</p>
<p>This library requires Python 3.5.6+, Python 2.x is not supported. This is because vt-py
<p>This library requires Python 3.6.0+, Python 2.x is not supported. This is because vt-py
makes use of the new <a class="reference external" href="https://snarky.ca/how-the-heck-does-async-await-work-in-python-3-5/">async/await</a>
syntax for implementing asynchronous coroutines.</p>
<p>Not supporting Python 2.x was a difficult decission to make, as we are aware
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Welcome to vt-py's documentation!
`vt-py <https://github.com/VirusTotal/vt-py>`_ is the official Python client library
for the `VirusTotal API v3 <https://developers.virustotal.com/v3.0/reference>`_.

This library requires Python 3.5.6+, Python 2.x is not supported. This is because vt-py
This library requires Python 3.6.0+, Python 2.x is not supported. This is because vt-py
makes use of the new `async/await <https://snarky.ca/how-the-heck-does-async-await-work-in-python-3-5/>`_
syntax for implementing asynchronous coroutines.

Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
with open('README.md', 'r') as fh:
long_description = fh.read()

if sys.version_info < (3, 5, 0):
raise RuntimeError('vt-py requires Python 3.5.0+')
if sys.version_info < (3, 6, 0):
raise RuntimeError('vt-py requires Python 3.6.0+')

install_requires = [
'asyncio',
Expand All @@ -41,7 +41,7 @@
long_description_content_type="text/markdown",
url='https://github.com/VirusTotal/vt-py',
packages=['vt'],
python_requires='>=3.5.0',
python_requires='>=3.6.0',
install_requires=install_requires,
classifiers=[
'Programming Language :: Python :: 3',
Expand Down
4 changes: 2 additions & 2 deletions vt/iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ def __iter__(self):
self._batch_cursor = 0
return self

async def __aiter__(self):
self._items, self._server_cursor = await self._get_batch_async(
def __aiter__(self):
self._items, self._server_cursor = self._get_batch_async(
self._batch_cursor)
self._batch_cursor = 0
return self
Expand Down
2 changes: 1 addition & 1 deletion vt/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.4.0'
__version__ = '0.5.0'

0 comments on commit 41a2e67

Please sign in to comment.