peeter123/digikey-api

API V2 down for good?

peeter123 opened this issue · 6 comments

https://api.digikey.com/services/partsearch/v2 returns an error:

{
   "fault":{
      "faultstring":"Unable to identify proxy for host: secure and url: \/services\/partsearch\/v2",
      "detail":{
         "errorcode":"messaging.adaptors.http.flow.ApplicationNotFound"
      }
   }
}

I think we can work towards a V1.0 release which removes the v2 API. This also enables PR #15 to be moved forward.

Any plans to progress this?

@peeter123 The v2 code is causing an import error with Python 3.10 as the schematics library it uses still calls the Iterable from the Python collections package, which was deprecated in 3.10:

 File "/usr/lib/python3.10/site-packages/digikey/__init__.py", line 2, in <module>
    from digikey.v2.api import (search, part)
  File "/usr/lib/python3.10/site-packages/digikey/v2/api.py", line 7, in <module>
    from digikey.v2 import models
  File "/usr/lib/python3.10/site-packages/digikey/v2/models.py", line 8, in <module>
    from schematics.exceptions import ConversionError, DataError, ValidationError
  File "/usr/lib/python3.10/site-packages/schematics/__init__.py", line 6, in <module>
    from . import deprecated
  File "/usr/lib/python3.10/site-packages/schematics/deprecated.py", line 8, in <module>
    from .types.serializable import Serializable
  File "/usr/lib/python3.10/site-packages/schematics/types/__init__.py", line 2, in <module>
    from .base import *
  File "/usr/lib/python3.10/site-packages/schematics/types/base.py", line 19, in <module>
    from collections import Iterable, OrderedDict
ImportError: cannot import name 'Iterable' from 'collections' (/usr/lib/python3.10/collections/__init__.py)

Reference: schematics/schematics#628

So I also vote to remove the v2 API, it should fix this issue.

@peeter123 What do you think? Can V2 be scrapped and can we get a 0.6.2 release without it?

Sound good, I prefer to do a major release as this is kind of a breaking change. Lets call it 1.0.0.

@eeintech I have updated to 1.0.0 on PyPi, would you be so kind to test? Thanks!

@peeter123 It looks great on my side! Thanks! 🥳