Skip to content

Commit

Permalink
Merge branch 'fix/pypigh-2284-duplicate-file-check' of github.com:ben…
Browse files Browse the repository at this point in the history
…jaminws/warehouse into fix/pypigh-2284-duplicate-file-check
  • Loading branch information
benjaminws committed Sep 22, 2017
2 parents 5f38c65 + eaaa283 commit 86ad2a4
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 27 deletions.
38 changes: 19 additions & 19 deletions requirements/main.txt
Expand Up @@ -69,9 +69,9 @@ bleach==2.0.0 \
boto3==1.4.7 \
--hash=sha256:38057b066990172ce6ebbf2a5e046a545503793581fcf14cab0e3821c6112eb0 \
--hash=sha256:f79f77dca2280f7780f39d72a5088f4cf2b626c0921e7185ed6ac17abfdd7e6c
botocore==1.7.12 \
--hash=sha256:7d8b096d0ec5bb6a1e510f6568b5b8d5994ee1bed85d4fd506b9c29b6d2d21a3 \
--hash=sha256:bd6fec357bc6c1d17a68a98c1ba0453e9d80c2dbd90fa2c50ab4b1cf099a6ce0
botocore==1.7.16 \
--hash=sha256:e161a5dad993e8145a10da1da91cdb8c0909397deef170c1dda2ae27b3589889 \
--hash=sha256:559e72edf0a7b4edb2366fd51edf7abf7a35e6168061448dd17af26124d7bf45
cachetools==2.0.1 \
--hash=sha256:4319bbb78172e7bcf99423e1ecd6914b32336ccfe97d2058ffe62e641a7f3abe \
--hash=sha256:ede01f2d3cbd6ddc9e35e16c2b0ce011d8bb70ce0dbaf282f5b4df24b213bc5d
Expand Down Expand Up @@ -140,9 +140,9 @@ elasticsearch==5.4.0 \
first==2.0.1 \
--hash=sha256:3bb3de3582cb27071cfb514f00ed784dc444b7f96dc21e140de65fe00585c95e \
--hash=sha256:41d5b64e70507d0c3ca742d68010a76060eea8a3d863e9b5130ab11a4a91aa0e
google-auth==1.1.0 \
--hash=sha256:b58854369859fc5cdc6b715205bc4d47af27e39db08564a2b675cde68b2a2c67 \
--hash=sha256:3aca3b909477a60efc1150ead3a42ff6734365f24d121d258924fdce467f17c5
google-auth==1.1.1 \
--hash=sha256:434b66a162880527917c013a55346541ed374e1acece8d4a28442e19f7a98b7e \
--hash=sha256:e00236a914906409367e96fdcf5c08aaca3ab5bd3aab0c5c5ea9255162640215
google-cloud-bigquery==0.27.0 \
--hash=sha256:ad86defd25dcb704200e50b3950ade85f4e7fba6d8c209c12f5cd1d46ddffa9b \
--hash=sha256:d12550f7bd54cb89ed026f0fd8ac3bc9b6cab9e3ff67f7310b149cca8e4ba5ad
Expand Down Expand Up @@ -282,19 +282,19 @@ pyasn1-modules==0.1.4 \
--hash=sha256:beb3d344fee1fa68ddf36471c5d9120665ba049900d7fccbffa50c77036581de \
--hash=sha256:7930d0f6109a47f78e5fb88a4f7ed2bfa1073ec9ddb2657deffa92f0805568fb \
--hash=sha256:b07c17bdb34d6f64aafea6269f2e8fb306a57473f0f38d9a6ca389d6ab30ac4a
pyasn1==0.3.5 \
--hash=sha256:e6b50655fe2f223474d35a6f239e87ebd1b783c0a9e43d05dff3d771ee05d1b6 \
--hash=sha256:5f90830476394e38867601857be7ea4c967415af55fd1a616771faa9bb10a5c6 \
--hash=sha256:0aa9dc0191a975766cc990e6e85496771ce156b4dccfcfd6ee454b4e356b4b31 \
--hash=sha256:3023f8962fd795263fc2805c4820c361a63d77f3a258cacca7d3c3f5c2f5abe2 \
--hash=sha256:90a6dfe991beb1f6240bc19e9fda02f513517523e3b96474a0887a94022dbad0 \
--hash=sha256:361074cd3043952f711c922f44f682cc70c11150a86883a9aa26df0396cba60e \
--hash=sha256:a9b8be314d3251eafe99f14ee2f5431a2df1de0f214016df1e3da39fa6b60b3f \
--hash=sha256:f43ecf2c7be7f12587e1ae12a4268844e8e3768ac0f899ac5e7521c85cca9605 \
--hash=sha256:d5baeb3fd09ce453fb71920bd775d06980b9e9311fa719deda40c32ad470699e \
--hash=sha256:4bb4d3b5802b74601c85ebf141da7ee27572bc13db7d5c30bef45322942d284a \
--hash=sha256:817cf5b54f1c95699ae72bc1c1957d7b3d3695c795673a26e04892052078b1d8 \
--hash=sha256:c7a1186416bcdaf19b56f5b2506200306d7d4cf222d3d7c2d4cb600ccacdaf1b
pyasn1==0.3.6 \
--hash=sha256:a1b5e7fb8ee082217576ac2e91ad2b5e4c590277fbe86b197b447424e7472f13 \
--hash=sha256:72540e4846b0e1f659723558f63a62abe7106becb6ebb35c05b5f7803caa53e8 \
--hash=sha256:686f0cbfa3f3587ab29a7e6477a587f4e72d74e6f5d8b8a14de7e47a53f2b345 \
--hash=sha256:6f318b30b5592d2f69acb06ea79f557e01ee0acab9a83a0f3cf1747f637df550 \
--hash=sha256:06afc633971ab80943f06b96d3d6314f461001c92418fc0cd682a8357a1db47f \
--hash=sha256:ac60ffbd5d2d3f9aeb7c73938526c4141da849dd57a7e1084864324aed9eb986 \
--hash=sha256:fc6fec92d096b24aabd6f241817af14dabddbd5f3aef6c78f849614e6073bb7d \
--hash=sha256:4dd57f10fd90ac5e2da7fcbb08ba9d88acb1ab8b1ffa532b6934ae30b2dcdbe5 \
--hash=sha256:5b1822324613a02a064a8baebbed02afbff1b9077ab5b761d6424c762c4f3de4 \
--hash=sha256:bbc702abbec2da12eb726f9d534296bb2ad90fa1be977a0214ce157cede5eb26 \
--hash=sha256:325b55a20bf9648ee9400a18aa8b13f6073e0d3057fc77b9778b743f27ccce8b \
--hash=sha256:f0380ea97db0ede095a0dd87ce3003d46c197191f924206e43f776fc77e51f09
pycparser==2.18 \
--hash=sha256:99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226
Pygments==2.2.0 \
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/test_basic.py
Expand Up @@ -53,6 +53,6 @@ def test_indicator_shows_not_logged_in(self, server_url, browser):
for a in document.findall(".//nav[@id='user-indicator']/a")
]
assert urls == ["/help/",
"https://donate.pypi.io",
"https://donate.pypi.org",
"/account/login/",
"/account/register/"]
4 changes: 4 additions & 0 deletions tests/unit/forklift/test_legacy.py
Expand Up @@ -1565,11 +1565,15 @@ def test_upload_fails_with_unsafe_filename(self, pyramid_config,
def test_upload_fails_without_permission(self, pyramid_config, db_request):
pyramid_config.testing_securitypolicy(userid=1, permissive=False)

user1 = UserFactory.create()
user2 = UserFactory.create()
project = ProjectFactory.create()
release = ReleaseFactory.create(project=project, version="1.0")
RoleFactory.create(user=user1, project=project)

filename = "{}-{}.tar.wat".format(project.name, release.version)

db_request.user = user2
db_request.POST = MultiDict({
"metadata_version": "1.2",
"name": project.name,
Expand Down
4 changes: 2 additions & 2 deletions warehouse/forklift/legacy.py
Expand Up @@ -722,9 +722,9 @@ def file_upload(request):
if not request.has_permission("upload", project):
raise _exc_with_message(
HTTPForbidden,
("You are not allowed to upload to {!r}. "
("The user '{0}' is not allowed to upload to project '{1}'. "
"See https://pypi.org/help#project-name for more information.")
.format(project.name)
.format(request.user.username, project.name)
)

try:
Expand Down
2 changes: 1 addition & 1 deletion warehouse/templates/accounts/macros.html
Expand Up @@ -20,7 +20,7 @@ <h2>{{ current_title }}</h2>
We're currently working on making the logged in pages on PyPI better.
If you'd like to see this happen sooner, please consider
<a href="https://warehouse.readthedocs.io/development/getting-started/">contributing to Warehouse</a>,
or <a href="https://donate.pypi.io/">making a donation</a> (or asking
or <a href="https://donate.pypi.org/">making a donation</a> (or asking
your company to make a donation) towards the ongoing development of the Warehouse project.
</p>
<p>
Expand Down
6 changes: 4 additions & 2 deletions warehouse/templates/base.html
Expand Up @@ -87,7 +87,7 @@
{% endblock %}

<div class="notification-bar">
<span class="notification-bar__message">Help us improve Python packaging - <a href="https://donate.pypi.io">Donate today!</a></span>
<span class="notification-bar__message">Help us improve Python packaging - <a href="https://donate.pypi.org">Donate today!</a></span>
</div>

<header class="site-header">
Expand All @@ -103,6 +103,7 @@
<div role="search">
<label for="search" class="sr-only">Search PyPI</label>
<input id="search" class="search-form__search" type="text" name="q" placeholder="Search Projects" value="{{ term }}">
{%- block search_form_extra_inputs %}{% endblock %}
<input class="search-form__button button button--dark" type="submit" value="Search">
</div>
</form>
Expand All @@ -121,6 +122,7 @@
<div role="search">
<label for="mobile-search" class="sr-only">Search PyPI</label>
<input id="mobile-search" class="search-form__search" type="text" name="q" placeholder="Search Projects">
{{ self.search_form_extra_inputs() }}
<button class="search-form__button button button--dark" type="submit">
<span class="button__icon">
<i class="fa fa-search" aria-hidden="true"></i>
Expand Down Expand Up @@ -178,7 +180,7 @@ <h3>Contributing to PyPI</h3>
<p>
Developed and maintained by the Python community, for the Python community.
<br>
<a href="https://donate.pypi.io">Donate Today!</a>
<a href="https://donate.pypi.org">Donate Today!</a>
</p>
<p>© {{ now()|format_date('yyyy') }} Python Software Foundation. <a href="{{ request.route_path('policy.terms-of-use') }}">Terms of Use</a></p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions warehouse/templates/includes/current-user-indicator.html
Expand Up @@ -37,7 +37,7 @@
<i class="fa fa-question-circle" aria-hidden="true"></i>
Get Help
</a>
<a class="dropdown__link" href="https://donate.pypi.io">
<a class="dropdown__link" href="https://donate.pypi.org">
<i class="fa fa-heart" aria-hidden="true"></i>
Donate
</a>
Expand All @@ -54,7 +54,7 @@
{% else %}
<nav id="user-indicator" class="horizontal-menu horizontal-menu--light horizontal-menu--tall">
<a class="horizontal-menu__link horizontal-menu__link--remove-on-mobile" href="{{ request.route_path('help') }}">Help</a>
<a class="horizontal-menu__link horizontal-menu__link--remove-on-mobile" href="https://donate.pypi.io">Donate</a>
<a class="horizontal-menu__link horizontal-menu__link--remove-on-mobile" href="https://donate.pypi.org">Donate</a>
<a class="horizontal-menu__link" href="{{ request.route_path('accounts.login') }}">Login</a>
<a class="horizontal-menu__link" href="{{ request.route_path('accounts.register') }}">Register</a>
</nav>
Expand Down
5 changes: 5 additions & 0 deletions warehouse/templates/search/results.html
Expand Up @@ -84,6 +84,11 @@ <h3 class="package-snippet__title">
{% endif %}
{%- endmacro %}

{% block search_form_extra_inputs -%}
{%- for classifier in applied_filters %}
<input name="c" type="hidden" value="{{ classifier|e }}">
{%- endfor -%}
{%- endblock %}

{% block content %}
<section class="horizontal-section horizontal-section--medium">
Expand Down

0 comments on commit 86ad2a4

Please sign in to comment.