digikey-api icon indicating copy to clipboard operation
digikey-api copied to clipboard

API V2 down for good?

Open peeter123 opened this issue 4 years ago • 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.

peeter123 avatar Nov 19 '21 21:11 peeter123

Any plans to progress this?

subx99 avatar Jul 17 '22 00:07 subx99

@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: https://github.com/schematics/schematics/issues/628

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

eeintech avatar Jul 27 '22 20:07 eeintech

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

eeintech avatar Aug 04 '22 15:08 eeintech

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

peeter123 avatar Aug 13 '22 08:08 peeter123

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

peeter123 avatar Aug 13 '22 08:08 peeter123

@peeter123 It looks great on my side! Thanks! :partying_face:

eeintech avatar Aug 15 '22 14:08 eeintech