From f53a89070fa25d9065c01db6ceab9d869ba6cccd Mon Sep 17 00:00:00 2001 From: Dani Pozo Date: Tue, 31 Oct 2023 15:15:43 +0100 Subject: [PATCH 1/2] Make Config inherit from collections.abc.Mapping --- pyconfigparser.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pyconfigparser.py b/pyconfigparser.py index 20958ac..eb83556 100644 --- a/pyconfigparser.py +++ b/pyconfigparser.py @@ -5,6 +5,7 @@ import yaml import os import re +from collections.abc import Mapping __all__ = [ "ConfigError", @@ -106,7 +107,7 @@ def _extract_env_variable_key(variable): } -class Config: +class Config(Mapping): def __getitem__(self, item): return self.__dict__[item] @@ -117,12 +118,6 @@ def __iter__(self): def __len__(self): return len(self.__dict__) - def keys(self): - return self.__dict__.keys() - - def values(self): - return self.__dict__.values() - class ConfigParser: def __init__(self): From c194b99a3f9420b32c25cd88f76997863914f376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Souza?= Date: Wed, 29 Nov 2023 13:51:53 -0300 Subject: [PATCH 2/2] fix: change python version in pipeline tests --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3d8a771..fa1dcab 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3