-
Notifications
You must be signed in to change notification settings - Fork 938
/
release.html
217 lines (205 loc) · 12.8 KB
/
release.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
{#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-#}
{% extends "manage_project_base.html" %}
{% set active_tab = 'releases' %}
{% block title %}{% trans project_name=project.name, version=release.version %}Manage '{{ project_name }}' – release version {{ version }}{% endtrans %}{% endblock %}
{% block breadcrumb %}
<li class="breadcrumbs__breadcrumb">
<a href="{{ request.route_path('manage.project.releases', project_name=project.normalized_name) }}">
<i class="fa fa-cubes" aria-hidden="true"></i>
{{ project.name }}
</a>
</li>
<li class="breadcrumbs__breadcrumb">
{% trans version=release.version %}Version {{ version }}{% endtrans %}
</li>
{% endblock %}
{% block main %}
<div class="heading-wsubtitle heading-wsubtitle--in-content">
<h2 class="heading-wsubtitle__heading">
{% if not release.yanked %}
{% set releases = project.releases|rejectattr("yanked")|list %}
<a href="{{ request.route_path('manage.project.releases', project_name=project.normalized_name)}}">{% trans %}Releases{% endtrans %}</a>
<span class="badge badge--neutral">{{ releases|length }}</span>
{% else %}
{% set yanked_releases = project.releases|selectattr("yanked")|list %}
<a href="{{ request.route_path('manage.project.releases', project_name=project.normalized_name)}}">{% trans %}Yanked releases{% endtrans %}</a>
<span class="badge badge--neutral">{{ yanked_releases|length }}</span>
{% endif %}
</h2>
<h3 class="heading-wsubtitle__subtitle">
<strong>{% trans version=release.version %}Version {{ version }}{% endtrans %}</strong> —
<a href="{{ request.route_path('packaging.release', name=release.project.name, version=release.version) }}">{% trans %}view release{% endtrans %}</a>
</h3>
</div>
{% if files %}
<table class="table table--files">
<caption class="sr-only">{% trans version=release.version, project_name=project.name %}Files for release {{ version }} of {{ project_name }}{% endtrans %}</caption>
<thead>
<tr>
<th scope="col">{% trans %}Filename, size{% endtrans %}</th>
<th scope="col">{% trans %}Type{% endtrans %}</th>
<th scope="col">{% trans %}Python version{% endtrans %}</th>
<th scope="col">{% trans %}Upload date{% endtrans %}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for file in files %}
<tr>
<th scope="row">
<span class="table__mobile-label">{% trans %}Filename, size{% endtrans %}</span>
<a href="{{ request.route_url('packaging.file', path=file.path) }}">{{ file.filename }}</a>
{% if file.size %}({{ file.size|filesizeformat() }}){% endif %}<br>
</th>
<td>
<span class="table__mobile-label">{% trans %}Type{% endtrans %}</span>
{{ file.packagetype|format_package_type }}
</td>
<td>
<span class="table__mobile-label">{% trans %}Python version{% endtrans %}</span>
{{ file.python_version if file.python_version != 'source' else gettext('None') }}
</td>
<td>
<span class="table__mobile-label">{% trans %}Upload date{% endtrans %}</span>
{{ humanize(file.upload_time) }}
</td>
<td class="table__align-right">
<nav class="dropdown dropdown--with-icons">
<button type="button" class="button button--primary dropdown__trigger" aria-haspopup="true" aria-expanded="false" aria-label="{% trans %}View file options{% endtrans %}">
{% trans %}Options{% endtrans %}
<span class="dropdown__trigger-caret">
<i class="fa fa-caret-down" aria-hidden="true"></i>
</span>
</button>
<ul class="dropdown__content" aria-hidden="true" aria-label="{% trans %}File options{% endtrans %}">
<li>
<a href="{{ request.route_url('packaging.file', path=file.path) }}" class="dropdown__link">
<i class="fa fa-download" aria-hidden="true"></i>
{% trans %}Download{% endtrans %}
</a>
</li>
<li>
<a href="#copy-hash-modal-{{ file.id }}" class="dropdown__link">
<i class="fa fa-hashtag" aria-hidden="true"></i>
{% trans %}View Hashes{% endtrans %}
</a>
</li>
<li>
{% set title = gettext("Delete file from") %}
{% set confirm_name = "delete_file_from" %}
{% set confirm_button_label = gettext("Delete file") %}
{% set slug = confirm_name.lower().replace(' ', '-') + '-modal-{}'.format(loop.index) %}
<a href="#{{ slug }}" class="dropdown__link">
<i class="fa fa-trash-alt" aria-hidden="true"></i>
{% trans %}Delete{% endtrans %}
</a>
{% set extra_fields %}
<input name="file_id" type="hidden" value="{{ file.id }}">
{% endset %}
{% set extra_description %}
<p><strong>{% trans %}Filename:{% endtrans %}</strong> {{ file.filename }}</p>
<ul class="no-bullets no-left-margin">
<li class="margin-bottom"><input class="inline-checkbox" type="checkbox" data-action="input->confirm#check" data-confirm-target="checkbox"> {% trans %}I understand that my users will no longer be able to install this file for this release of this project.{% endtrans %}</li>
<li class="margin-bottom"><input class="inline-checkbox" type="checkbox" data-action="input->confirm#check" data-confirm-target="checkbox"> {% trans filename=file.filename, href="https://pypi.org/help/#file-name-reuse" %}I understand that I will <a href={{ href }} target="_blank" rel="noopener">not be able to re-upload a file using the same file name</a> {{ filename }}.{% endtrans %}</li>
<li class="margin-bottom"><input class="inline-checkbox" type="checkbox" data-action="input->confirm#check" data-confirm-target="checkbox"> {% trans %}I understand that I will not be able to undo this.{% endtrans %}</li>
<li><input class="inline-checkbox" type="checkbox" data-action="input->confirm#check" data-confirm-target="checkbox"> {% trans %}I understand that the PyPI administrators will not be able to undo this.{% endtrans %}</li>
</ul>
{% endset %}
</li>
</ul>
</nav>
{{ confirm_modal(title, gettext("Project name"), "project_name", project.name, slug, confirm_button_label=confirm_button_label, extra_fields=extra_fields, extra_description=extra_description) }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<div class="callout-block" data-controller="dismissable" data-dismissable-identifier="uploading">
{% if files %}
<h3>{% trans %}Uploading new files{% endtrans %}</h3>
{% else %}
<h3>{% trans %}No files found{% endtrans %}</h3>
{% endif %}
<button type="button" title="{% trans %}Dismiss{% endtrans %}" data-action="click->dismissable#dismiss" class="callout-block__dismiss" aria-label="{% trans %}Close{% endtrans %}"><i class="fa fa-times" aria-hidden="true"></i></button>
<p>{% trans href='https://packaging.python.org/guides/distributing-packages-using-setuptools/#uploading-your-project-to-pypi', title=gettext('External link') %}Learn how to upload files on the <a href="{{ href }}" title="{{ title }}" target="_blank" rel="noopener">Python Packaging User Guide</a>{% endtrans %}</p>
</div>
<h3>{% trans %}Release settings{% endtrans %}</h3>
{% if not release.yanked %}
<div class="callout-block callout-block">
<h3>{% trans %}Yank release{% endtrans %}</h3>
<p>
{% if files %}
{% trans count=files|length %}
Yanking will mark this release (and {{ count }} file within it) to be ignored when installing in most common scenarios.
{% pluralize %}
Yanking will mark this release (and {{ count }} files within it) to be ignored when installing in most common scenarios.
{% endtrans %}
{% else %}
{% trans %}
Yanking will mark this release to be ignored when installing in most common scenarios.
{% endtrans %}
{% endif %}
{% trans project_name=project.name, version=release.version %}
This release will still be installable for users pinning to this exact version, e.g. when using <code>{{ project_name }}=={{ version }}</code>.
{% endtrans %}
{% trans href="https://www.python.org/dev/peps/pep-0592/" %}
For more information, see <a href="{{ href }}">PEP 592</a>.
{% endtrans %}
</p>
{% set extra_description %}
<p>
{% trans project_name=project.name, version=release.version %}
You may provide a reason for yanking this release, which will be displayed by pip to users who install <code>{{ project_name }}=={{ version }}</code>.
{% endtrans %}
</p>
<label for="yanked_reason">{% trans %}Reason (optional){% endtrans %}</label>
<input name="yanked_reason" id="yanked_reason" type="text" autocomplete="off" autocapitalize="off" spellcheck="false">
{% endset %}
{{ confirm_button(gettext("Yank release"), gettext("Version"), "yank_version", release.version, modifier="--primary", warning=False, extra_description=extra_description) }}
</div>
{% endif %}
<div class="callout-block callout-block--danger" data-controller="delete-confirm">
<h3>{% trans %}Delete release{% endtrans %}</h3>
<p>
<i class="fa fa-exclamation-triangle" aria-hidden="true"><span class="sr-only">{% trans %}Warning{% endtrans %}</span></i>
{% if files %}
{% trans count=files|length %}
Deleting will irreversibly delete this release along with {{ count }} file.
{% pluralize %}
Deleting will irreversibly delete this release along with {{ count }} files.
{% endtrans %}
{% else %}
{% trans %}Deleting will irreversibly delete this release.{% endtrans %}
{% endif %}
<p>{% trans %}You will not be able to re-upload a new distribution of the same type with the same version number.{% endtrans %}</p>
<p>{% trans %}Deletion will break any downstream projects relying on a pinned version of this package. It is intended as a last resort to address legal issues or remove harmful releases.{% endtrans %}</p>
<p>{% trans yank_href=request.help_url(_anchor='yanked'), post_href='https://www.python.org/dev/peps/pep-0440/#post-releases', title=gettext('External link') %}Consider <a href="{{ yank_href }}" title="{{ title }}" target="_blank" rel="noopener">yanking</a> this release, making a new release or a <a href="{{ post_href }}" title="{{ title }}" target="_blank" rel="noopener">post release</a> instead.{% endtrans %}</p>
<ul class="no-bullets">
<li><input type="checkbox" data-action="input->delete-confirm#check" data-delete-confirm-target="input"> {% trans release_version=release.version %}I understand that I am permanently deleting all files for the {{ release_version }} release of this project.{% endtrans %}</li>
<li><input type="checkbox" data-action="input->delete-confirm#check" data-delete-confirm-target="input"> {% trans %}I understand that my users will no longer be able to install this release of this project.{% endtrans %}</li>
<li><input type="checkbox" data-action="input->delete-confirm#check" data-delete-confirm-target="input"> {% trans href="https://pypi.org/help/#file-name-reuse" %}I understand that I will <a href="{{ href }}" target="_blank" rel="noopener">not be able to re-upload any deleted files using the same file names</a>.{% endtrans %}</li>
<li><input type="checkbox" data-action="input->delete-confirm#check" data-delete-confirm-target="input"> {% trans %}I understand that I will not be able to undo this.{% endtrans %}</li>
<li><input type="checkbox" data-action="input->delete-confirm#check" data-delete-confirm-target="input"> {% trans %}I understand that the PyPI administrators will not be able to undo this.{% endtrans %}</li>
</ul>
</p>
{{ confirm_button(gettext("Delete release"), gettext("Version"), "delete_version", release.version, additional_attributes="data-delete-confirm-target=button") }}
</div>
{% if files %}
{% for file in files %}
{% include "warehouse:templates/includes/hash-modal.html" %}
{% endfor %}
{% endif %}
{% endblock %}