From ef927afeddfc6a983f7122d50ed4782dea5a8fe0 Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Wed, 11 Dec 2024 22:49:36 -0800 Subject: [PATCH] Use alpine 3.21 (CMake 3.21), bump tests (#56) Modify code to work with the latest tests. The only change is to remove length limits of section, property and value. --- .github/workflows/runtime.yml | 2 +- editorconfig/ini.py | 9 --------- tests | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/runtime.yml b/.github/workflows/runtime.yml index cd99c23..c5d1495 100644 --- a/.github/workflows/runtime.yml +++ b/.github/workflows/runtime.yml @@ -12,7 +12,7 @@ jobs: test: name: Runtime runs-on: ubuntu-latest - container: python:3.13-alpine3.20 + container: python:3.13-alpine3.21 steps: - name: Install Alpine Dependencies diff --git a/editorconfig/ini.py b/editorconfig/ini.py index c603d79..92ffb13 100644 --- a/editorconfig/ini.py +++ b/editorconfig/ini.py @@ -27,10 +27,6 @@ __all__ = ["ParsingError", "EditorConfigParser"] -MAX_SECTION_LENGTH = 4096 -MAX_PROPERTY_LENGTH= 50 -MAX_VALUE_LENGTH = 255 - class EditorConfigParser(object): @@ -138,8 +134,6 @@ def _read(self, fp, fpname): mo = self.SECTCRE.match(line) if mo: sectname = mo.group('header') - if len(sectname) > MAX_SECTION_LENGTH: - continue in_section = True matching_section = self.matches_filename(fpname, sectname) # So sections can't start with a continuation line @@ -160,9 +154,6 @@ def _read(self, fp, fpname): if optval == '""': optval = '' optname = self.optionxform(optname.rstrip()) - if (len(optname) > MAX_PROPERTY_LENGTH or - len(optval) > MAX_VALUE_LENGTH): - continue if not in_section and optname == 'root': self.root_file = (optval.lower() == 'true') if matching_section: diff --git a/tests b/tests index e407c15..d91029b 160000 --- a/tests +++ b/tests @@ -1 +1 @@ -Subproject commit e407c1592df0f8e91664835324dea85146f20189 +Subproject commit d91029bdf1e3e0307714afe0d2cde7ba6fd208ab