Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API V2 down for good? #26

Closed
peeter123 opened this issue Nov 19, 2021 · 6 comments
Closed

API V2 down for good? #26

peeter123 opened this issue Nov 19, 2021 · 6 comments
Milestone

Comments

@peeter123
Copy link
Owner

peeter123 commented Nov 19, 2021

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 peeter123 added this to the v1.0 milestone Nov 19, 2021
@subx99
Copy link

subx99 commented Jul 17, 2022

Any plans to progress this?

@eeintech
Copy link

@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.

@eeintech
Copy link

eeintech commented Aug 4, 2022

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

@peeter123
Copy link
Owner Author

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

@peeter123
Copy link
Owner Author

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

@eeintech
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants