1
0
mirror of https://github.com/pypiserver/pypiserver synced 2025-02-22 19:19:37 +01:00
Commit Graph

100 Commits

Author SHA1 Message Date
Matthew Planchard
4109c10524 Tests and refactoring
* Refactored `updae()` into several single-responsibility functions
* Added tests for said functions
* Some PEP 008 cleanup
* Imported standard `__future__` imports in `manage.py` and its test
module
2018-08-04 16:17:56 -05:00
Matthew Planchard
2499dac8ec Merge branch 'rm-3.3' of git://github.com/hugovk/pypiserver into hugovk-rm-3.3 2018-06-12 20:26:31 -05:00
Matthew Planchard
c791d12292 FIX: Fallback URL, remove calls to pip.main
Resolves #205 - pypi.python.org shutting down

* Updated the default fallback URL to `pypi.org/simple` rather than
`pypi.python.org/simple`
* Scrubbed references and links to `pypi.python.org`
* Fixed tests breaking due to the removal of `pip.main()` in pip 10.0 -
see pypa/pip#5080 for more info
2018-06-11 20:31:03 -05:00
Hugo
676e86d683 Remove redundant parentheses 2018-05-07 22:29:36 +03:00
Hugo
31a5b5d7e7 Replace function call with set literal 2018-05-07 22:29:36 +03:00
Hugo
288f38f26e Remove unused imports 2018-05-07 22:29:36 +03:00
Matthew Planchard
e6a0bfc812 Resolved paste config parsing issue for Python 2
The ability to propagate configuration values from a paste config
file was introduced in #156. However, as pointed out in #125
by @redbaron4, the string strip method introduced in #156 was
problematic in Python 2.

This resolves that issue while also creating a test that fails
on the current master and passes with updates, demonstrating the
issue.
2017-11-29 20:04:09 -06:00
Matthew Planchard
1770f3cf93 Updated Tests
In addition to including tests from @jameshiebert with slight
updates, I have also resolved an issue with newer versions of twine,
which require an extra parameter in the calls to `upload` and
`register`.
2017-11-14 11:02:44 -06:00
Matthew Planchard
c0b93bdaef Revert Matrix Auth
This reverts commits 29c1803 c79dd18 568f901 and 3d37c00. This has
resulted in bugs referenced in #175, #179, and #186.
2017-11-14 08:43:49 -06:00
Matthew Planchard
05f5920c25 Updated Default Fallback URL to https
Resolves #179

Due to a pypi API change (reasoning
[here](https://mail.python.org/pipermail/distutils-sig/2017-October/031712.html),
thanks to @natefoo for the link), the redirect links that we were
generating for distributions not present in the package index were
failing with `403` errors.

@ankostis, I have not had time to look into why the standalone tests are
failing. Perhaps we should just ignore them in order to get a new
version out once this is merged to master?
2017-10-31 12:34:22 -05:00
Jordan Speicher
519c195253 Default fallback_url to use HTTPS
`pypi.python.org/simple` will respond to HTTP requests with `403: SSL is required.`

This will change the default fallback_url to use HTTPS.  This should fix #179.
2017-10-26 12:44:05 -05:00
Bert JW Regeer
ecfd1796a7 Add test to disallow regression 2017-03-31 12:48:08 +02:00
Kyle Hornberg
29c1803eae Add matrix auth exceptions 2017-02-21 16:29:47 -06:00
Kyle Hornberg
568f901ace Add test for multiple actions with multiple users 2017-02-21 16:29:47 -06:00
Kyle Hornberg
3d37c00999 Add matrix auth 2017-02-21 16:29:47 -06:00
Matthew Planchard
a05d5a103b Update Tests for New Twine
* Updated .travis.yml to fix PEP 440 warnings
* Fixed twine calls

We were getting test failures on multiple branches in
`test_server.py`. I first investigated a warning message
popping up in every test run:

```
PEP440Warning,
/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/pkg_resources/__init__.py:2510: PEP440Warning: 'setuptools (git-0.4.0)' is being parsed as a legacy, non PEP 440, version. You may find odd behavior and sort order. In particular it will be sorted as less than 0.0. It is recommend to migrate to PEP 440 compatible versions.
```

Moving the installation of setuptools, pip, sphinx, and tox
into the `install` key for Travis resolved that issue, but
`test_server.py` tests were still failing. It turns out that
Twine 1.7.0 added support for SSL cert specification and,
in the process, changed the call signature for the `upload`
and `register` internal methods.

This PR fixes the calls so that they align with Twine's new
function signature. Note that tests now fail on Twine <1.7.0,
so I have also updated the dev requirements file.
2016-07-17 14:35:58 -05:00
Matthew Planchard
7aa9240391 Merge pull request #114 from blade2005/topic/allow-search-with-pip
Topic/allow search with pip
2016-06-22 21:11:01 -05:00
Dana Powers
1f6da1fe00 Implement PEP 503 Package Name Normalization and URL Redirects 2016-05-19 15:45:08 -07:00
Dana Powers
394da3212f upload test requires pypirc to avoid password prompt 2016-05-14 21:43:57 -07:00
Matthew Planchard
7180dc477f Added init.py to tests 2016-05-12 20:02:10 -05:00
Matthew Planchard
b9b95713b4 Test for search functionality
Removed unused imports
Added docstrings
Whitespace changes
PEP 008 compliance
Added test for search
2016-05-12 19:44:24 -05:00
bibby
54247a17bb test_upload_with_signature fix to allow uploaded files in any order. My result appears different than the expected outcome. 2016-04-21 08:08:18 -07:00
Matthew Planchard
5ba186264e Added a test that fails in current master and succeeds in
proposed branch changes
2016-03-21 20:39:46 -05:00
Kostis Anagnostopoulos
0c4c27fa5c v1.2.0.dev1 (<--1.1.10): Stop supporting py<2.7 & py<3.3 (#107). 2016-01-20 20:05:47 +01:00
Kostis Anagnostopoulos
27a0b05433 Merge branch 'allow-asc-uploads' into dev. 2016-01-19 20:10:22 +01:00
Kostis Anagnostopoulos
140796bb6e gpg, #106, test: Add upload+sig TC.
- Rename upload-file vars in /upload action.
2016-01-19 18:50:14 +01:00
Matthew Planchard
abf8785f4d gpg, #106, test: Add TC for parsing all-filenames with .asc. 2016-01-19 18:41:53 +01:00
Matthew Planchard
f40901bc33 Impl #106: Start impl uploading GPG-sigs.
- Added path munging for .asc files.
- core: store .asc files, if given.
- Testing sig-file parsing.
2016-01-19 18:41:31 +01:00
Kostis Anagnostopoulos
4f7d7a45a7 test: Increase client-server delay to fix non-deterministic TC fails. 2016-01-19 18:06:56 +01:00
Kostis Anagnostopoulos
ab2f170fe9 Rework package parsing.
+ FIX #104: Stopped parsing invalid package-versions prefixed with `v`;
  they are invalid according to :pep-reference:`0440`.
+ Also support versions with epochs separated by `!` like `package-1!1.1.0`.
+ Move bottle-filename check on app module.
2016-01-19 13:36:16 +01:00
Kostis Anagnostopoulos
4527573a50 app: Improve server-response error-messages.
+ test: Parametrize remove-pkg TCs.
2016-01-19 13:36:09 +01:00
ankostis on tokoti
6b904db6c5 FIX #102: uploading pkgs with +! chars in version.
+ Use `content.raw_filename` for allowing PEP0440 chars.
+ Add upload app-TCs.
+ Improve parse-pkg core-TC.
+ Update CHANGES on forthcomming release.
2016-01-17 22:47:00 +01:00
Dustin Spicuzza
e8f1f149a5 Add an optional in-memory cache to hold package list
- Precomputes various attributes
- File digest is cached on access
- Cache requires watchdog to be installed
2016-01-04 17:40:39 -05:00
ankostis on tokoti
011c79b8bf init: Use locals() in configure() to avoid explicitly listing **kwds.
+ Update CHANGES.
2015-12-21 03:01:16 +02:00
ankostis on tokoti
912d405a83 hashes, #53: Add --hash-algo option with TCs. 2015-12-21 02:50:15 +02:00
ankostis on tokoti
1e3cfb8f6b test: Increase 1-sec sleep after test-server startup. 2015-12-20 20:33:48 +02:00
ankostis on tokoti
85e51d5a48 FIX #53: Append MD5 url-fragments on package links.
- TC only for digest-method.
2015-12-20 02:32:45 +02:00
Kostis Anagnostopoulos at kilo
1a9b782d96 Readme:FIX license shield.
+ Update py2.5 supported env
2015-09-21 18:28:33 +02:00
Kostis Anagnostopoulos at kilo
eeb8b05fec Increase attempts and logging attempt to research spurious `setup.py
upload` fails (#91)!
2015-09-21 04:07:53 +02:00
Kostis Anagnostopoulos at kilo
d9f746b85f test_server: Add setuptools TCs for register/upload.
+ Register TC checks #91, have to search for spurious fails.
2015-09-21 03:34:27 +02:00
Kostis Anagnostopoulos at kilo
9275aeca01 Add twine-register TCs. 2015-09-20 18:35:11 +02:00
ankostis on tokoti
3676771719 FIX test_server FC!
+ Generate dummy-dists within tests to support running on every 
  platform/py-version.
  + delete pr-generated dummy-wheels.
+ Add forgotten test-packages `twinw`, `passlib`!
+ Update bugfix signing `twine` 1.6.1-->1.6.1.
2015-09-20 11:11:57 +02:00
ankostis on tokoti
4bb758da30 PIP test-server.
+ Rework test_server fictures with ports, pswds, and package-dirs.
+ Increase dep: pip>=7
2015-09-19 02:04:32 +02:00
Kostis Anagnostopoulos
3d172ae546 AMIDST test-server: Add pip install test.
[skip ci]
2015-09-18 20:20:01 +02:00
Kostis Anagnostopoulos
f8056565a8 Enable assert "dist-uploaded" in test_server.
+ Had not to use __future__.unicode_literals!
+ Refactor `test_server` using pytest fictures.
2015-09-18 19:19:04 +02:00
Kostis Anagnostopoulos
5fd1d49a3b Mark test_server failing on py-3.2. 2015-09-18 18:48:53 +02:00
Kostis Anagnostopoulos
43bfc7e5ae FIX centodeps TC missing dist-file from prev 2 commit.
+ Change asserting server without capturing stdout/stderr to avoid lockups.
2015-09-18 18:21:05 +02:00
Kostis Anagnostopoulos
6635d4dd74 test-server: Pin twine to 1.6.0.
+ Update centodep-TC with monkeypatch for `twine<1.6.0`.
2015-09-17 20:20:14 +02:00
Kostis Anagnostopoulos
e32ca3425b Add test_server TCs with twine<-->real process.
+ TC for #82 uploading `dentodeps` package with 200 deps.
2015-09-17 20:04:00 +02:00
Kostis Anagnostopoulos
cda0fad7a9 Dot means empty when specifying empty authed-ops (-a .).
+ FIX check of password/authentication-list options combinations.
+ doc: Update auth-ops list instructions.
+ Report bad port.
2015-09-17 19:39:02 +02:00