Skip to content

scraperwiki does not support python version 3.10.7 #113

@orair

Description

@orair

After updating platform to early_release and python to version 3.10.7, the scrappers failed:
Traceback (most recent call last):
File "/app/scraper.py", line 13, in
import scraperwiki
File "/app/.heroku/python/lib/python3.10/site-packages/scraperwiki/init.py", line 12, in
from . import sql
File "/app/.heroku/python/lib/python3.10/site-packages/scraperwiki/sql.py", line 2, in
from collections import Iterable, Mapping, OrderedDict
ImportError: cannot import name 'Iterable' from 'collections' (/app/.heroku/python/lib/python3.10/collections/init.py)

This happens because in python 3.10.7 there is no more Iterable from collections.
For 3,10.7 it may be necessary the folowing code:
try:
from collections.abc import Iterable
except ImportError:
from collections import Iterable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions