Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce distribution name normalization for wheel filenames #17377

Open
di opened this issue Jan 9, 2025 · 2 comments
Open

Enforce distribution name normalization for wheel filenames #17377

di opened this issue Jan 9, 2025 · 2 comments
Labels
blocked Issues we can't or shouldn't get to yet feature request

Comments

@di
Copy link
Member

di commented Jan 9, 2025

In pypa/packaging.python.org#1032 it was resolved that distribution names in wheel filenames should be lowercased per PEP 503, and the binary distribution format spec was updated, but we never began enforcing this.

Similar to #12245, we should warn on upload during a deprecation period before eventually blocking uploads.

Currently usage is very low:

warehouse=> SELECT DATE(time) AS day, COUNT(additional->>'filename') AS file_count
FROM file_events
WHERE additional->>'filename' ~ '[A-Z]'
  AND additional->>'filename' LIKE '%.whl'
  AND time >= (CURRENT_DATE - INTERVAL '30 days')
GROUP BY day
ORDER BY day DESC;
    day     | file_count
------------+------------
 2025-01-09 |        197
 2025-01-08 |        309
 2025-01-07 |        394
 2025-01-06 |        292
 2025-01-05 |        188
 2025-01-04 |        265
 2025-01-03 |        463
 2025-01-02 |        290
 2025-01-01 |        136
 2024-12-31 |        329
 2024-12-30 |        199
 2024-12-29 |        222
 2024-12-28 |        170
 2024-12-27 |        306
 2024-12-26 |        271
 2024-12-25 |        111
 2024-12-24 |        275
 2024-12-23 |        245
 2024-12-22 |        209
 2024-12-21 |        131
 2024-12-20 |        329
 2024-12-19 |        292
 2024-12-18 |        309
 2024-12-17 |        499
 2024-12-16 |        406
 2024-12-15 |        179
 2024-12-14 |        200
 2024-12-13 |        577
 2024-12-12 |        406
 2024-12-11 |        303
 2024-12-10 |        408
(31 rows)

Ref: parent issue #12316.

@di
Copy link
Member Author

di commented Feb 13, 2025

Update: pypa/setuptools#4766 is merged but not yet released, this is blocked on a new setuptools release.

@di
Copy link
Member Author

di commented Feb 28, 2025

Pretty good dropoff here since pypa/setuptools#4766 was released:

warehouse=> SELECT DATE(time) AS day, COUNT(additional->>'filename') AS file_count
FROM file_events
WHERE additional->>'filename' ~ '[A-Z]'
  AND additional->>'filename' LIKE '%.whl'
  AND time >= (CURRENT_DATE - INTERVAL '30 days')
GROUP BY day
ORDER BY day DESC;
    day     | file_count
------------+------------
 2025-02-28 |          1
 2025-02-27 |         99
 2025-02-26 |         98
 2025-02-25 |        251
 2025-02-24 |        366
 2025-02-23 |        152
 2025-02-22 |        201
 2025-02-21 |        414
 2025-02-20 |        380
 2025-02-19 |        389
 2025-02-18 |        441
 2025-02-17 |        465
 2025-02-16 |        259
 2025-02-15 |        201
 2025-02-14 |        231
 2025-02-13 |        404
 2025-02-12 |        447
 2025-02-11 |        435
 2025-02-10 |        300
 2025-02-09 |        207
 2025-02-08 |        197
 2025-02-07 |        518
 2025-02-06 |        409
 2025-02-05 |        371
 2025-02-04 |        260
 2025-02-03 |        365
 2025-02-02 |        296
 2025-02-01 |        198
 2025-01-31 |        274
 2025-01-30 |        273
 2025-01-29 |        286
(31 rows)

I think we're good to start sending notifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Issues we can't or shouldn't get to yet feature request
Projects
None yet
Development

No branches or pull requests

1 participant