-
Notifications
You must be signed in to change notification settings - Fork 986
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
Fully implement PEP 527 #6792
Comments
IMO we should also push these projects to drop usage of the legacy formats, and if not, at least get a good understanding if the issue is a "the current toolchain doesn't satisfy workflows like the legacy formats" or "oh, we don't need it" or something else entirely. |
How long is the list? If not too long, let's create issues at these projects, it's likely they're not aware of the deprecation. I'd expect many are already using wheels and can ditch the legacy formats. For example with Pillow, I didn't know they were deprecated until it came up at https://discuss.python.org/t/deprecate-bdist-wininst/1929/12?u=hugovk, and we already distribute wheels so it was "oh, we don't need it". And how about adding a deprecation warning to Twine when uploading them? |
IIRC the "list" was any project that had previously uploaded one of these filetypes, essentially we only blocked new projects. A better list would be every project that has this ability that has actually published one of these filetypes in the last I'm guessing that this list is short enough that adding a deprecation notice to Twine would be unnecessary, but hard to say until we actually make an audit. |
There are currently 4,678 projects that have
Recent uploads for individual deprecated filetypes:
|
Thanks. From the PEP's removal process:
Would now be a good time to send out the email? And to just bdist_dmg, bdist_msi, and bdist_rpm users first, or to all legacy format users? |
ooooh! Nice find @hugovk! ^>^ I'm in favor of dropping all legacy formats if the PEP has a clear mechanism to do so. |
I don't really think it's necessary to email all 4,678 projects when only a small fraction have actually used their legacy flag recently. Perhaps we should set a timeframe instead: if they've uploaded a deprecated distribution type in the last year? |
This comment has been minimized.
This comment has been minimized.
Yes, that sound reasonable. |
Gentle nudge on this, given https://discuss.python.org/t/3115. |
OK, next steps would be:
Would anyone like to help with #3? |
|
OK, I've sent the notices to everyone that's uploaded one of these packages in the last year. The shutoff date is 30 days from today (2020-04-12). For posterity, here's the SQL script I used to generate the affected users/projects: SELECT
user_id,
projects.name as project_name,
packagetype
FROM
(
SELECT
roles.user_id as user_id,
roles.project_id as project_id,
packagetype
FROM
(
SELECT
project_id,
packagetype
FROM
(
SELECT
release_id,
packagetype
FROM
release_files
WHERE
(
packagetype IN (
'bdist_dmg', 'bdist_dumb', 'bdist_msi',
'bdist_rpm', 'bdist_wininst'
)
AND "upload_time" > (
localtimestamp - interval '365 days'
)
)
GROUP BY
release_id,
packagetype
) f
JOIN releases ON releases.id = f.release_id
GROUP BY
project_id,
packagetype
) release
JOIN roles ON release.project_id = roles.project_id
GROUP BY
user_id,
roles.project_id,
packagetype
) p1
JOIN projects ON p1.project_id = projects.id; Ran that like so:
Then used the following script to turn that output into a CSV of mass emails: import csv
from collections import defaultdict
users = defaultdict(list)
subject = "[PyPI] Notice: Deprecation of underused file types/extensions"
body_template = """
Hello,
We're emailing because you're listed as a maintainer or owner for a package that has uploaded a legacy file type to PyPI in the past year:
{project_list}
Following PEP 527, it will soon not be possible to upload legacy file types.
https://www.python.org/dev/peps/pep-0527/
This restriction will apply to new uploads after 30 days from today (2020-04-12). Existing uploads will remain on PyPI, but soon new ones cannot be uploaded.
See PEP 527 for suggestions of replacement file types, and if you have any questions, please comment on the tracking issue for this deprecation:
https://github.com/pypa/warehouse/issues/6792
Thank you,
The PyPI Administrators
"""
with open("pep527.csv") as f:
reader = csv.DictReader(f)
for row in reader:
users[row["user_id"]].append((row["project_name"], row["packagetype"]))
with open("pep527-complete.csv", "w") as f:
writer = csv.DictWriter(f, fieldnames=["user_id", "subject", "body_text"])
writer.writeheader()
for user_id, projects in users.items():
project_list = "\n".join(
f"* Project: {project_name}, package type: {packagetype}"
for project_name, packagetype in projects
)
writer.writerow(
{
"user_id": user_id,
"subject": subject,
"body_text": body_template.format(project_list=project_list),
}
) |
Fully implemented via pypi/warehouse#6792
Fully implemented via pypi/warehouse#6792
Fully implemented via pypi/warehouse#6792
Fully implemented via pypi/warehouse#6792
We still retain the ability for some projects to upload the legacy filetypes listed in PEP 527:
https://github.com/pypa/warehouse/blob/aa0d54019c322b52cb6428780808816d417abbd1/warehouse/packaging/models.py#L124
https://github.com/pypa/warehouse/blob/e1d0e4e41738fd07a0edeb77f95fedba0fdd41f8/warehouse/forklift/legacy.py#L463-L480
https://github.com/pypa/warehouse/blob/e1d0e4e41738fd07a0edeb77f95fedba0fdd41f8/warehouse/forklift/legacy.py#L1167-L1174
We should audit which projects currently have this ability, and whether they are still publishing deprecated filetypes. For example, Pillow is no longer publishing
bdist_wininst
files.The text was updated successfully, but these errors were encountered: