From 5de124a41672df687de11b049667d8ffa4b46fe8 Mon Sep 17 00:00:00 2001 From: Francis Charette Migneault Date: Mon, 10 Jun 2024 19:50:41 -0400 Subject: [PATCH 1/2] update `authomatic[OpenID]==1.3.0` (relates to https://github.com/authomatic/authomatic/issues/195, https://github.com/authomatic/authomatic/issues/233, fixes https://github.com/Ouranosinc/Magpie/issues/583) --- CHANGES.rst | 4 ++++ requirements.txt | 12 +----------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index d8360fe9..78c07570 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -12,6 +12,10 @@ Changes Features / Changes ~~~~~~~~~~~~~~~~~~~~~ * Security fix: bump Docker base ``python:3.11-alpine3.19``. +* Update ``authomatic[OpenID]==1.3.0`` to resolve temporary workarounds + (relates to `authomatic/authomatic#195 `_ + and `authomatic/authomatic#233 `_, + fixes `#583 `_). .. _changes_4.0.0: diff --git a/requirements.txt b/requirements.txt index a267244c..cea426e4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,16 +1,6 @@ -r requirements-sys.txt alembic>=1.10 -# TODO: remove when merged -# until fix merged and deployed (https://github.com/authomatic/authomatic/pull/195) -# old variants: -# -e git+https://github.com/fmigneault/authomatic.git@httplib-port#egg=Authomatic -# https://github.com/fmigneault/authomatic/archive/httplib-port.zip#egg=Authomatic-1.0.1 -# - new authomatic handles openid install correctly -# - https://github.com/authomatic/authomatic/tree/master includes #195 (http-po#rt) -# via https://github.com/authomatic/authomatic/pull/227 -# However, this is not the latest tag https://github.com/authomatic/authomatic/tree/1.2.1 (done before #227). -# - Requires https://github.com/authomatic/authomatic/issues/233 for Python 3.12 (temporary patch in magpie.__init__) -authomatic[OpenID] @ https://github.com/fmigneault/authomatic/archive/httplib-port.zip +authomatic[OpenID]==1.3.0 bcrypt>=3.1.6 # FIXME: integrate when implemnted by official package (see https://github.com/bbangert/beaker/issues/201) beaker @ https://github.com/crim-ca/beaker/archive/0ac88bcd8cca063a571fc385ffbe9bcc8acaa690.zip From 519aacad5f4ea071cf1000ca694abfe395f0b8f9 Mon Sep 17 00:00:00 2001 From: Francis Charette Migneault Date: Tue, 11 Jun 2024 17:42:38 -0400 Subject: [PATCH 2/2] remove patch code to test `authomatic==1.3.0` fix --- magpie/__init__.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/magpie/__init__.py b/magpie/__init__.py index 7b94770a..6db44252 100644 --- a/magpie/__init__.py +++ b/magpie/__init__.py @@ -7,16 +7,6 @@ import sys -# FIXME: patch workaround for Python 3.12 issue with vendor-specific 'six.moves' -# Inspired from https://github.com/dpkp/kafka-python/issues/2401#issuecomment-1760208950 -# Applied here such that anything importing 'magpie' does it first, to avoid patch everywhere importing 'authomatic'. -# Official fix required (see https://github.com/authomatic/authomatic/issues/233). -if sys.version_info >= (3, 12, 0): - import six - sys.modules["authomatic.six.moves"] = six.moves - sys.modules["authomatic.six.moves.urllib"] = six.moves.urllib - sys.modules["authomatic.six.moves.urllib.parse"] = six.moves.urllib.parse - def includeme(config): # import needs to be here, otherwise ImportError happens during setup.py install (modules not yet installed)