We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Circular import for warehouse.oidc
Surfaced via:

```shellsession
python -c "import warehouse.oidc"
```


```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "workpath/warehouse/warehouse/oidc/__init__.py", line 13, in <module>
    from warehouse.oidc.interfaces import IOIDCPublisherService
  File "workpath/warehouse/warehouse/oidc/interfaces.py", line 19, in <module>
    from warehouse.packaging.models import Project
  File "workpath/warehouse/warehouse/packaging/__init__.py", line 17, in <module>
    from warehouse.accounts.models import Email, User
  File "workpath/warehouse/warehouse/accounts/__init__.py", line 22, in <module>
    from warehouse.accounts.security_policy import (
  File "workpath/warehouse/warehouse/accounts/security_policy.py", line 36, in <module>
    from warehouse.utils.security_policy import AuthenticationMethod
  File "workpath/warehouse/warehouse/utils/security_policy.py", line 21, in <module>
    from warehouse.oidc.models import OIDCPublisher
  File "workpath/warehouse/warehouse/oidc/models.py", line 24, in <module>
    from warehouse.oidc.interfaces import SignedClaims
ImportError: cannot import name 'SignedClaims' from partially initialized module 'warehouse.oidc.interfaces' (most likely due to a circular import) (workpath/warehouse/warehouse/oidc/interfaces.py)
```

This isn't posing a problem in production (yet). I found it when I tried to filter out the warnings from `InsecureOIDCPublisherWarning` - but we should figure out how to not have a circular import.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `warehouse/oidc/interfaces.py`
Content:
```
1 # Licensed under the Apache License, Version 2.0 (the "License");
2 # you may not use this file except in compliance with the License.
3 # You may obtain a copy of the License at
4 #
5 # http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS,
9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 # See the License for the specific language governing permissions and
11 # limitations under the License.
12 
13 from __future__ import annotations
14 
15 from typing import TYPE_CHECKING, Any, NewType
16 
17 from zope.interface import Interface
18 
19 from warehouse.packaging.models import Project
20 from warehouse.rate_limiting.interfaces import RateLimiterException
21 
22 if TYPE_CHECKING:
23     from warehouse.oidc.models import PendingOIDCPublisher  # pragma: no cover
24 
25 SignedClaims = NewType("SignedClaims", dict[str, Any])
26 
27 
28 class IOIDCPublisherService(Interface):
29     def verify_jwt_signature(unverified_token: str):
30         """
31         Verify the given JWT's signature, returning its signed claims if
32         valid. If the signature is invalid, `None` is returned.
33 
34         This method does **not** verify the claim set itself -- the API
35         consumer is responsible for evaluating the claim set.
36         """
37         pass
38 
39     def find_publisher(signed_claims: SignedClaims, *, pending: bool = False):
40         """
41         Given a mapping of signed claims produced by `verify_jwt_signature`,
42         attempt to find and return either a `OIDCPublisher` or `PendingOIDCPublisher`
43         that matches them, depending on the value of `pending`.
44 
45         If no publisher matches the claims, `None` is returned.
46         """
47         pass
48 
49     def reify_pending_publisher(
50         pending_publisher: PendingOIDCPublisher, project: Project
51     ):
52         """
53         Reify the given pending `PendingOIDCPublisher` into an `OIDCPublisher`,
54         adding it to the given project (presumed newly created) in the process.
55 
56         Returns the reified publisher.
57         """
58         pass
59 
60 
61 class TooManyOIDCRegistrations(RateLimiterException):
62     pass
63
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/warehouse/oidc/interfaces.py b/warehouse/oidc/interfaces.py
--- a/warehouse/oidc/interfaces.py
+++ b/warehouse/oidc/interfaces.py
@@ -16,11 +16,11 @@
 
 from zope.interface import Interface
 
-from warehouse.packaging.models import Project
 from warehouse.rate_limiting.interfaces import RateLimiterException
 
 if TYPE_CHECKING:
-    from warehouse.oidc.models import PendingOIDCPublisher  # pragma: no cover
+    from warehouse.oidc.models import PendingOIDCPublisher
+    from warehouse.packaging.models import Project
 
 SignedClaims = NewType("SignedClaims", dict[str, Any])

{"golden_diff": "diff --git a/warehouse/oidc/interfaces.py b/warehouse/oidc/interfaces.py\n--- a/warehouse/oidc/interfaces.py\n+++ b/warehouse/oidc/interfaces.py\n@@ -16,11 +16,11 @@\n \n from zope.interface import Interface\n \n-from warehouse.packaging.models import Project\n from warehouse.rate_limiting.interfaces import RateLimiterException\n \n if TYPE_CHECKING:\n-    from warehouse.oidc.models import PendingOIDCPublisher  # pragma: no cover\n+    from warehouse.oidc.models import PendingOIDCPublisher\n+    from warehouse.packaging.models import Project\n \n SignedClaims = NewType(\"SignedClaims\", dict[str, Any])\n", "issue": "Circular import for warehouse.oidc\nSurfaced via:\r\n\r\n```shellsession\r\npython -c \"import warehouse.oidc\"\r\n```\r\n\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\n  File \"workpath/warehouse/warehouse/oidc/__init__.py\", line 13, in <module>\r\n    from warehouse.oidc.interfaces import IOIDCPublisherService\r\n  File \"workpath/warehouse/warehouse/oidc/interfaces.py\", line 19, in <module>\r\n    from warehouse.packaging.models import Project\r\n  File \"workpath/warehouse/warehouse/packaging/__init__.py\", line 17, in <module>\r\n    from warehouse.accounts.models import Email, User\r\n  File \"workpath/warehouse/warehouse/accounts/__init__.py\", line 22, in <module>\r\n    from warehouse.accounts.security_policy import (\r\n  File \"workpath/warehouse/warehouse/accounts/security_policy.py\", line 36, in <module>\r\n    from warehouse.utils.security_policy import AuthenticationMethod\r\n  File \"workpath/warehouse/warehouse/utils/security_policy.py\", line 21, in <module>\r\n    from warehouse.oidc.models import OIDCPublisher\r\n  File \"workpath/warehouse/warehouse/oidc/models.py\", line 24, in <module>\r\n    from warehouse.oidc.interfaces import SignedClaims\r\nImportError: cannot import name 'SignedClaims' from partially initialized module 'warehouse.oidc.interfaces' (most likely due to a circular import) (workpath/warehouse/warehouse/oidc/interfaces.py)\r\n```\r\n\r\nThis isn't posing a problem in production (yet). I found it when I tried to filter out the warnings from `InsecureOIDCPublisherWarning` - but we should figure out how to not have a circular import.\n", "before_files": [{"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any, NewType\n\nfrom zope.interface import Interface\n\nfrom warehouse.packaging.models import Project\nfrom warehouse.rate_limiting.interfaces import RateLimiterException\n\nif TYPE_CHECKING:\n    from warehouse.oidc.models import PendingOIDCPublisher  # pragma: no cover\n\nSignedClaims = NewType(\"SignedClaims\", dict[str, Any])\n\n\nclass IOIDCPublisherService(Interface):\n    def verify_jwt_signature(unverified_token: str):\n        \"\"\"\n        Verify the given JWT's signature, returning its signed claims if\n        valid. If the signature is invalid, `None` is returned.\n\n        This method does **not** verify the claim set itself -- the API\n        consumer is responsible for evaluating the claim set.\n        \"\"\"\n        pass\n\n    def find_publisher(signed_claims: SignedClaims, *, pending: bool = False):\n        \"\"\"\n        Given a mapping of signed claims produced by `verify_jwt_signature`,\n        attempt to find and return either a `OIDCPublisher` or `PendingOIDCPublisher`\n        that matches them, depending on the value of `pending`.\n\n        If no publisher matches the claims, `None` is returned.\n        \"\"\"\n        pass\n\n    def reify_pending_publisher(\n        pending_publisher: PendingOIDCPublisher, project: Project\n    ):\n        \"\"\"\n        Reify the given pending `PendingOIDCPublisher` into an `OIDCPublisher`,\n        adding it to the given project (presumed newly created) in the process.\n\n        Returns the reified publisher.\n        \"\"\"\n        pass\n\n\nclass TooManyOIDCRegistrations(RateLimiterException):\n    pass\n", "path": "warehouse/oidc/interfaces.py"}], "after_files": [{"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any, NewType\n\nfrom zope.interface import Interface\n\nfrom warehouse.rate_limiting.interfaces import RateLimiterException\n\nif TYPE_CHECKING:\n    from warehouse.oidc.models import PendingOIDCPublisher\n    from warehouse.packaging.models import Project\n\nSignedClaims = NewType(\"SignedClaims\", dict[str, Any])\n\n\nclass IOIDCPublisherService(Interface):\n    def verify_jwt_signature(unverified_token: str):\n        \"\"\"\n        Verify the given JWT's signature, returning its signed claims if\n        valid. If the signature is invalid, `None` is returned.\n\n        This method does **not** verify the claim set itself -- the API\n        consumer is responsible for evaluating the claim set.\n        \"\"\"\n        pass\n\n    def find_publisher(signed_claims: SignedClaims, *, pending: bool = False):\n        \"\"\"\n        Given a mapping of signed claims produced by `verify_jwt_signature`,\n        attempt to find and return either a `OIDCPublisher` or `PendingOIDCPublisher`\n        that matches them, depending on the value of `pending`.\n\n        If no publisher matches the claims, `None` is returned.\n        \"\"\"\n        pass\n\n    def reify_pending_publisher(\n        pending_publisher: PendingOIDCPublisher, project: Project\n    ):\n        \"\"\"\n        Reify the given pending `PendingOIDCPublisher` into an `OIDCPublisher`,\n        adding it to the given project (presumed newly created) in the process.\n\n        Returns the reified publisher.\n        \"\"\"\n        pass\n\n\nclass TooManyOIDCRegistrations(RateLimiterException):\n    pass\n", "path": "warehouse/oidc/interfaces.py"}]}