From b87308cfaaa269c44784cda69855ecaf298f9f5e Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Wed, 27 Mar 2024 08:25:48 +0100 Subject: [PATCH 1/3] Update Ruff dependency version --- .pre-commit-config.yaml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 333bc3c0..d6cfac07 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - id: forbid-new-submodules - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.5 + rev: v0.1.15 hooks: - id: ruff - id: ruff-format diff --git a/pyproject.toml b/pyproject.toml index eb1884a9..2f7d677c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,7 +95,7 @@ dev = [ "pytest-xdist>=3.4.0", "tox>=4.11.3", "invoke>=2.2.0", - "ruff>=0.1.5,<0.2.0", + "ruff>=0.1.15,<0.2.0", "tomli>=2.0.1; python_version < \"3.11\"", ] From 94bcd41f27d7f38a9dbd0847c6166e91a66d2090 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Wed, 27 Mar 2024 08:26:55 +0100 Subject: [PATCH 2/3] Ignore Sphinx 7.2.x package install warnings Sphinx 7.2+ requires Python 3.9+, which results in annoying warnings since we still support Python 3.8.x. --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 2f7d677c..3ca06df4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,6 +69,7 @@ changelog-header = "###############" version-header = "=" [tool.pdm] +ignore_package_warnings = ["sphinx"] [tool.pdm.scripts] docbuild = "invoke docbuild" From 666b962eb67369a2de45362b08c74524b5d49c57 Mon Sep 17 00:00:00 2001 From: Deniz Turgut Date: Fri, 19 Apr 2024 08:51:07 -0700 Subject: [PATCH 3/3] workaround Turkish locale issue --- pelican/utils.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pelican/utils.py b/pelican/utils.py index 5f161667..86698aee 100644 --- a/pelican/utils.py +++ b/pelican/utils.py @@ -132,6 +132,10 @@ class DateFormatter: def __init__(self) -> None: self.locale = locale.setlocale(locale.LC_TIME) + # python has issue with Turkish_Türkiye.1254 locale, replace it to + # something accepted: Turkish + if self.locale == "Turkish_Türkiye.1254": + self.locale = "Turkish" def __call__(self, date: datetime.datetime, date_format: str) -> str: # on OSX, encoding from LC_CTYPE determines the unicode output in PY3 @@ -922,6 +926,10 @@ def temporary_locale( class to use the C locale. """ orig_locale = locale.setlocale(lc_category) + # python has issue with Turkish_Türkiye.1254 locale, replace it to + # something accepted: Turkish + if orig_locale == "Turkish_Türkiye.1254": + orig_locale = "Turkish" if temp_locale: locale.setlocale(lc_category, temp_locale) yield