Skip to content

Commit da74b38

Browse files
authored
Merge pull request #258 from ligangty/release
merger from main branch
2 parents ea33f26 + d9bdb69 commit da74b38

File tree

12 files changed

+40
-34
lines changed

12 files changed

+40
-34
lines changed

.github/workflows/linters.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
python-version: [ "3.8" ]
18+
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
1919

2020
steps:
2121
- uses: actions/checkout@v3
@@ -46,7 +46,7 @@ jobs:
4646

4747
strategy:
4848
matrix:
49-
python-version: [ "3.8" ]
49+
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
5050

5151
steps:
5252
- uses: actions/checkout@v3

.github/workflows/unittests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.8", "3.9"]
19+
python-version: ["3.9", "3.10", "3.11", "3.12"]
2020

2121
steps:
2222
- uses: actions/checkout@v3

.packit.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ jobs:
66
trigger: pull_request
77
metadata:
88
targets:
9-
- epel-7-x86_64
109
- epel-8-x86_64
11-
- fedora-all
10+
- epel-9-x86_64

.pylintrc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ disable=I,
6464
useless-import-alias, # nice to have
6565
useless-super-delegation, # nice to have
6666
wrong-import-order,
67-
wrong-import-position
67+
wrong-import-position,
68+
use-implicit-booleaness-not-comparison-to-zero,
69+
use-implicit-booleaness-not-comparison-to-string,
70+
unspecified-encoding,
71+
broad-exception-raised,
72+
consider-using-f-string
6873

6974
[REPORTS]
7075

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ future. And Ronda service will be hosted in AWS S3.
77

88
## Prerequisites
99

10-
* python 3.5+
10+
* python 3.9+
1111
* git
1212

1313
### [Optional] Install AWS CLI tool

charon/pkgs/indexing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,13 @@ def __init__(self, title: str, header: str, items: Set[str]):
5555
self.items = items
5656

5757
def generate_index_file_content(self, package_type: str) -> str:
58+
template = None
5859
if package_type == PACKAGE_TYPE_MAVEN:
5960
template = Template(MAVEN_INDEX_TEMPLATE)
6061
elif package_type == PACKAGE_TYPE_NPM:
6162
template = Template(NPM_INDEX_TEMPLATE)
62-
return template.render(index=self)
63+
if template:
64+
return template.render(index=self)
6365

6466

6567
def generate_indexes(

charon/pkgs/npm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,7 @@ def _scan_metadata_paths_from_archive(
485485
path=path, target_dir=tmp_root, is_for_upload=True,
486486
pkg_root=pkg_root, registry=registry
487487
)
488+
package = None
488489
if len(valid_paths) > 1:
489490
version = _scan_for_version(valid_paths[1])
490491
package = NPMPackageMetadata(version, True)

charon/utils/yaml.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import jsonschema
2121
import yaml
22-
from pkg_resources import resource_stream
22+
import importlib
2323

2424
logger = logging.getLogger(__name__)
2525

@@ -55,7 +55,8 @@ def load_schema(package, schema):
5555
"""
5656
# Read schema from file
5757
try:
58-
resource = resource_stream(package, schema)
58+
resource = importlib.resources.files(package).joinpath(schema).open("rb")
59+
# resource = resource_stream(package, schema)
5960
schema = codecs.getreader('utf-8')(resource)
6061
except ImportError:
6162
logger.error('Unable to find package %s', package)

requirements.txt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
Jinja2>=3.1.4
2-
boto3>=1.28.46
3-
botocore>=1.31.46
4-
click>=8.1.7
5-
requests>=2.31.0
6-
PyYAML>=6.0.1
1+
Jinja2>=3.1.3
2+
boto3>=1.18.35
3+
botocore>=1.21.35
4+
click>=8.1.3
5+
requests>=2.25.0
6+
PyYAML>=5.4.1
77
defusedxml>=0.7.1
88
subresource-integrity>=0.2
9-
jsonschema>=4.19.0
10-
urllib3>=1.26.18
9+
jsonschema>=4.9.1
10+
urllib3>=1.25.10
1111
semantic-version>=2.10.0
12-
setuptools>=70.0.0

setup.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,16 @@
4747
"console_scripts": ["charon = charon.cmd:cli"],
4848
},
4949
install_requires=[
50-
"Jinja2>=3.1.4",
51-
"boto3>=1.28.46",
52-
"botocore>=1.31.46",
53-
"click>=8.1.7",
54-
"requests>=2.31.0",
55-
"PyYAML>=6.0.1",
50+
"Jinja2>=3.1.3",
51+
"boto3>=1.18.35",
52+
"botocore>=1.21.35",
53+
"click>=8.1.3",
54+
"requests>=2.25.0",
55+
"PyYAML>=5.4.1",
5656
"defusedxml>=0.7.1",
5757
"subresource-integrity>=0.2",
58-
"jsonschema>=4.19.0",
59-
"urllib3>=1.26.18",
60-
"semantic-version>=2.10.0",
61-
"setuptools>=70.0.0",
58+
"jsonschema>=4.9.1",
59+
"urllib3>=1.25.10",
60+
"semantic-version>=2.10.0"
6261
],
6362
)

0 commit comments

Comments
 (0)