From a9146d3f8d2fb3b10148b640ebaa1133afb92e40 Mon Sep 17 00:00:00 2001 From: JS Ng Date: Wed, 28 Oct 2026 09:38:04 +0800 Subject: [PATCH] refactor(model): remove campus.webauth.models shim MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to #984: campus-api-python#120 flipped the SDK's json_client to campus.model, so the temporary compatibility shim at campus.webauth.models has no importers left (grep gate: zero hits — in-repo, SDK main, downstream heads). - delete campus/webauth/models/ - drop models from campus/webauth/__init__.py (__all__ + import) - advance campus-api-python lock 14ef22c -> 695992d (#120 merge) in the same change: the contract suite is the integration gate proving the flipped SDK resolves campus.model.HttpHeader against shim-free campus Completes the campus-model remigration acceptance: campus.model.HttpHeader / HttpAuthProperty / HttpHeaderWithAuth importable, campus.webauth.models gone. Refs #982 #970 --- campus/webauth/__init__.py | 3 +-- campus/webauth/models/__init__.py | 17 ----------------- poetry.lock | 2 +- 3 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 campus/webauth/models/__init__.py diff --git a/campus/webauth/__init__.py b/campus/webauth/__init__.py index 99f63685..5dda4b48 100644 --- a/campus/webauth/__init__.py +++ b/campus/webauth/__init__.py @@ -11,8 +11,7 @@ __all__ = [ "http", - "models", "oauth2", ] -from . import http, models, oauth2 +from . import http, oauth2 diff --git a/campus/webauth/models/__init__.py b/campus/webauth/models/__init__.py deleted file mode 100644 index 4104e22d..00000000 --- a/campus/webauth/models/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -"""campus.webauth.models - -Deprecated compatibility shim. - -The header models moved to campus.model.http (#982). Import them from -campus.model instead. This shim exists only for campus_python, whose -json_client still imports campus.webauth.models; it is removed once -the SDK import flips to campus.model. -""" - -__all__ = [ - "HttpAuthProperty", - "HttpHeader", - "HttpHeaderWithAuth", -] - -from campus.model import HttpAuthProperty, HttpHeader, HttpHeaderWithAuth diff --git a/poetry.lock b/poetry.lock index 93ea53e5..0411f6df 100644 --- a/poetry.lock +++ b/poetry.lock @@ -632,7 +632,7 @@ flask = "^3.0.0" type = "git" url = "https://github.com/nyjc-computing/campus-api-python.git" reference = "main" -resolved_reference = "14ef22c83bb1a4f110d38100470c9c795ec629d5" +resolved_reference = "695992d8afbc1fa9bf8c1b084f39bc3d680fed3e" [[package]] name = "certifi"