Skip to content

Commit d854ac3

Browse files
committed
drop no_unicode parameter
This was removed in MicroPython v1.19.
1 parent 8952dfe commit d854ac3

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

src/mpy_cross_v6/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def mpy_cross_compile(
3737
file_contents: str,
3838
optimization_level: Optional[int] = None,
3939
small_number_bits: Optional[int] = None,
40-
no_unicode: bool = False,
4140
arch: Optional[Arch] = None,
4241
emit: Optional[Emitter] = None,
4342
heap_size: Optional[int] = None,
@@ -51,8 +50,6 @@ def mpy_cross_compile(
5150
file_contents: The MicroPython source code to compile.
5251
optimization_level: The optimization level 0 to 3.
5352
small_number_bits: The number of bits in a MP_SMALL_INT.
54-
no_unicode: Flag needed if the MicroPython target firmware was compiled
55-
with ``MICROPY_PY_BUILTINS_STR_UNICODE (0)``.
5653
arch: The target architecture.
5754
emit: The type of bytecodes to emit.
5855
heap_size: The heap size.
@@ -94,9 +91,6 @@ def mpy_cross_compile(
9491
if small_number_bits is not None:
9592
args.append(f"-msmall-int-bits={small_number_bits}")
9693

97-
if no_unicode:
98-
args.append("-mno-unicode")
99-
10094
if arch is not None:
10195
args.append(f"-arch={arch.value}")
10296

tests/test_mpy_cross.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,12 @@
44
from mpy_cross_v6 import mpy_cross_compile, mpy_cross_version
55

66

7-
class FeatureFlags(IntFlag):
8-
UNICODE = 1 << 1
9-
10-
117
def test_compile_no_opts():
128
p, mpy = mpy_cross_compile("test.py", "")
139
p.check_returncode()
1410

1511
magic, version, flags, small_int_bits = struct.unpack_from("BBBB", mpy)
1612

17-
assert chr(magic) == "M"
18-
assert version == 6
19-
assert flags == FeatureFlags.UNICODE
20-
assert small_int_bits == 31
21-
22-
23-
def test_compile_opt_no_unicode():
24-
p, mpy = mpy_cross_compile("test.py", "", no_unicode=True)
25-
p.check_returncode()
26-
27-
magic, version, flags, small_int_bits = struct.unpack_from("BBBB", mpy)
28-
2913
assert chr(magic) == "M"
3014
assert version == 6
3115
assert flags == 0
@@ -40,7 +24,7 @@ def test_compile_opt_small_int_bits():
4024

4125
assert chr(magic) == "M"
4226
assert version == 6
43-
assert flags == FeatureFlags.UNICODE
27+
assert flags == 0
4428
assert small_int_bits == 63
4529

4630

0 commit comments

Comments
 (0)