Skip to content

ImportError: cannot import name 'number_re' from 'babel.numbers' since 2.18.0 #1250

@m-stefanski

Description

@m-stefanski

Hi everyone,

It seems that 2.18.0 has broken xlsx2html, as described in this issue: Apkawa/xlsx2html#57

    import xlsx2html as x2h
  File "/home/app/.local/lib/python3.10/site-packages/xlsx2html/__init__.py", line 3, in <module>
    from .core import xlsx2html
  File "/home/app/.local/lib/python3.10/site-packages/xlsx2html/core.py", line 12, in <module>
    from xlsx2html.format import format_cell
  File "/home/app/.local/lib/python3.10/site-packages/xlsx2html/format.py", line 12, in <module>
    from babel.numbers import (
ImportError: cannot import name 'number_re' from 'babel.numbers' (/home/app/.local/lib/python3.10/site-packages/babel/numbers.py)

I do not see any explicit number_re deprecation warning in changelog, is this change intentional?

I have also found the breaking change: akx@019ba6c#diff-1f5648fadf1d08f1e2848f5ddc0fb038340f64e5dd566d8213b72b7372e9818eR1204

My undestanding is that non-private objects should not be "privatized" without at least some deprecation warning.
I intend to fix it by renaming it back to historic name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions