pas.plugins.authomatic 1.3.0__tar.gz → 1.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/CHANGELOG.md +6 -0
  2. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/PKG-INFO +9 -12
  3. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/setup.py +4 -2
  4. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/__init__.py +14 -6
  5. pas.plugins.authomatic-1.4.0/src/pas/plugins/authomatic/logging.py +6 -0
  6. pas.plugins.authomatic-1.4.0/src/pas/plugins/authomatic/patches/__init__.py +5 -0
  7. pas.plugins.authomatic-1.4.0/src/pas/plugins/authomatic/patches/authomatic.py +147 -0
  8. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas.plugins.authomatic.egg-info/PKG-INFO +9 -12
  9. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas.plugins.authomatic.egg-info/SOURCES.txt +3 -0
  10. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas.plugins.authomatic.egg-info/requires.txt +1 -1
  11. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/.coveragerc +0 -0
  12. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/.editorconfig +0 -0
  13. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/CONTRIBUTORS.md +0 -0
  14. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/LICENSE.txt +0 -0
  15. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/MANIFEST.in +0 -0
  16. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/Makefile +0 -0
  17. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/README.md +0 -0
  18. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/docs/authomatic.svg +0 -0
  19. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/docs/plone-control-panel.png +0 -0
  20. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/docs/plugin-settings.png +0 -0
  21. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/pyproject.toml +0 -0
  22. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/requirements.txt +0 -0
  23. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/setup.cfg +0 -0
  24. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/__init__.py +0 -0
  25. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/__init__.py +0 -0
  26. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/browser/__init__.py +0 -0
  27. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/browser/add_plugin.pt +0 -0
  28. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/browser/authomatic.png +0 -0
  29. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/browser/authomatic.pt +0 -0
  30. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/browser/configure.zcml +0 -0
  31. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/browser/controlpanel.py +0 -0
  32. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/browser/resources/authomatic-logo.svg +0 -0
  33. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/browser/resources/authomatic.css +0 -0
  34. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/browser/resources/authomatic.less +0 -0
  35. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/browser/view.py +0 -0
  36. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/configure.zcml +0 -0
  37. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/integration/__init__.py +0 -0
  38. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/integration/restapi.py +0 -0
  39. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/integration/zope.py +0 -0
  40. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/interfaces.py +0 -0
  41. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/locales/__init__.py +0 -0
  42. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/locales/de/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
  43. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/locales/es/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
  44. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/locales/fr/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
  45. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/locales/it/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
  46. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/locales/pas.plugins.authomatic-manual.pot +0 -0
  47. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/locales/pas.plugins.authomatic.pot +0 -0
  48. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/locales/pt_BR/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
  49. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/locales/ro/LC_MESSAGES/pas.plugins.authomatic.po +0 -0
  50. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/locales/update.py +0 -0
  51. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/meta.zcml +0 -0
  52. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/plugin.py +0 -0
  53. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/profiles/default/browserlayer.xml +0 -0
  54. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/profiles/default/controlpanel.xml +0 -0
  55. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/profiles/default/metadata.xml +0 -0
  56. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/profiles/default/registry.xml +0 -0
  57. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/profiles/uninstall/browserlayer.xml +0 -0
  58. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/profiles/uninstall/controlpanel.xml +0 -0
  59. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/profiles/uninstall/registry.xml +0 -0
  60. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/profiles.zcml +0 -0
  61. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/services/__init__.py +0 -0
  62. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/services/authomatic.py +0 -0
  63. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/services/configure.zcml +0 -0
  64. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/services/login.py +0 -0
  65. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/setuphandlers.py +0 -0
  66. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/testing.py +0 -0
  67. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/tests/__init__.py +0 -0
  68. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/tests/mocks.py +0 -0
  69. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/tests/test_browser_controlpanel.py +0 -0
  70. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/tests/test_plugin.py +0 -0
  71. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/tests/test_services_authomatic.py +0 -0
  72. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/tests/test_services_login.py +0 -0
  73. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/tests/test_setup.py +0 -0
  74. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/tests/test_setuphandler.py +0 -0
  75. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/tests/test_upgrades.py +0 -0
  76. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/tests/test_useridentities.py +0 -0
  77. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/tests/test_useridfactories.py +0 -0
  78. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/useridentities.py +0 -0
  79. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/useridfactories.py +0 -0
  80. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas/plugins/authomatic/utils.py +0 -0
  81. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas.plugins.authomatic.egg-info/dependency_links.txt +0 -0
  82. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas.plugins.authomatic.egg-info/entry_points.txt +0 -0
  83. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas.plugins.authomatic.egg-info/namespace_packages.txt +0 -0
  84. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas.plugins.authomatic.egg-info/not-zip-safe +0 -0
  85. {pas_plugins_authomatic-1.3.0 → pas.plugins.authomatic-1.4.0}/src/pas.plugins.authomatic.egg-info/top_level.txt +0 -0
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.0 (2024-12-13)
4
+
5
+
6
+ - Patch `authomatic.providers.BaseProvider._fetch` to support Python 3.12 @ericof.
7
+
8
+
3
9
  ## 1.3.0 (2024-11-21)
4
10
 
5
11
  - Search users by fullname and email. @alecghica
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pas.plugins.authomatic
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: Provides OAuth2/OpenID login for Plone using Authomatic.
5
5
  Home-page: https://github.com/collective/pas.plugins.authomatic
6
6
  Author: Jens Klein, Matthias Dollfuss, and Érico Andrei
@@ -25,21 +25,12 @@ Classifier: Programming Language :: Python :: 3.8
25
25
  Classifier: Programming Language :: Python :: 3.9
26
26
  Classifier: Programming Language :: Python :: 3.10
27
27
  Classifier: Programming Language :: Python :: 3.11
28
+ Classifier: Programming Language :: Python :: 3.12
28
29
  Classifier: Programming Language :: Python
29
30
  Requires-Python: >=3.7
30
31
  Description-Content-Type: text/markdown
31
- License-File: LICENSE.txt
32
- Requires-Dist: authomatic>=1.0.0
33
- Requires-Dist: Products.CMFPlone>=5.2
34
- Requires-Dist: plone.restapi
35
- Requires-Dist: setuptools
36
32
  Provides-Extra: test
37
- Requires-Dist: collective.MockMailHost; extra == "test"
38
- Requires-Dist: parameterized; extra == "test"
39
- Requires-Dist: plone.app.testing; extra == "test"
40
- Requires-Dist: plone.restapi[test]; extra == "test"
41
- Requires-Dist: plone.app.robotframework[debug]; extra == "test"
42
- Requires-Dist: zest.releaser[recommended]; extra == "test"
33
+ License-File: LICENSE.txt
43
34
 
44
35
 
45
36
  <div align="center"><img alt="logo" src="https://raw.githubusercontent.com/collective/pas.plugins.authomatic/main/docs/authomatic.svg" width="70" /></div>
@@ -269,6 +260,12 @@ The project is licensed under the GPLv2.
269
260
 
270
261
  # Changelog
271
262
 
263
+ ## 1.4.0 (2024-12-13)
264
+
265
+
266
+ - Patch `authomatic.providers.BaseProvider._fetch` to support Python 3.12 @ericof.
267
+
268
+
272
269
  ## 1.3.0 (2024-11-21)
273
270
 
274
271
  - Search users by fullname and email. @alecghica
@@ -1,4 +1,5 @@
1
1
  """Installer for the pas.plugins.authomatic package."""
2
+
2
3
  from pathlib import Path
3
4
  from setuptools import find_packages
4
5
  from setuptools import setup
@@ -11,7 +12,7 @@ long_description = f"""
11
12
 
12
13
  setup(
13
14
  name="pas.plugins.authomatic",
14
- version="1.3.0",
15
+ version="1.4.0",
15
16
  description="Provides OAuth2/OpenID login for Plone using Authomatic.",
16
17
  long_description=long_description,
17
18
  long_description_content_type="text/markdown",
@@ -31,6 +32,7 @@ setup(
31
32
  "Programming Language :: Python :: 3.9",
32
33
  "Programming Language :: Python :: 3.10",
33
34
  "Programming Language :: Python :: 3.11",
35
+ "Programming Language :: Python :: 3.12",
34
36
  "Programming Language :: Python",
35
37
  ],
36
38
  keywords="Python Plone PAS OAuth Authentication",
@@ -50,7 +52,7 @@ setup(
50
52
  python_requires=">=3.7",
51
53
  zip_safe=False,
52
54
  install_requires=[
53
- "authomatic>=1.0.0",
55
+ "authomatic>=1.3.0",
54
56
  "Products.CMFPlone>=5.2",
55
57
  "plone.restapi",
56
58
  "setuptools",
@@ -1,9 +1,10 @@
1
- from AccessControl.Permissions import add_user_folders
2
- from pas.plugins.authomatic.plugin import AuthomaticPlugin
3
- from pas.plugins.authomatic.plugin import manage_addAuthomaticPlugin
4
- from pas.plugins.authomatic.plugin import manage_addAuthomaticPluginForm
5
- from pas.plugins.authomatic.plugin import tpl_dir
6
- from Products.PluggableAuthService import registerMultiPlugin
1
+ from pas.plugins.authomatic.patches import apply_patches
2
+
3
+
4
+ PACKAGE_NAME = "pas.plugins.authomatic"
5
+
6
+
7
+ apply_patches()
7
8
 
8
9
 
9
10
  def initialize(context):
@@ -15,6 +16,13 @@ def initialize(context):
15
16
  Here, we call the Archetypes machinery to register our content types
16
17
  with Zope and the CMF.
17
18
  """
19
+ from AccessControl.Permissions import add_user_folders
20
+ from pas.plugins.authomatic.plugin import AuthomaticPlugin
21
+ from pas.plugins.authomatic.plugin import manage_addAuthomaticPlugin
22
+ from pas.plugins.authomatic.plugin import manage_addAuthomaticPluginForm
23
+ from pas.plugins.authomatic.plugin import tpl_dir
24
+ from Products.PluggableAuthService import registerMultiPlugin
25
+
18
26
  registerMultiPlugin(AuthomaticPlugin.meta_type)
19
27
  context.registerClass(
20
28
  AuthomaticPlugin,
@@ -0,0 +1,6 @@
1
+ from pas.plugins.authomatic import PACKAGE_NAME
2
+
3
+ import logging
4
+
5
+
6
+ logger = logging.getLogger(PACKAGE_NAME)
@@ -0,0 +1,5 @@
1
+ def apply_patches():
2
+ """Apply patches."""
3
+ from .authomatic import patch_base_provider_fetch
4
+
5
+ patch_base_provider_fetch()
@@ -0,0 +1,147 @@
1
+ from authomatic.exceptions import FetchError
2
+ from authomatic.providers import BaseProvider
3
+ from http import client as http_client
4
+ from pas.plugins.authomatic.logging import logger
5
+ from urllib import parse
6
+
7
+ import authomatic.core
8
+ import ssl
9
+
10
+
11
+ def patch_base_provider_fetch():
12
+ def _fetch(
13
+ self,
14
+ url,
15
+ method="GET",
16
+ params=None,
17
+ headers=None,
18
+ body="",
19
+ max_redirects=5,
20
+ content_parser=None,
21
+ certificate_file=None,
22
+ ssl_verify=True,
23
+ ):
24
+ """
25
+ Fetches a URL.
26
+
27
+ :param str url:
28
+ The URL to fetch.
29
+
30
+ :param str method:
31
+ HTTP method of the request.
32
+
33
+ :param dict params:
34
+ Dictionary of request parameters.
35
+
36
+ :param dict headers:
37
+ HTTP headers of the request.
38
+
39
+ :param str body:
40
+ Body of ``POST``, ``PUT`` and ``PATCH`` requests.
41
+
42
+ :param int max_redirects:
43
+ Number of maximum HTTP redirects to follow.
44
+
45
+ :param function content_parser:
46
+ A callable to be used to parse the :attr:`.Response.data`
47
+ from :attr:`.Response.content`.
48
+
49
+ :param str certificate_file:
50
+ Optional certificate file to be used for HTTPS connection.
51
+
52
+ :param bool ssl_verify:
53
+ Verify SSL on HTTPS connection.
54
+ """
55
+ # 'magic' using _kwarg method
56
+ # pylint:disable=no-member
57
+ params = params or {}
58
+ params.update(self.access_params)
59
+
60
+ headers = headers or {}
61
+ headers.update(self.access_headers)
62
+
63
+ url_parsed = parse.urlsplit(url)
64
+ query = parse.urlencode(params)
65
+
66
+ if method in ("POST", "PUT", "PATCH"):
67
+ if not body:
68
+ # Put querystring to body
69
+ body = query
70
+ query = ""
71
+ headers.update({"Content-Type": "application/x-www-form-urlencoded"})
72
+ request_path = parse.urlunsplit(
73
+ ("", "", url_parsed.path or "", query or "", "")
74
+ )
75
+
76
+ self._log_param("host", url_parsed.hostname, last=False)
77
+ self._log_param("method", method, last=False)
78
+ self._log_param("body", body, last=False)
79
+ self._log_param("params", params, last=False)
80
+ self._log_param("headers", headers, last=False)
81
+ self._log_param("certificate", certificate_file, last=False)
82
+ self._log_param("SSL verify", ssl_verify, last=True)
83
+
84
+ # Connect
85
+ if url_parsed.scheme.lower() == "https":
86
+ if ssl_verify:
87
+ context = ssl.create_default_context(
88
+ purpose=ssl.Purpose.SERVER_AUTH, cafile=certificate_file
89
+ )
90
+ else:
91
+ context = ssl._create_unverified_context()
92
+
93
+ connection = http_client.HTTPSConnection(
94
+ url_parsed.hostname, port=url_parsed.port, context=context
95
+ )
96
+ else:
97
+ connection = http_client.HTTPConnection(
98
+ url_parsed.hostname, port=url_parsed.port
99
+ )
100
+
101
+ try:
102
+ connection.request(method, request_path, body, headers)
103
+ except Exception as e: # noQA: B902
104
+ raise FetchError(
105
+ "Fetching URL failed", original_message=str(e), url=request_path
106
+ )
107
+
108
+ response = connection.getresponse()
109
+ location = response.getheader("Location")
110
+
111
+ if response.status in (300, 301, 302, 303, 307) and location:
112
+ if location == url:
113
+ raise FetchError(
114
+ "Url redirects to itself!", url=location, status=response.status
115
+ )
116
+
117
+ if max_redirects > 0:
118
+ remaining_redirects = max_redirects - 1
119
+
120
+ self._log_param("Redirecting to", url)
121
+ self._log_param("Remaining redirects", remaining_redirects)
122
+
123
+ # Call this method again.
124
+ response = self._fetch(
125
+ url=location,
126
+ params=params,
127
+ method=method,
128
+ headers=headers,
129
+ max_redirects=remaining_redirects,
130
+ certificate_file=certificate_file,
131
+ ssl_verify=ssl_verify,
132
+ )
133
+
134
+ else:
135
+ raise FetchError(
136
+ "Max redirects reached!", url=location, status=response.status
137
+ )
138
+ else:
139
+ self._log_param("Got response")
140
+ self._log_param("url", url, last=False)
141
+ self._log_param("status", response.status, last=False)
142
+ self._log_param("headers", response.getheaders(), last=True)
143
+
144
+ return authomatic.core.Response(response, content_parser)
145
+
146
+ BaseProvider._fetch = _fetch
147
+ logger.info("Patched authomatic.providers.BaseProvider._fetch")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pas.plugins.authomatic
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: Provides OAuth2/OpenID login for Plone using Authomatic.
5
5
  Home-page: https://github.com/collective/pas.plugins.authomatic
6
6
  Author: Jens Klein, Matthias Dollfuss, and Érico Andrei
@@ -25,21 +25,12 @@ Classifier: Programming Language :: Python :: 3.8
25
25
  Classifier: Programming Language :: Python :: 3.9
26
26
  Classifier: Programming Language :: Python :: 3.10
27
27
  Classifier: Programming Language :: Python :: 3.11
28
+ Classifier: Programming Language :: Python :: 3.12
28
29
  Classifier: Programming Language :: Python
29
30
  Requires-Python: >=3.7
30
31
  Description-Content-Type: text/markdown
31
- License-File: LICENSE.txt
32
- Requires-Dist: authomatic>=1.0.0
33
- Requires-Dist: Products.CMFPlone>=5.2
34
- Requires-Dist: plone.restapi
35
- Requires-Dist: setuptools
36
32
  Provides-Extra: test
37
- Requires-Dist: collective.MockMailHost; extra == "test"
38
- Requires-Dist: parameterized; extra == "test"
39
- Requires-Dist: plone.app.testing; extra == "test"
40
- Requires-Dist: plone.restapi[test]; extra == "test"
41
- Requires-Dist: plone.app.robotframework[debug]; extra == "test"
42
- Requires-Dist: zest.releaser[recommended]; extra == "test"
33
+ License-File: LICENSE.txt
43
34
 
44
35
 
45
36
  <div align="center"><img alt="logo" src="https://raw.githubusercontent.com/collective/pas.plugins.authomatic/main/docs/authomatic.svg" width="70" /></div>
@@ -269,6 +260,12 @@ The project is licensed under the GPLv2.
269
260
 
270
261
  # Changelog
271
262
 
263
+ ## 1.4.0 (2024-12-13)
264
+
265
+
266
+ - Patch `authomatic.providers.BaseProvider._fetch` to support Python 3.12 @ericof.
267
+
268
+
272
269
  ## 1.3.0 (2024-11-21)
273
270
 
274
271
  - Search users by fullname and email. @alecghica
@@ -25,6 +25,7 @@ src/pas/plugins/__init__.py
25
25
  src/pas/plugins/authomatic/__init__.py
26
26
  src/pas/plugins/authomatic/configure.zcml
27
27
  src/pas/plugins/authomatic/interfaces.py
28
+ src/pas/plugins/authomatic/logging.py
28
29
  src/pas/plugins/authomatic/meta.zcml
29
30
  src/pas/plugins/authomatic/plugin.py
30
31
  src/pas/plugins/authomatic/profiles.zcml
@@ -56,6 +57,8 @@ src/pas/plugins/authomatic/locales/fr/LC_MESSAGES/pas.plugins.authomatic.po
56
57
  src/pas/plugins/authomatic/locales/it/LC_MESSAGES/pas.plugins.authomatic.po
57
58
  src/pas/plugins/authomatic/locales/pt_BR/LC_MESSAGES/pas.plugins.authomatic.po
58
59
  src/pas/plugins/authomatic/locales/ro/LC_MESSAGES/pas.plugins.authomatic.po
60
+ src/pas/plugins/authomatic/patches/__init__.py
61
+ src/pas/plugins/authomatic/patches/authomatic.py
59
62
  src/pas/plugins/authomatic/profiles/default/browserlayer.xml
60
63
  src/pas/plugins/authomatic/profiles/default/controlpanel.xml
61
64
  src/pas/plugins/authomatic/profiles/default/metadata.xml
@@ -1,4 +1,4 @@
1
- authomatic>=1.0.0
1
+ authomatic>=1.3.0
2
2
  Products.CMFPlone>=5.2
3
3
  plone.restapi
4
4
  setuptools