Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import os
import re
import subprocess
import tomllib
from collections import Counter, defaultdict
from operator import itemgetter
from pathlib import Path

import click
import requests
import tomli
from ocdsextensionregistry import ExtensionRegistry

extensions_url = "https://raw.githubusercontent.com/open-contracting/extension_registry/main/extensions.csv"
Expand Down Expand Up @@ -286,7 +286,7 @@ def count_dependencies(directory):
if pyproject.is_file():
counter.update(
pattern.split(req)[0]
for req in tomli.loads(pyproject.read_text()).get("project", {}).get("dependencies", [])
for req in tomllib.loads(pyproject.read_text()).get("project", {}).get("dependencies", [])
)

for requirement, count in reversed(counter.most_common()):
Expand Down
1 change: 0 additions & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
click
ocdsextensionregistry
requests
tomli
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ requests-cache==1.2.1
# via ocdsextensionregistry
six==1.16.0
# via url-normalize
tomli==2.0.2
# via -r requirements.in
url-normalize==1.4.3
# via requests-cache
urllib3==2.8.0
Expand Down
4 changes: 2 additions & 2 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ rpds-py==2026.6.3
# via
# jsonschema
# referencing
setuptools==84.2.1
# via -r requirements_dev.in
six==1.16.0
# via
# -r requirements.txt
# rfc3339-validator
# url-normalize
tomli==2.0.2
# via -r requirements.txt
url-normalize==1.4.3
# via
# -r requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion tests/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -eu

pip install ruff 'jscc>=0.5.0' json-merge-patch jsonref jsonschema ocdsextensionregistry ocdskit packaging pytest \
requests rfc3339-validator rfc3986-validator setuptools tomli # Python 3.10 or less
requests rfc3339-validator rfc3986-validator setuptools

curl -s -S --retry 3 -o /tmp/test_csv.py "$BASEDIR"/tests/test_csv.py
curl -s -S --retry 3 -o /tmp/test_json.py "$BASEDIR"/tests/test_json.py
Expand Down
5 changes: 0 additions & 5 deletions tests/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,6 @@ if [ -d docs ]; then
"'copyright'"
)
fi
if [ ! -f .python-version ] || grep 3.10 .python-version > /dev/null; then
IGNORE+=(
PYI024 # collections-named-tuple (Python 3.11+)
)
fi
if [ -f MANIFEST.in ]; then
PER_FILE_IGNORES+=(
tests/*:ARG001 # unused-function-argument (fixtures)
Expand Down
13 changes: 2 additions & 11 deletions tests/test_requirements.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import ast
import glob
import os
import tomllib
from collections import defaultdict
from importlib.metadata import distribution
from pathlib import Path
Expand All @@ -10,15 +11,6 @@
from packaging.requirements import Requirement
from setuptools import find_packages

try:
import tomllib

TOMLLIB_STDLIB = True
except ImportError:
import tomli as tomllib # Python 3.10 or less

TOMLLIB_STDLIB = False

path = os.getcwd()

# https://github.com/PyCQA/isort/blob/develop/isort/stdlibs/py39.py
Expand Down Expand Up @@ -209,6 +201,7 @@
"tkinter",
"token",
"tokenize",
"tomllib",
"trace",
"traceback",
"tracemalloc",
Expand Down Expand Up @@ -239,8 +232,6 @@
"zlib",
"zoneinfo",
}
if TOMLLIB_STDLIB:
stdlib.add("tomllib")


IGNORE = [
Expand Down
Loading