Skip to content

Commit b3c9f6b

Browse files
committed
some fixes and minimal version python 3.8
1 parent c7462e3 commit b3c9f6b

8 files changed

Lines changed: 16 additions & 26 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
33
default_language_version:
4-
python: python3.12
4+
python: python3.13
55

66
repos:
77
- repo: https://github.com/astral-sh/ruff-pre-commit

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Sergio Abad
3+
Copyright (c) 2026 Sergio Abad
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export GID:=$(shell id -g)
44
export PYTHON_TAGS = 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15
55

66
setup:
7-
@pre-commit install
7+
@uv run pre-commit install
88

99
test:
1010
@touch .env
@@ -26,4 +26,4 @@ mypy:
2626
@uv run mypy .
2727

2828
pre-commit:
29-
@pre-commit run -a
29+
@uv run pre-commit run -a

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ API](https://webservices.amazon.com/paapi5/documentation/quick-start/using-sdk.h
55
This module allows interacting with Amazon using the official API in an easier way.
66

77
[![PyPI](https://img.shields.io/pypi/v/python-amazon-paapi?color=%231182C2&label=PyPI)](https://pypi.org/project/python-amazon-paapi/)
8-
[![Python](https://img.shields.io/badge/Python->3.7-%23FFD140)](https://www.python.org/)
8+
[![Python](https://img.shields.io/badge/Python->3.8-%23FFD140)](https://www.python.org/)
99
[![License](https://img.shields.io/badge/License-MIT-%23e83633)](https://github.com/sergioteula/python-amazon-paapi/blob/master/LICENSE)
1010
[![Amazon API](https://img.shields.io/badge/Amazon%20API-5.0-%23FD9B15)](https://webservices.amazon.com/paapi5/documentation/)
1111
[![PyPI - Downloads](https://img.shields.io/pypi/dm/python-amazon-paapi?label=Installs)](https://pypi.org/project/python-amazon-paapi/)
@@ -113,6 +113,6 @@ before merge.
113113

114114
## License
115115

116-
Copyright © 2021 Sergio Abad. See
116+
Copyright © 2026 Sergio Abad. See
117117
[license](https://github.com/sergioteula/python-amazon-paapi/blob/master/LICENSE) for
118118
details.

amazon_paapi/models/regions.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@
22

33
from __future__ import annotations
44

5-
import sys
6-
7-
if sys.version_info >= (3, 8):
8-
from typing import Literal
9-
else:
10-
from typing_extensions import Literal
5+
from typing import Literal
116

127
CountryCode = Literal[
138
"AU",

amazon_paapi/sdk/api_client.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,13 @@ def __init__(self,
103103
self.region = region
104104

105105
def __del__(self):
106-
self.pool.close()
107-
self.pool.join()
106+
try:
107+
self.pool.close()
108+
self.pool.join()
109+
except (OSError, TypeError):
110+
# Ignore errors during interpreter shutdown when file descriptors
111+
# or other resources may already be deallocated
112+
pass
108113

109114
@property
110115
def user_agent(self):

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "python-amazon-paapi"
33
version = "5.1.0"
44
description = "Amazon Product Advertising API 5.0 wrapper for Python"
55
readme = "README.md"
6-
requires-python = ">=3.7"
6+
requires-python = ">=3.8"
77
license = "MIT"
88
authors = [{ name = "Sergio Abad", email = "sergio.abad@bytelix.com" }]
99
classifiers = [
@@ -39,7 +39,7 @@ dev = [
3939
]
4040

4141
[tool.ruff]
42-
target-version = "py37"
42+
target-version = "py38"
4343
cache-dir = ".cache/ruff"
4444

4545
[tool.ruff.lint]

sonar-project.properties

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)