Skip to content

Commit

Permalink
Merge branch 'procrastinate-org:main' into issue-871
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyheath authored Dec 14, 2023
2 parents 6b9c374 + 31a7d09 commit 8dc37dc
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Install poetry
run: pipx install poetry

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
cache: "poetry"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install poetry
run: pipx install poetry

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3"
cache: "poetry"
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
- id: black

- repo: https://github.com/PyCQA/isort
rev: "5.12.0"
rev: "5.13.1"
hooks:
- id: isort

Expand Down
2 changes: 1 addition & 1 deletion procrastinate/contrib/django/migrations_magic.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def list_migration_files() -> Iterable[Tuple[str, str]]:
Returns a list of filenames and file contents for all migration files
"""
return [
(p.name, p.read_text())
(p.name, p.read_text(encoding="utf-8"))
for p in importlib_resources.files("procrastinate.sql.migrations").iterdir()
if p.name.endswith(".sql")
]
Expand Down
2 changes: 1 addition & 1 deletion procrastinate/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(self, connector: connector_module.BaseConnector):
def get_schema() -> str:
return (
importlib_resources.files("procrastinate.sql") / "schema.sql"
).read_text()
).read_text(encoding="utf-8")

@staticmethod
def get_migrations_path() -> str:
Expand Down
4 changes: 3 additions & 1 deletion procrastinate/sql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ def parse_query_file(query_file: str) -> Dict["str", "str"]:

def get_queries() -> Dict["str", "str"]:
return parse_query_file(
(importlib_resources.files("procrastinate.sql") / "queries.sql").read_text()
(importlib_resources.files("procrastinate.sql") / "queries.sql").read_text(
encoding="utf-8"
)
)


Expand Down

0 comments on commit 8dc37dc

Please sign in to comment.