Skip to content

Commit 69ce3dd

Browse files
dstufftdinlhkabupradyunsg
authored
Implement PEP 592: Yanked Releases (#5838)
* Remove an outdated comment * Add Release.yanked to the database model * Emit the data-yanked attribute in the simple api * Initial work on a UI for yanking releases * Update down_revision on migration * Remove z-index for callout-block As is, this makes a callout with a higher modifier appear over a modal with a lower modifier. * Add ability to specify modifier when creating a confirm_button or confirm_modal * Update copy * Switch to boolean column * Support yanking/unyanking in the UI * Filter out yanked releases * Tests * Updates from #7689 * Update icon and copy * Update un-yank icon as well * Update migration * Update email templates to remove translations * Only reindex non-yanked releases * Don't filter yanked releases from JSON API * Show yanked status in JSON API * Don't filter yanked releases This allows yanked releases to show up in the UI with the exception of: * Project.latest_version will not return a yanked release as the latest * The project detail page will not show a yanked release as the latest * /pypi/<project_name>/json will not use a yanked release as the latest * Search reindexing will not include yanked releases * Only show 'Releases' header when there are releases * Show badge for yanked release * Add warning label on detail page for yanked releases * Add help section on yanked releases * Update PEP number on help page * Update tests * Update conditional in simple/detail.html * Apply suggestions from code review Co-Authored-By: Pradyun Gedam <[email protected]> * Update translations * Update migration * Add missing commas Co-authored-by: Dustin Ingram <[email protected]> Co-authored-by: Nicole Harris <[email protected]> Co-authored-by: Pradyun Gedam <[email protected]>
1 parent 8982d00 commit 69ce3dd

File tree

27 files changed

+1830
-486
lines changed

27 files changed

+1830
-486
lines changed

docs/api-reference/json.rst

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ Project
7272
"requires_dist": null,
7373
"requires_python": null,
7474
"summary": "A sample Python project",
75-
"version": "1.2.0"
75+
"version": "1.2.0",
76+
"yanked": false
7677
},
7778
"last_serial": 1591652,
7879
"releases": {
@@ -92,7 +93,8 @@ Project
9293
"python_version": "2.7",
9394
"size": 3795,
9495
"upload_time_iso_8601": "2015-06-14T14:38:05.093750Z",
95-
"url": "https://files.pythonhosted.org/packages/30/52/547eb3719d0e872bdd6fe3ab60cef92596f95262e925e1943f68f840df88/sampleproject-1.2.0-py2.py3-none-any.whl"
96+
"url": "https://files.pythonhosted.org/packages/30/52/547eb3719d0e872bdd6fe3ab60cef92596f95262e925e1943f68f840df88/sampleproject-1.2.0-py2.py3-none-any.whl",
97+
"yanked": false
9698
},
9799
{
98100
"comment_text": "",
@@ -108,7 +110,8 @@ Project
108110
"python_version": "source",
109111
"size": 3148,
110112
"upload_time_iso_8601": "2015-06-14T14:37:56Z",
111-
"url": "https://files.pythonhosted.org/packages/eb/45/79be82bdeafcecb9dca474cad4003e32ef8e4a0dec6abbd4145ccb02abe1/sampleproject-1.2.0.tar.gz"
113+
"url": "https://files.pythonhosted.org/packages/eb/45/79be82bdeafcecb9dca474cad4003e32ef8e4a0dec6abbd4145ccb02abe1/sampleproject-1.2.0.tar.gz",
114+
"yanked": false
112115
}
113116
]
114117
},
@@ -127,7 +130,8 @@ Project
127130
"python_version": "2.7",
128131
"size": 3795,
129132
"upload_time_iso_8601": "2015-06-14T14:38:05.234526",
130-
"url": "https://files.pythonhosted.org/packages/30/52/547eb3719d0e872bdd6fe3ab60cef92596f95262e925e1943f68f840df88/sampleproject-1.2.0-py2.py3-none-any.whl"
133+
"url": "https://files.pythonhosted.org/packages/30/52/547eb3719d0e872bdd6fe3ab60cef92596f95262e925e1943f68f840df88/sampleproject-1.2.0-py2.py3-none-any.whl",
134+
"yanked": false
131135
},
132136
{
133137
"comment_text": "",
@@ -143,7 +147,8 @@ Project
143147
"python_version": "source",
144148
"size": 3148,
145149
"upload_time_iso_8601": "2015-06-14T14:37:56.000001Z",
146-
"url": "https://files.pythonhosted.org/packages/eb/45/79be82bdeafcecb9dca474cad4003e32ef8e4a0dec6abbd4145ccb02abe1/sampleproject-1.2.0.tar.gz"
150+
"url": "https://files.pythonhosted.org/packages/eb/45/79be82bdeafcecb9dca474cad4003e32ef8e4a0dec6abbd4145ccb02abe1/sampleproject-1.2.0.tar.gz",
151+
"yanked": false
147152
}
148153
]
149154
}
@@ -201,7 +206,8 @@ Release
201206
"requires_dist": null,
202207
"requires_python": null,
203208
"summary": "",
204-
"version": "1.0"
209+
"version": "1.0",
210+
"yanked": false
205211
},
206212
"last_serial": 1591652,
207213
"releases": {
@@ -221,7 +227,8 @@ Release
221227
"python_version": "2.7",
222228
"size": 3795,
223229
"upload_time_iso_8601": "2015-06-14T14:38:05.869374Z",
224-
"url": "https://files.pythonhosted.org/packages/30/52/547eb3719d0e872bdd6fe3ab60cef92596f95262e925e1943f68f840df88/sampleproject-1.2.0-py2.py3-none-any.whl"
230+
"url": "https://files.pythonhosted.org/packages/30/52/547eb3719d0e872bdd6fe3ab60cef92596f95262e925e1943f68f840df88/sampleproject-1.2.0-py2.py3-none-any.whl",
231+
"yanked": false
225232
},
226233
{
227234
"comment_text": "",
@@ -237,7 +244,8 @@ Release
237244
"python_version": "source",
238245
"size": 3148,
239246
"upload_time_iso_8601": "2015-06-14T14:37:56.394783Z",
240-
"url": "https://files.pythonhosted.org/packages/eb/45/79be82bdeafcecb9dca474cad4003e32ef8e4a0dec6abbd4145ccb02abe1/sampleproject-1.2.0.tar.gz"
247+
"url": "https://files.pythonhosted.org/packages/eb/45/79be82bdeafcecb9dca474cad4003e32ef8e4a0dec6abbd4145ccb02abe1/sampleproject-1.2.0.tar.gz",
248+
"yanked": false
241249
}
242250
]
243251
},

0 commit comments

Comments
 (0)