Type annotation error with Python 3.8 #9

Closed
opened 2024-04-08 15:32:31 +02:00 by AnesBenmerzoug · 1 comment
AnesBenmerzoug commented 2024-04-08 15:32:31 +02:00 (Migrated from github.com)

With the recent release of version 0.8.0 of mkdocs-alias, we started having errors when building our documentation using Python 3.8 (See these CI logs).

It seems that the package's code started using list for annotating lists of objects instead of using List from the typing package and that is not supported in Python 3.8.

There are 2 possible solutions:

  • Add from __future__ import annotations at the top of the plugin module.
  • Use List from the typing package instead of list until Python 3.8 is no longer supported.
With the recent release of version 0.8.0 of mkdocs-alias, we started having errors when building our documentation using Python 3.8 (See [these CI logs](https://github.com/aai-institute/pyDVL/actions/runs/8598810209/job/23560394768)). It seems that the package's code started using `list` for annotating lists of objects instead of using `List` from the typing package and that is not supported in Python 3.8. There are 2 possible solutions: - Add `from __future__ import annotations` at the top of the plugin module. - Use `List` from the typing package instead of `list` until Python 3.8 is no longer supported.
EddyLuten commented 2024-04-08 16:53:02 +02:00 (Migrated from github.com)

Hi Anes, thanks for the bug fix! I've merged it, and it will go out in version 0.8.1. I agree with your comment on the PR. I will implement CI checks for all the Python versions that MkDocs still supports.

Thanks again!

Hi Anes, thanks for the bug fix! I've merged it, and it will go out in version 0.8.1. I agree with your comment on the PR. I will implement CI checks for all the Python versions that MkDocs still supports. Thanks again!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
luten/mkdocs-alias-plugin#9
No description provided.