Merge branch 'feature/drop_py2_support' into 'master'
Drop support for unsupported Python versions Closes IDF-1676 See merge request espressif/esp-idf!13622
This commit is contained in:
@@ -234,10 +234,6 @@ def _erase_ota_partition(target, ota_id):
|
||||
|
||||
|
||||
def main():
|
||||
if sys.version_info[0] < 3:
|
||||
print('WARNING: Support for Python 2 is deprecated and will be removed in future versions.', file=sys.stderr)
|
||||
elif sys.version_info[0] == 3 and sys.version_info[1] < 6:
|
||||
print('WARNING: Python 3 versions older than 3.6 are not supported.', file=sys.stderr)
|
||||
global quiet
|
||||
|
||||
parser = argparse.ArgumentParser('ESP-IDF OTA Partitions Tool')
|
||||
|
||||
@@ -76,24 +76,24 @@ class FuseTable(list):
|
||||
|
||||
# fix up missing bit_start
|
||||
last_efuse_block = None
|
||||
for e in res:
|
||||
if last_efuse_block != e.efuse_block:
|
||||
for i in res:
|
||||
if last_efuse_block != i.efuse_block:
|
||||
last_end = 0
|
||||
if e.bit_start is None:
|
||||
e.bit_start = last_end
|
||||
last_end = e.bit_start + e.bit_count
|
||||
last_efuse_block = e.efuse_block
|
||||
if i.bit_start is None:
|
||||
i.bit_start = last_end
|
||||
last_end = i.bit_start + i.bit_count
|
||||
last_efuse_block = i.efuse_block
|
||||
|
||||
res.verify_duplicate_name()
|
||||
|
||||
# fix up missing field_name
|
||||
last_field = None
|
||||
for e in res:
|
||||
if e.field_name == '' and last_field is None:
|
||||
raise InputError('Error at line %d: %s missing field name' % (line_no + 1, e))
|
||||
elif e.field_name == '' and last_field is not None:
|
||||
e.field_name = last_field.field_name
|
||||
last_field = e
|
||||
for i in res:
|
||||
if i.field_name == '' and last_field is None:
|
||||
raise InputError('Error at line %d: %s missing field name' % (line_no + 1, i))
|
||||
elif i.field_name == '' and last_field is not None:
|
||||
i.field_name = last_field.field_name
|
||||
last_field = i
|
||||
|
||||
# fill group
|
||||
names = [p.field_name for p in res]
|
||||
@@ -479,10 +479,6 @@ def create_output_files(name, output_table, debug):
|
||||
|
||||
|
||||
def main():
|
||||
if sys.version_info[0] < 3:
|
||||
print('WARNING: Support for Python 2 is deprecated and will be removed in future versions.', file=sys.stderr)
|
||||
elif sys.version_info[0] == 3 and sys.version_info[1] < 6:
|
||||
print('WARNING: Python 3 versions older than 3.6 are not supported.', file=sys.stderr)
|
||||
global quiet
|
||||
global max_blk_len
|
||||
global idf_target
|
||||
|
||||
@@ -23,7 +23,6 @@ import io
|
||||
import math
|
||||
import os
|
||||
import struct
|
||||
import sys
|
||||
|
||||
try:
|
||||
import typing
|
||||
@@ -510,10 +509,6 @@ class CustomHelpFormatter(argparse.HelpFormatter):
|
||||
|
||||
|
||||
def main(): # type: () -> None
|
||||
if sys.version_info[0] < 3:
|
||||
print('WARNING: Support for Python 2 is deprecated and will be removed in future versions.', file=sys.stderr)
|
||||
elif sys.version_info[0] == 3 and sys.version_info[1] < 6:
|
||||
print('WARNING: Python 3 versions older than 3.6 are not supported.', file=sys.stderr)
|
||||
parser = argparse.ArgumentParser(description='SPIFFS Image Generator',
|
||||
formatter_class=CustomHelpFormatter)
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
from optparse import OptionParser
|
||||
|
||||
BASE_ADDR = 0x50000000
|
||||
@@ -44,10 +43,6 @@ def gen_ld_h_from_sym_riscv(f_sym, f_ld, f_h):
|
||||
|
||||
|
||||
def main():
|
||||
if sys.version_info[0] < 3:
|
||||
print('WARNING: Support for Python 2 is deprecated and will be removed in future versions.', file=sys.stderr)
|
||||
elif sys.version_info[0] == 3 and sys.version_info[1] < 6:
|
||||
print('WARNING: Python 3 versions older than 3.6 are not supported.', file=sys.stderr)
|
||||
description = ('This application generates .h and .ld files for symbols defined in input file. '
|
||||
'The input symbols file can be generated using nm utility like this: '
|
||||
'esp32-ulp-nm -g -f posix <elf_file> > <symbols_file>')
|
||||
|
||||
@@ -55,7 +55,7 @@ import sys
|
||||
|
||||
# Check if loaded into GDB
|
||||
try:
|
||||
assert gdb.__name__ == 'gdb'
|
||||
assert gdb.__name__ == 'gdb' # type: ignore
|
||||
WITH_GDB = True
|
||||
except NameError:
|
||||
WITH_GDB = False
|
||||
@@ -329,10 +329,6 @@ def parse_and_dump(filename, disassemble=WITH_GDB):
|
||||
|
||||
|
||||
def main():
|
||||
if sys.version_info[0] < 3:
|
||||
print('WARNING: Support for Python 2 is deprecated and will be removed in future versions.', file=sys.stderr)
|
||||
elif sys.version_info[0] == 3 and sys.version_info[1] < 6:
|
||||
print('WARNING: Python 3 versions older than 3.6 are not supported.', file=sys.stderr)
|
||||
if len(sys.argv) < 2:
|
||||
sys.stderr.write('Usage: %s <dump_file>\n')
|
||||
raise SystemExit(1)
|
||||
|
||||
Reference in New Issue
Block a user