frictionlessdata / datapackage-py

A Python library for working with Data Packages.
https://frictionlessdata.io
MIT License
189 stars 44 forks source link

Require tableschema>=1.12.1 #253

Closed chris48s closed 4 years ago

chris48s commented 4 years ago

Overview

Hi. I tried to upgrade to datapackage 1.10.1 but found it is not compatible with Tableschema 1.12.0.

Steps to reproduce:

$ pip install datapackage==1.10.1
$ pip install tableschema==1.12.0
$ python3
>>> import datapackage
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/chris/.virtualenvs/datapackage-repro-gwcs1gD0/lib/python3.6/site-packages/datapackage/__init__.py", line 13, in <module>
    from .package import Package
  File "/home/chris/.virtualenvs/datapackage-repro-gwcs1gD0/lib/python3.6/site-packages/datapackage/package.py", line 20, in <module>
    from .resource import Resource
  File "/home/chris/.virtualenvs/datapackage-repro-gwcs1gD0/lib/python3.6/site-packages/datapackage/resource.py", line 17, in <module>
    from .profile import Profile
  File "/home/chris/.virtualenvs/datapackage-repro-gwcs1gD0/lib/python3.6/site-packages/datapackage/profile.py", line 13, in <module>
    import datapackage.registry
  File "/home/chris/.virtualenvs/datapackage-repro-gwcs1gD0/lib/python3.6/site-packages/datapackage/registry.py", line 11, in <module>
    from .exceptions import RegistryError
  File "/home/chris/.virtualenvs/datapackage-repro-gwcs1gD0/lib/python3.6/site-packages/datapackage/exceptions.py", line 11, in <module>
    DataPackageException = tableschema.DataPackageException
AttributeError: module 'tableschema' has no attribute 'DataPackageException'

This PR bumps the version requirement in setup.py to ensure a compatible version is installed, but maybe there is another issue to be raised on the tableschema repo because a non-backwards-compatible change was introduced in a patch release?

Cheers


Please preserve this line to notify @roll (lead of this repository)

roll commented 4 years ago

@chris48s The tableschema@1.2 is very out-dated. Just curious why you don't use the latest one?

chris48s commented 4 years ago

Apologies for the confusion. I meant 1.12.0 and 1.12.1 not 1.2.0 and 1.2.1. I've updated the PR with the correct version numbers.

roll commented 4 years ago

@chris48s Thanks! It's a great catch