python-barcode icon indicating copy to clipboard operation
python-barcode copied to clipboard

Support for Python 3.14 ?

Open N07070 opened this issue 7 months ago • 3 comments

Hello,

While using a package that makes use of this package, I encounter the following error :

Error: While importing 'main', an ImportError was raised:

Traceback (most recent call last):
  File "/home/x/Documents/Code/littleprynter/lib/python3.13/site-packages/flask/cli.py", line 214, in locate_app
    __import__(module_name)
    ~~~~~~~~~~^^^^^^^^^^^^^
  File "/home/x/Documents/Code/littleprynter/src/main.py", line 13, in <module>
    from printer import Printer             # The wrapper for the printer class
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/x/Documents/Code/littleprynter/src/printer.py", line 3, in <module>
    from escpos.printer import Usb, USBNotFoundError
  File "/home/x/Documents/Code/littleprynter/lib/python3.13/site-packages/escpos/printer.py", line 16, in <module>
    from .escpos import Escpos
  File "/home/x/Documents/Code/littleprynter/lib/python3.13/site-packages/escpos/escpos.py", line 10, in <module>
    from barcode.writer import ImageWriter
  File "/home/x/Documents/Code/littleprynter/lib/python3.13/site-packages/barcode/writer.py", line 4, in <module>
    from typing.io import BinaryIO
ModuleNotFoundError: No module named 'typing.io'; 'typing' is not a package

I then tried with Python 3.12 and it's running perfectly well.

Are there plans to support versions of Python >3.12 yet ?

Thank you for your work ! I would be happy to contributes some changes if there are plans to do so, but I would prefer working with someone else, as I'm not sure of how the evolutions should be made.

N07070 avatar Jun 10 '25 22:06 N07070

This was fixed in 4661239d5ce326bebcc0861bb877cddbda69e0bf

WhyNotHugo avatar Jun 11 '25 01:06 WhyNotHugo

Fix should be included in 0.14.0, from 2022-05-17.

WhyNotHugo avatar Jun 11 '25 01:06 WhyNotHugo

Indeed, thank you !

Maybe the README can be updated to reflect that ?

N07070 avatar Jun 11 '25 11:06 N07070