← Back to Pull requests

Remove ethicalads #20766

Open
Alc-Alc opened this pull request with 681 lines diff across 19 files
View on GitHub
Alc-Alc Alc-Alc commented on Oct 20, 2026 13:06 UTC
Author

Removes EthicalAds from PyPI and replaces the PSF sponsor sidebar placement it served with one rendered by Warehouse, tracked through the PSF's Plausible at analytics.python.org so sponsor reporting continues. Partially Closes #20761

  • Remove EthicalAds integration (csp allowance, script, style)

  • Remove the unused includes.sidebar-sponsor-logo route and view, hasn't been used in the in past year, 0 hits.

  • Sync the sidebar flag from python.org's logo placement API (sidebar flight, publisher pypi). footer and sidebar are reset on remote sponsors each run so a sponsor that leaves a flight stops showing, manual sponsors keep their admin settings.

  • The partial renders every eligible sponsor hidden: logo via camo, link with rel="sponsored noopener" and with no eligible sponsors nothing is rendered.

  • sponsor_controller.js reveals one sponsor at random in the browser, so rotation still works under the 1-day CDN cache.

  • The project page has two copies of the placement (desktop sidebar and mobile Metadata tab), both show the same sponsor.

  • Events, both with props: {sponsor, placement: "pypi-sidebar"}:

  • - Sponsor Impression: once per page view, when the placement is 50% visible, interactive: false.
    - Sponsor Click: on click; the link works without analytics.
    <img width="700" alt="image" src="https://github.com/user-attachments/assets/a6fa52d2-42af-4f9d-ac20-8666cd179294" />

    "Professional Grade" Screencaps


    | Desktop | Mobile |
    |---|---|
    | <img height="400" alt="image" src="https://github.com/user-attachments/assets/3faf6d3d-fd1f-4fb4-874a-77d6cc31a2ca" /> | <img height="400" alt="image" src="https://github.com/user-attachments/assets/0feb78b1-c7ce-4e1e-b944-dc16ceb9af88" /> |

    Note the network tab.

    | Before | After |
    |---|---|
    | <img height="200" alt="image" src="https://github.com/user-attachments/assets/e2a7dc6e-8683-413e-8e23-0b1612c162ae" /> | <img height="200" alt="image" src="https://github.com/user-attachments/assets/258b2208-85a9-427e-8289-aee57d88ff6f" /> |

    CSP Check

  • Only the EthicalAds entries are removed

  • - *.ethicalads.io from connect-src, img-src, script-src and style-src, ethicalads.blob.core.windows.net from img-src

    Before

    curl -sI http://localhost:8000/project/piranha/
    
    Content-Security-Policy: base-uri 'self'
     connect-src 'self' https://api.github.com/repos/ https://api.github.com/search/issues https://gitlab.com/api/ https://analytics.python.org *.ethicalads.io https://api.pwnedpasswords.com https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/sre/mathmaps/ https://2p66nmmycsj3.statuspage.io ws://localhost:35729/livereload
     default-src 'none'
     font-src 'self'
     form-action 'self' https://checkout.stripe.com https://billing.stripe.com
     frame-ancestors 'none'
     frame-src 'none'
     img-src 'self' http://localhost:9000/ *.ethicalads.io ethicalads.blob.core.windows.net
     script-src 'self' https://analytics.python.org *.ethicalads.io 'sha256-U3hKDidudIaxBDEzwGJApJgPEf2mWk6cfMWghrAa6i0=' https://cdn.jsdelivr.net/npm/mathjax@3.2.2/ 'sha256-1CldwzdEg2k1wTmf7s5RWVd7NMXI/7nxxjJM2C4DqII=' http://localhost:35729/livereload.js
     style-src 'self' *.ethicalads.io 'sha256-2YHqZokjiizkHi1Zt+6ar0XJ0OeEy/egBnlm+MDMtrM=' 'sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=' 'sha256-JLEjeN9e5dGsz5475WyRaoA4eQOdNPxDIeUhclnJDCE=' 'sha256-mQyxHEuwZJqpxCw3SLmc4YOySNKXunyu2Oiz1r3/wAE=' 'sha256-OCf+kv5Asiwp++8PIevKBYSgnNLNUZvxAp4a7wMLuKA=' 'sha256-h5LOiLhk6wiJrGsG5ItM0KimwzWQH/yAcmoJDJL//bY='
    

    After

    curl -sI http://localhost:8000/project/piranha/
    
    Content-Security-Policy: base-uri 'self'
     connect-src 'self' https://api.github.com/repos/ https://api.github.com/search/issues https://gitlab.com/api/ https://analytics.python.org https://api.pwnedpasswords.com https://cdn.jsdelivr.net/npm/mathjax@3.2.2/es5/sre/mathmaps/ https://2p66nmmycsj3.statuspage.io ws://localhost:35729/livereload
     default-src 'none'
     font-src 'self'
     form-action 'self' https://checkout.stripe.com https://billing.stripe.com
     frame-ancestors 'none'
     frame-src 'none'
     img-src 'self' http://localhost:9000/
     script-src 'self' https://analytics.python.org https://cdn.jsdelivr.net/npm/mathjax@3.2.2/ 'sha256-1CldwzdEg2k1wTmf7s5RWVd7NMXI/7nxxjJM2C4DqII=' http://localhost:35729/livereload.js
     style-src 'self' 'sha256-JLEjeN9e5dGsz5475WyRaoA4eQOdNPxDIeUhclnJDCE=' 'sha256-mQyxHEuwZJqpxCw3SLmc4YOySNKXunyu2Oiz1r3/wAE=' 'sha256-OCf+kv5Asiwp++8PIevKBYSgnNLNUZvxAp4a7wMLuKA=' 'sha256-h5LOiLhk6wiJrGsG5ItM0KimwzWQH/yAcmoJDJL//bY='
    

    Diff: 681 lines (+522 / -159) across 19 files Reviewer: nlhkabu Review duration: 64982m
    All Vouch review confidence checks passed
    Residual risk 0.10 = Change Risk (0.78) × (1 − Review Confidence (0.87)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.78 · 681 lines diff across 19 files
    0.78
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.87 · 5 substantive comment(s)
    0.87
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    87%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.390
    Mass File Touch mass_file_touch
    0.080
    Real PR Conversation Timeline
    19 items
    ewdurbin ewdurbin commented on code on Oct 20, 2026 13:15 UTC
    Code Review
    docs/dev/development/sponsors.md:1
    @@ -0,0 +1,67 @@
    +# Sponsors
    +
    +PyPI shows the logos of Python Software Foundation sponsors in the page
    +footer, on the [sponsors page](https://pypi.org/sponsors/) and in the sidebar
    +of project and organization pages. The data lives in the `sponsors` table and
    +is managed through the admin UI and the python.org sync described below.
    +
    +## Syncing from python.org
    +
    +`warehouse.sponsors.tasks.update_pypi_sponsors` runs hourly when
    +`pythondotorg.api_token` is set. It reads python.org's logo placement API
    +(`/api/v2/sponsors/logo-placement/`) for publisher `pypi` twice:
    +
    +| Flight     | Sets                                     |
    +|------------|------------------------------------------|
    +| `sponsors` | `psf_sponsor`, `footer` (from the level) |
    +| `sidebar`  | `sidebar`                                |
    +
    +Both flights create or update the sponsor row (name, slug, description, link,
    +logos, level) and mark it `origin = "remote"`. Before each run `psf_sponsor`
    +is cleared on every sponsor, and `footer` and `sidebar` are cleared on remote
    +sponsors, so a sponsor that leaves a flight stops showing there. Sponsors
    +flagged `infra_sponsor` or `one_time` are never updated from the API. The
    +`footer` and `sidebar` checkboxes in the admin are only authoritative for
    +sponsors with `origin = "manual"`; on remote sponsors the API wins on the next
    +run.
    +
    +A sponsor that is only in the `sidebar` flight is created with
    +`psf_sponsor = False`, so it appears in the sidebar but not on the sponsors
    +page.
    +
    +## Sidebar placement
    +
    +`request.sponsors["sidebar"]` lists the active sponsors with the `sidebar`
    +flag. `warehouse/templates/includes/sidebar-sponsor-logo.html` renders all of
    +them, hidden, on project pages (except projects owned by a Company
    +organization) and on organization profiles. Those pages are cached at the CDN
    +for a day, so the choice of which sponsor to show is made in the browser by
    +`warehouse/static/js/warehouse/controllers/sponsor_controller.js`, which
    +reveals one at random. Without JavaScript nothing is shown. Changes to the
    +eligible set reach visitors as cached pages expire.
    +
    +The project page contains the placement twice (desktop sidebar and the mobile
    +"Metadata" tab). The controller keeps the chosen sponsor and the impression
    +state at module level, so both copies show the same sponsor and one page view
    +counts once.
    +
    +## Analytics
    +
    +The controller reports to the PSF's Plausible instance at
    +<https://analytics.python.org> through `window.plausible`, which the base
    +template sets up. Events and properties:
    +
    +| Event                | When                                                      | `interactive` |
    +|----------------------|-----------------------------------------------------------|---------------|
    +| `Sponsor Impression` | the placement is at least 50% visible, once per page view | `false`       |

    could definitely bikeshed what percentage visible counts as an impression... do we know what the threshold for ethicalads was? if so that will allow for some consistency if anyone compares to historic reporting.

    Alc-Alc Alc-Alc commented on code on Oct 20, 2026 13:47 UTC
    Code Review
    docs/dev/development/sponsors.md:1
    @@ -0,0 +1,67 @@
    +# Sponsors
    +
    +PyPI shows the logos of Python Software Foundation sponsors in the page
    +footer, on the [sponsors page](https://pypi.org/sponsors/) and in the sidebar
    +of project and organization pages. The data lives in the `sponsors` table and
    +is managed through the admin UI and the python.org sync described below.
    +
    +## Syncing from python.org
    +
    +`warehouse.sponsors.tasks.update_pypi_sponsors` runs hourly when
    +`pythondotorg.api_token` is set. It reads python.org's logo placement API
    +(`/api/v2/sponsors/logo-placement/`) for publisher `pypi` twice:
    +
    +| Flight     | Sets                                     |
    +|------------|------------------------------------------|
    +| `sponsors` | `psf_sponsor`, `footer` (from the level) |
    +| `sidebar`  | `sidebar`                                |
    +
    +Both flights create or update the sponsor row (name, slug, description, link,
    +logos, level) and mark it `origin = "remote"`. Before each run `psf_sponsor`
    +is cleared on every sponsor, and `footer` and `sidebar` are cleared on remote
    +sponsors, so a sponsor that leaves a flight stops showing there. Sponsors
    +flagged `infra_sponsor` or `one_time` are never updated from the API. The
    +`footer` and `sidebar` checkboxes in the admin are only authoritative for
    +sponsors with `origin = "manual"`; on remote sponsors the API wins on the next
    +run.
    +
    +A sponsor that is only in the `sidebar` flight is created with
    +`psf_sponsor = False`, so it appears in the sidebar but not on the sponsors
    +page.
    +
    +## Sidebar placement
    +
    +`request.sponsors["sidebar"]` lists the active sponsors with the `sidebar`
    +flag. `warehouse/templates/includes/sidebar-sponsor-logo.html` renders all of
    +them, hidden, on project pages (except projects owned by a Company
    +organization) and on organization profiles. Those pages are cached at the CDN
    +for a day, so the choice of which sponsor to show is made in the browser by
    +`warehouse/static/js/warehouse/controllers/sponsor_controller.js`, which
    +reveals one at random. Without JavaScript nothing is shown. Changes to the
    +eligible set reach visitors as cached pages expire.
    +
    +The project page contains the placement twice (desktop sidebar and the mobile
    +"Metadata" tab). The controller keeps the chosen sponsor and the impression
    +state at module level, so both copies show the same sponsor and one page view
    +counts once.
    +
    +## Analytics
    +
    +The controller reports to the PSF's Plausible instance at
    +<https://analytics.python.org> through `window.plausible`, which the base
    +template sets up. Events and properties:
    +
    +| Event                | When                                                      | `interactive` |
    +|----------------------|-----------------------------------------------------------|---------------|
    +| `Sponsor Impression` | the placement is at least 50% visible, once per page view | `false`       |

    Bit outside my element (heh, element) here, from what little JS I can understand, it was not based on percentage, but based on "as soon as it's on screen" (~3px and tab is visible).

    source: this, this and this

    JacobCoffee JacobCoffee commented on code on Oct 20, 2026 14:16 UTC
    Code Review
    docs/dev/development/sponsors.md:1
    @@ -0,0 +1,67 @@
    +# Sponsors
    +
    +PyPI shows the logos of Python Software Foundation sponsors in the page
    +footer, on the [sponsors page](https://pypi.org/sponsors/) and in the sidebar
    +of project and organization pages. The data lives in the `sponsors` table and
    +is managed through the admin UI and the python.org sync described below.
    +
    +## Syncing from python.org
    +
    +`warehouse.sponsors.tasks.update_pypi_sponsors` runs hourly when
    +`pythondotorg.api_token` is set. It reads python.org's logo placement API
    +(`/api/v2/sponsors/logo-placement/`) for publisher `pypi` twice:
    +
    +| Flight     | Sets                                     |
    +|------------|------------------------------------------|
    +| `sponsors` | `psf_sponsor`, `footer` (from the level) |
    +| `sidebar`  | `sidebar`                                |
    +
    +Both flights create or update the sponsor row (name, slug, description, link,
    +logos, level) and mark it `origin = "remote"`. Before each run `psf_sponsor`
    +is cleared on every sponsor, and `footer` and `sidebar` are cleared on remote
    +sponsors, so a sponsor that leaves a flight stops showing there. Sponsors
    +flagged `infra_sponsor` or `one_time` are never updated from the API. The
    +`footer` and `sidebar` checkboxes in the admin are only authoritative for
    +sponsors with `origin = "manual"`; on remote sponsors the API wins on the next
    +run.
    +
    +A sponsor that is only in the `sidebar` flight is created with
    +`psf_sponsor = False`, so it appears in the sidebar but not on the sponsors
    +page.
    +
    +## Sidebar placement
    +
    +`request.sponsors["sidebar"]` lists the active sponsors with the `sidebar`
    +flag. `warehouse/templates/includes/sidebar-sponsor-logo.html` renders all of
    +them, hidden, on project pages (except projects owned by a Company
    +organization) and on organization profiles. Those pages are cached at the CDN
    +for a day, so the choice of which sponsor to show is made in the browser by
    +`warehouse/static/js/warehouse/controllers/sponsor_controller.js`, which
    +reveals one at random. Without JavaScript nothing is shown. Changes to the
    +eligible set reach visitors as cached pages expire.
    +
    +The project page contains the placement twice (desktop sidebar and the mobile
    +"Metadata" tab). The controller keeps the chosen sponsor and the impression
    +state at module level, so both copies show the same sponsor and one page view
    +counts once.
    +
    +## Analytics
    +
    +The controller reports to the PSF's Plausible instance at
    +<https://analytics.python.org> through `window.plausible`, which the base
    +template sets up. Events and properties:
    +
    +| Event                | When                                                      | `interactive` |
    +|----------------------|-----------------------------------------------------------|---------------|
    +| `Sponsor Impression` | the placement is at least 50% visible, once per page view | `false`       |

    i think that's what EA mentioned, "as soon as it was on the screen"

    Alc-Alc Alc-Alc commented on Oct 20, 2026 16:42 UTC
    Author

    Getting ahead for a minute, but there are actions outside of code to be done from what I understand, I have sent @JacobCoffee a list of such items.

    Update:

    Goals (Sponsor Impression, Sponsor Click) and Custom properties ( sponsor and placement) is setup on Plausible
    - both goals are custom events, unscoped
    - existing displayed translation continues to stay.

    JacobCoffee JacobCoffee commented on Oct 21, 2026 18:43 UTC
    Contributor

    ive exported the EA data, working through the other steps

    JacobCoffee JacobCoffee commented on Oct 21, 2026 21:47 UTC
    Contributor

    @claude review

    claude[bot] claude[bot] commented on code on Oct 21, 2026 21:52 UTC
    Code Review
    warehouse/sponsors/tasks.py:1
    @@ -21,39 +37,66 @@ def update_pypi_sponsors(request):
         token = request.registry.settings["pythondotorg.api_token"]
         headers = {"Authorization": f"Token {token}"}
     
    -    qs = urlencode({"publisher": "pypi", "flight": "sponsors"})
    -    url = f"{host}/api/v2/sponsors/logo-placement/?{qs}"
    -    response = requests.get(url, headers=headers, timeout=5)
    -    response.raise_for_status()
    +    sponsors_placements = _fetch_placements(host, headers, "sponsors")
    +    sidebar_placements = _fetch_placements(host, headers, "sidebar")
     
         # deactivate current PSF sponsors to keep it up to date with API
         request.db.query(Sponsor).filter(Sponsor.psf_sponsor == true()).update(
             {"psf_sponsor": False}
         )
    +    # reset API-managed flags, manual sponsors keep the ones set in the admin
    +    request.db.query(Sponsor).filter(Sponsor.origin == "remote").update(
    +        {"footer": False, "sidebar": False}
    +    )
     

    🔴 Infra and one-time sponsors with origin "remote" lose admin-set footer and sidebar flags every hour, and the sync never restores them. The reset at tasks.py:48-51 filters only on Sponsor.origin == "remote". _sync_sponsor returns None for infra_sponsor or one_time before re-applying flags. Fix: leave locally-managed sponsors out of the reset, e.g. add Sponsor.infra_sponsor == false(), Sponsor.one_time == false() to the filter. That matches the skip in _sync_sponsor. Reset-then-skip only matters for a sponsor first created by the API and later flagged infra or one-time in the admin.

    <details>
    <summary>Why this was flagged</summary>

    This needs a sponsor first created by update_pypi_sponsors, which sets origin = "remote", and later marked one_time or infra_sponsor in the admin, where footer/sidebar are editable BooleanFields (warehouse/admin/views/sponsors.py:54,58). The hourly task runs the bulk update at warehouse/sponsors/tasks.py:48-51 and clears footer and sidebar on every remote row. Next, _sync_sponsor (tasks.py:83-85) returns None for that sponsor, with the comment "infra and one-time sponsors are managed locally", so neither loop sets the flags again. A one-time sponsor drops out of request.sponsors["footer"]. Any such sponsor with sidebar=True drops out of the new sidebar placement within an hour of the admin's edit. On the base branch these sponsors were skipped entirely, and flags set in the admin persisted. The PR description says manual sponsors keep their admin settings, but this filter treats locally-managed remote sponsors as API-managed.

    Verification: In warehouse/sponsors/tasks.py, lines 48-50 clear the flags on every remote row with no exclusion. _sync_sponsor (lines 86-89) then returns None before writing anything for these rows. Both loops continue on None (lines 54-56, 60-62), so the cleared flags are never set again. This is a regression from the base.

    </details>

    <!-- bhfn:1:normal -->

    claude[bot] claude[bot] commented on code on Oct 21, 2026 21:52 UTC
    Code Review
    warehouse/sponsors/__init__.py:1
    @@ -35,6 +35,7 @@ def _sponsors(request):
             "psf": [s for s in sponsors if s.psf_sponsor],
             "infrastructure": infrastructure,
             "one_time": [s for s in sponsors if s.one_time],
    +        "sidebar": [s for s in sponsors if s.sidebar],

    🔴 Sponsors that are no longer, or never were, in python.org's sidebar flight can now show up in the PyPI sidebar rotation. The new list at warehouse/sponsors/__init__.py:38 takes every active row with sidebar set, but that flag never affected display before. The sync only clears it where origin == "remote", so rows from populate-db (origin "pythondotorg") and infra sponsors keep it. Fix: clear the old flag before the sidebar goes live, e.g. a data migration that sets sidebar=False on all rows (the next sync sets the flight members again). Also make populate_db seed sidebar: False. [also at: warehouse/sponsors/tasks.py:50 - Visitors may see former or infra sponsors in the new project and organization sidebar. Old rows can still carry sidebar=True, and the hourly sync never clears them.]

    <details>
    <summary>Why this was flagged</summary>

    Before this change the sidebar column did not drive any rendering. warehouse sponsors populate-db (warehouse/cli/sponsors.py, run by Makefile:171) seeds 14 rows with "sidebar": True and "origin": "pythondotorg". They include Google (infra_sponsor: True) and former sponsors such as Slack, Corning, Latacora and Cockroach Labs. update_pypi_sponsors (tasks.py:48-51) resets sidebar only where Sponsor.origin == "remote". _sync_sponsor returns before setting origin for infra and one-time rows, and it never touches rows missing from the API. Nothing resets is_active either. So any such row that is still active keeps sidebar=True, lands in request.sponsors["sidebar"] (__init__.py:38), and is rendered by sidebar-sponsor-logo.html:6 on project and organization pages, where sponsor_controller.js picks one at random. In any dev DB built with make initdb, all 14 show up.

    Verification: Triggers when the sponsors table holds active rows with sidebar=True and an origin other than "remote", such as rows seeded by populate-db or infra sponsors. warehouse/sponsors/__init__.py:38 filters only on is_active. The reset at tasks.py:47-49 clears only rows with origin "remote", and _sync_sponsor returns None for infra_sponsor or one_time.

    </details>

    <!-- bhfn:1:normal -->

    Alc-Alc Alc-Alc commented on code on Oct 22, 2026 12:00 UTC
    Code Review
    warehouse/sponsors/__init__.py:1
    @@ -35,6 +35,7 @@ def _sponsors(request):
             "psf": [s for s in sponsors if s.psf_sponsor],
             "infrastructure": infrastructure,
             "one_time": [s for s in sponsors if s.one_time],
    +        "sidebar": [s for s in sponsors if s.sidebar],

    6515fd6bd27080bd94b1b4a01ee1d17c81c513ce

    one time migration to clear out "maybe" stale flags, the hourly job update_pypi_sponsors then sets them from python.org sponsor list.

    Manual, infra and one-time sponsors don't get their flag back automatically, an admin has to enable it.

    Alc-Alc Alc-Alc commented on code on Oct 22, 2026 12:04 UTC
    Code Review
    warehouse/sponsors/tasks.py:1
    @@ -21,39 +37,66 @@ def update_pypi_sponsors(request):
         token = request.registry.settings["pythondotorg.api_token"]
         headers = {"Authorization": f"Token {token}"}
     
    -    qs = urlencode({"publisher": "pypi", "flight": "sponsors"})
    -    url = f"{host}/api/v2/sponsors/logo-placement/?{qs}"
    -    response = requests.get(url, headers=headers, timeout=5)
    -    response.raise_for_status()
    +    sponsors_placements = _fetch_placements(host, headers, "sponsors")
    +    sidebar_placements = _fetch_placements(host, headers, "sidebar")
     
         # deactivate current PSF sponsors to keep it up to date with API
         request.db.query(Sponsor).filter(Sponsor.psf_sponsor == true()).update(
             {"psf_sponsor": False}
         )
    +    # reset API-managed flags, manual sponsors keep the ones set in the admin
    +    request.db.query(Sponsor).filter(Sponsor.origin == "remote").update(
    +        {"footer": False, "sidebar": False}
    +    )
     

    1108cda76923404e83999a96e6bc3d934b7c9d5d (test in 1a036dbd09e65775843b172a13f90a311d6ebbbd)

    the reset now skips infra and one-time sponsors (same as _sync_sponsor), so a remote sponsor later marked as infra / one-time keeps the footer and sidebar flags set in the admin.

    Alc-Alc Alc-Alc commented on Oct 22, 2026 12:10 UTC
    Author

    one (sad) side effect of the new migration is that people with seeded dev databases lose their sidebar flags after this migration. sponsors populate-db skips sponsors that already exist, so running it again does not restore them, workaround I have is to use UPDATE sponsors SET sidebar = true WHERE name IN (...). If anyone has a better idea to avoid this let me know.

    This is not an issue for anyone setting up from scratch, as make initdb runs the seed after migrations.

    nlhkabu nlhkabu commented on Oct 27, 2026 07:18 UTC
    Contributor

    @Alc-Alc can you please post some screenshots of what the different logos look like?
    Also - wlll logos always have text under?

    Alc-Alc Alc-Alc commented on Oct 27, 2026 11:50 UTC
    Author

    @Alc-Alc can you please post some screenshots of what the different logos look like?

    Here are some logos that are in my seeded data.

    <img width="280" alt="image" src="https://github.com/user-attachments/assets/cd1b73cb-84ae-41c7-b57b-afc00be47ba4" />
    <img width="280" alt="image" src="https://github.com/user-attachments/assets/43a08927-9e19-4d7a-bfd5-c0f05be34f65" />
    <img width="280" alt="image" src="https://github.com/user-attachments/assets/2532e1f4-a00d-4309-9aa3-f37cb8e37e3d" />
    <img width="280" alt="image" src="https://github.com/user-attachments/assets/01173f25-9ff6-43b9-a534-205849382a84" />
    <img width="280" alt="image" src="https://github.com/user-attachments/assets/4673b185-a3ff-43af-a78f-133b1e7d5cb0" />

    &nbsp;

    Also - wlll logos always have text under?

    Yes, they will show whatever description is returned by the API, which (I have not tested this part) depends on the "Describe as sponsor" setting in python.org admin page. If it's checked you get the "visionary sponsor" text (Nvidia / Bloomberg in above example). If not you will get custom text set by the sponsor (Google in above example).

    <img width="790" height="458" alt="image" src="https://github.com/user-attachments/assets/b24134cf-8b9d-4d11-9428-d3b2fb4ba3d4" />

    I am not sure if that can be empty in python.org itself, in which case there will be no text to display, @JacobCoffee can you please confirm this 🙂, I don't have admin page access, so had to guess this part with local setup.

    PS: If you are wondering why some sponsors (Anthropic and HRT) in my examples have no text, that is because my seed data has no text for them. In production we have an hourly job that pulls in data from python.org, so that shouldn't happen there.

    Does that answer your questions?

    JacobCoffee JacobCoffee commented on Oct 28, 2026 23:44 UTC
    Contributor

    @Alc-Alc ya empty description can come through the API, seems this PR handles it tho

    pythondotorg:apps/sponsors/api.py:59-83

    Alc-Alc Alc-Alc commented on Oct 29, 2026 05:23 UTC
    Author

    @nlhkabu can you re-review?

    nlhkabu nlhkabu commented on Oct 30, 2026 07:02 UTC
    Contributor

    Ok, just in case, can we rewrite the CSS so we have equal margins with text and without?

    Alc-Alc Alc-Alc commented on Oct 30, 2026 11:40 UTC
    Author

    Ok, just in case, can we rewrite the CSS so we have equal margins with text and without?

    Done(?) in 071a619c43a6bfe4c7be012ae6bac8487d06a1c7

    | Without text | With text |
    |---|---|
    | <img width="368" alt="image" src="https://github.com/user-attachments/assets/5db81211-09d9-4d47-aa1b-2761a51b232e" /> | <img width="368" alt="image" src="https://github.com/user-attachments/assets/799dbc10-e287-44c4-bacc-955726667ea0" />|

    nlhkabu nlhkabu approved these changes on Nov 22, 2026 07:57 UTC
    Approved Reviewer

    Approved these changes.

    Reviewers
    Assignees
    Alc-Alc Alc-Alc
    Labels
    risk: low confidence: 87% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 77.6% (HIGH) · Higher = larger blast radius
    77.6%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 87% · Lower = rushed or shallow review
    87%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 10.1% · Safe to merge
    10.1%
    Repository