Error importing plugin "classes.contrib.mypy.classes_plugin" cannot import name 'union_items' from 'mypy.types'

Đang mở
#481 5 bình luận 4 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
tooling

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện import Python 3.11 từ issue và kiểm tra classes/contrib/mypy/typeops/call_signatures.py, nơi traceback cho thấy import mypy.types bị lỗi. Kiểm tra khả năng tương thích của mypy đã cài đặt và xác minh rằng việc import classes.contrib.mypy.classes_plugin hoàn tất mà không có lỗi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

Bug report

What's wrong

I am hitting the error on a clean installation with python3.11 on MacOS.

Python 3.11.1 (main, Dec 12 2022, 14:17:59) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import classes.contrib.mypy.classes_plugin
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/uname/PycharmProjects/sandbox/.venv/lib/python3.11/site-packages/classes/contrib/mypy/classes_plugin.py", line 33, in <module>
    from classes.contrib.mypy.features import associated_type, supports, typeclass
  File "/Users/uname/PycharmProjects/sandbox/.venv/lib/python3.11/site-packages/classes/contrib/mypy/features/typeclass.py", line 17, in <module>
    from classes.contrib.mypy.typeops import (
  File "/Users/uname/PycharmProjects/sandbox/.venv/lib/python3.11/site-packages/classes/contrib/mypy/typeops/call_signatures.py", line 9, in <module>
    from mypy.types import TypeVarType, union_items
ImportError: cannot import name 'union_items' from 'mypy.types' (/Users/uname/PycharmProjects/sandbox/.venv/lib/python3.11/site-packages/mypy/types.cpython-311-darwin.so)

How is that should be

No errors

System information

  • python version:
  • classes version:
  • mypy version:
Ngôn ngữ chính
Python
Star
730
Fork
30
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của dry-python/classes

Tất cả issue của dry-python/classes

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.