Skip to content

Cannot import deeplay with a version of python greater than 3.12 #153

@H3pha1stos

Description

@H3pha1stos

Hi,

It seems that the 'deeplay' library cannot be imported when using python (3.13 or 3.14).

`
Error trace:Python 3.13.9 (main, Oct 14 2025, 13:52:31) [Clang 17.0.0 (clang-1700.3.19.1)] on darwin

import deeplay as dl

Traceback (most recent call last):

File "", line 1, in

import deeplay as dl

File "/Users/X/Downloads/test/.venv/lib/python3.13/site-packages/deeplay/init.py", line 14, in

from .blocks import *

File "/Users/X/Downloads/test/.venv/lib/python3.13/site-packages/deeplay/blocks/init.py", line 9, in

from .conv import Conv2dBlock

File "/Users/X/Downloads/test/.venv/lib/python3.13/site-packages/deeplay/blocks/conv/init.py", line 3, in

from .conv2d import Conv2dBlock

File "/Users/X/Downloads/test/.venv/lib/python3.13/site-packages/deeplay/blocks/conv/conv2d.py", line 7, in

from deeplay.blocks.base import BaseBlock

File "/Users/X/Downloads/test/.venv/lib/python3.13/site-packages/deeplay/blocks/base.py", line 2, in

from re import A, T

ImportError: cannot import name 'T' from 're' (/opt/homebrew/Cellar/python@3.13/3.13.9_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/re/init.py)
``
Environment:

  • macOS (Apple Silicon)

  • Python: 3.13.9 (also reproduced on 3.14)

  • deeplay: Installed via pip in a fresh virtual environment

Steps to reproduce:

  1. Create a virtual environment using Python 3.13 or 3.14.

  2. pip install deeplay

  3. python -c "import deeplay"

Expected behavior:
Module imports successfully.

Actual behavior:
ImportError occurs due to ‎from re import A, T in ‎deeplay/blocks/base.py. The ‎re.T constant appears to be unavailable in Python ≥ 3.13.

Questions:

  • Is Python 3.13+ currently supported?

  • If not, is there a roadmap or planned fix to remove or replace the ‎re.T import?

Thank you for your answer

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolvedThe issue has been resolved

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions