Skip to content

Commit

Permalink
#391 - Fix import issue on python >= 3.10 (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-taubman authored Apr 12, 2022
1 parent 505b7e7 commit 1693036
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
8 changes: 0 additions & 8 deletions .github/codecov.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pr-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ '3.7', '3.8', '3.9' ]
python-version: [ '3.7', '3.8', '3.9', '3.10' ]
# Can't use ubuntu-latest until Python 3.4 has Ubuntu 20.X install options in setup-python@v2
os: ['ubuntu-18.04']
name: PyTests OS ${{ matrix.os }} - Python ${{ matrix.python-version }}
Expand Down
8 changes: 6 additions & 2 deletions brewtils/resolvers/manager.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# -*- coding: utf-8 -*-

import collections
import logging
from typing import Any, Dict, List, Mapping

try:
from collections import Mapping as CollectionsMapping
except ImportError:
from collections.abc import Mapping as CollectionsMapping

from brewtils.models import Parameter, Resolvable
from brewtils.resolvers.bytes import BytesResolver
from brewtils.resolvers.chunks import ChunksResolver
Expand Down Expand Up @@ -61,7 +65,7 @@ def resolve(self, values, definitions=None, upload=True):
break

# Check to see if this is a nested parameter
if isinstance(value, collections.Mapping) and definition.parameters:
if isinstance(value, CollectionsMapping) and definition.parameters:
resolved = self.resolve(
value, definitions=definition.parameters, upload=upload
)
Expand Down
6 changes: 6 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ ignore:
- "test/*.py"
- "brewtils/test/*.py"

github_checks:
annotations: false

coverage:
status:
patch: false

0 comments on commit 1693036

Please sign in to comment.