File: fix-bytesio-import.patch

package info (click to toggle)
python-enmerkar 0.7.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 280 kB
  • sloc: python: 645; makefile: 167; sh: 9
file content (20 lines) | stat: -rw-r--r-- 534 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Fix BytesIO import
Author: Thomas Goirand <zigo@debian.org>
Bug-Debian: https://bugs.debian.org/1022390
Forwarded: no
Last-Update: 2022-11-01

--- python-enmerkar-0.7.1.orig/tests/test_extract.py
+++ python-enmerkar-0.7.1/tests/test_extract.py
@@ -4,7 +4,10 @@ import unittest
 import pytest
 
 from babel.messages import extract
-from babel._compat import BytesIO
+try:
+    from babel._compat import BytesIO
+except ImportError:
+    from io import BytesIO
 
 import django
 from enmerkar.extract import extract_django