mongodb / signal-processing-algorithms

Apache License 2.0
39 stars 16 forks source link

DAG-2764 Updated dependencies to support M1 Mac and Pydantic v2. #24

Closed ahartschen closed 11 months ago

ahartschen commented 11 months ago

In order to move signal-processing-service to use Pydantic V2 we needed to make some upgrades in this package. I also had to make a few changes for M1 Mac compatibility. The new dependencies required me to change a few things in code to make pytest happy.

Here are the relevant details showing the incompatibility when running poetry install:

  1. Adding new Fast API version (needed to update pydantic v2)

    Because no versions of fastapi match >0.100.1,<0.101.0
    and fastapi (0.100.1) depends on typing-extensions (>=4.5.0), fastapi (>=0.100.1,<0.101.0) requires typing-extensions (>=4.5.0).
    So, because signal-processing-service depends on both typing-extensions (^3.7) and fastapi (^0.100.1), version solving failed.
  2. Upgrading typing-extensions as instructed in the previous error.

    Because signal-processing-service depends on signal-processing-algorithms (2.0.1) which depends on typing-extensions (>=3.7.4,<4.0.0), typing-extensions is required.
    So, because signal-processing-service depends on typing-extensions (^4.5), version solving failed.
ahartschen commented 11 months ago

To prove compatibility with signal-processing-service I modified the dependency on signal-processing-algorithms to use my local version and successfully installed the project.

➜  signal-processing-service git:(DAG-2764) ✗ poetry lock --no-update && poetry install
Resolving dependencies... (3.2s)

Writing lock file
Installing dependencies from lock file

Package operations: 0 installs, 7 updates, 0 removals

  - Updating typing-extensions (3.10.0.2 -> 4.7.1)
  - Updating pydantic-core (2.1.2 -> 2.4.0)
  - Updating pydantic (1.8.1 -> 2.1.1)
  - Updating pyyaml (5.4.1 -> 6.0.1)
  - Updating starlette (0.13.4 -> 0.27.0)
  - Updating fastapi (0.58.1 -> 0.100.1)
  - Updating signal-processing-algorithms (2.0.1 -> 2.1.0 /Users/austin.hartschen/mongodb/signal-processing-algorithms)