Commit Graph

134 Commits

Author SHA1 Message Date
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
Kostis Anagnostopoulos
d4d0463db6 Upgrade bottle 0.11.6-->0.13-dev
+ FIX #82: serve more than 100 packages.
- Missing TC.
2015-09-17 13:48:27 +02:00
ankostis on tokoti
133afe28f7 Rework standalone generation using ZIP.
+ Standalone executable based on wheel.
+ Properly use `pkg_resources` so reading `welcome-msg` file
  works even from within zip.
  + Mark `zip_safe=True` in setup.py.
+ Delete forgotten distutils startup script.
+ Build standalone before installing anything else,
  to check if any deps are missing.
+ Restore py25 in Travis.
2015-09-17 01:13:37 +02:00
Kostis Anagnostopoulos at STUW025
2c1ceb04b5 Restructure main to allow for gevent monkeypatch (FIX #49).
+ Update zip and setuptools startup-cripts.
2015-09-15 22:22:09 +02:00
Kostis Anagnostopoulos at STUW025
dc8f62c04f FIX #92: docs: Update version on README
+ Add README-version TC.
2015-09-14 18:55:16 +02:00
Kostis Anagnostopoulos at STUW025
000e977978 #55: Do not require passlib when -P == '.'. 2015-09-11 17:29:08 +02:00
Kostis Anagnostopoulos at STUW025
1fd5653317 FIX #55: Allow unauthenticated uploads with -P . option.
+ Add `mock` lib into test-dependencies for py2.
+ travis: Use new containers.
2015-09-11 16:08:13 +02:00
Arcadiy Ivanov
2d0de09d30 Incorrect package name detection with OSX version scheme #88
Fixes package name and package version handling of bdist_dumb
packages

Detects OS name boundary as specified in
http://svn.python.org/projects/python/trunk/Lib/distutils/util.py

Also detects cpN and pyN boundary

fixes #88, connected to #88
2015-08-04 20:55:34 -04:00
ankostis on tokoti
d50cdb6c3b docs: Update github-links, suitable python-versions, changes and
rel-date.

- Update maintainers.
- Update python-classifiers.
- Various README edits.
- #38: Update suggestion on welcome-file.
- Add ankostis to authors (so Ralf may avoid half harassment for
this release).
2015-02-28 01:21:48 +01:00
ankostis on tokoti
10f42e829c xss: Generate all index-listings with SimpleTemplate instead of
string-substs (#see 77).

- Add titles<h1> in all index-listings.
- FIX unicode errors on new TC's of prev commit.
2015-02-23 03:14:19 +01:00
ankostis on tokoti
7cc36aee0c Improve welcome-msg tests and add XSS for when removing packages
(probably not needed).
2015-02-23 01:45:35 +01:00
Kostis Anagnostopoulos, Yoga-2
cb6f3b698a Use bottle's SimpleTemplate engine to avoid XSS on welcome-page (#77).
- Add 1 TC.
- TODO: Probable XSS still in error-messages.
2015-02-22 18:43:35 +01:00
Kostis Anagnostopoulos, Yoga-2
c6a79ef9c2 FIX test with PEP8-PkgFile class. 2015-02-17 00:46:37 +01:00
Bartek Rychlicki
c3453878f1 Add tests for cache control. 2015-02-17 00:30:53 +01:00
Kostis Anagnostopoulos @ STUW025
91f635b570 tests: Normalize paths for comparisons to run on Windows. 2015-01-15 16:20:24 +01:00
ankostis@kilo
c64b8c32d2 Allow to override welcome-msg(/) from a separate html file.
- Read welcome-msg in UTF-8.
- Add cmd-line option for `welcome-file`.
- Add TCs for welcome-file option and `/` http-req.
- Update docs for new option.
- Failback to in-code welcome-msg if unreadable (ie standalone mode, bad file).
2015-01-15 16:20:24 +01:00
ankostis@kilo
cf03226ea2 Add Logging for all http actions.
* Use stabdard python's logging lib.
* Log http-request/response/errors.
* Cmd-line options for logging-format and filename.
* Cmd-line options for request /response/error requests/responses/errors
props to log.
* Add `-v` option controlling verbosity.
* Add docs about new options.
* TCs only `-v` & `--log_file ` (logging statements used throughout all
tests).
2014-11-17 16:51:45 +01:00
Ralf Schmitt
af62cfbf3e better handling for wheel files
use pip's wheel regex. this should fix #44.
2014-01-20 21:37:52 +01:00
Ralf Schmitt
95f24b0a99 test package name and version guessing with wheel files
see https://github.com/schmir/pypiserver/issues/44
2014-01-19 21:55:14 +01:00
Ralf Schmitt
72a4bfc3ce test guess_pkgname_and_version with one more filename 2013-07-22 21:24:29 +02:00
Nick Pope
402a04e9af More robust guessing of package name and version.
Added support for some other package naming schemes.
2013-07-19 16:00:20 +01:00
Nick Pope
c3737bdf07 Fix guessing of package name and version.
The fix in commit 7f97612 for supporting the package naming used by the
pytz module caused a regression if the package name contained a dash
followed by a number. We fix this by splitting on all dashes followed by
numbers and recreating the package name from all components but the
last.
2013-07-19 11:42:36 +01:00
Ralf Schmitt
3154943d3b fix is_stable_version 2013-06-22 22:50:51 +02:00
Ralf Schmitt
ab599f98f1 add a test for a package that uses both _ and - 2013-04-02 22:07:08 +02:00
Eliot
7ad9e2afd1 Remove duplicates from "/simple" index page
The main line repo
(c1b9386dff)
currently lists duplicate entries on the "/simple" index page if the
package name contains hyphens and if both a source file and egg file are
uploaded. One index entry contains hyphens in the name which matches the
source file name and the other entry contains underscores in the name
which matches the egg file. Clicking both links lead to pages which list
the same files (both the source file and the egg file).

The previous fix
(c6966afeed)
mostly fixed this problem but it did not account for package names that
included an underscore. Change the "/simple" index to use the name from
a non-egg file, since this name should not have hyphens converted to
underscores as egg files do. If there are only egg files, use the egg
file name.
2013-04-01 16:49:15 -07:00
Ralf Schmitt
2232295412 implement multi-root support
one can now specify multiple package roots. watch out for filename
conflicts!
2013-01-22 23:00:48 +01:00
Ralf Schmitt
b2c6410a39 handle package names case insensitive in filter_latest_pkgs
we probably also need to normalize _ vs - someday
2012-12-28 01:53:10 +01:00
Ralf Schmitt
16e3a2cd14 add some test for manage.py 2012-12-28 01:48:18 +01:00
Ralf Schmitt
c76390e333 get rid of pkgset class
instead we use an iterator that returns all relevant information. that
simplifies the code quite a bit because we now mostly operate on the
iterators result instead of handling filenames, versions, prefixes...
2012-12-26 01:15:03 +01:00
Ralf Schmitt
7a999fb8cb test that root view returns absolute paths in hrefs
this is github issue 25
2012-12-02 23:07:48 +01:00
Ralf Schmitt
e90a7ef822 make tests succeed under python 3 2012-12-02 01:20:52 +01:00
Ralf Schmitt
6989d316c5 use webtest instead of twill
webtest works with python 3.

we now also get rid of paste and pastedeploy and use
bottle.Bottle.mount instead.
2012-12-02 01:17:55 +01:00
Ralf Schmitt
2f2eeee593 use new pytest.fixture functionality 2012-11-26 22:25:30 +01:00
Orne Brocaar
55273d55e3 Add --fallback-url argument to pypi-server script to make it configurable. 2012-08-15 10:02:58 +02:00
Ralf Schmitt
3df36e66a0 instantiate a new app object/module for each pypiserver.app call
adapt test_main to the new situation.
2012-04-07 23:23:29 +02:00
Ralf Schmitt
81571c60a3 use pypiserver.app factory function in test_app 2012-04-07 23:10:49 +02:00
Ralf Schmitt
1b2f37ede5 do not use the default bottle app 2012-04-07 22:57:40 +02:00
Ralf Schmitt
c0f82470c6 move bottle app function to _app module
I'd like to run multiple pypiserver wsgi apps inside one process and
plan to do so by reloading pypiserver._app.

this is the first step. we move all of the @route'd functions to _app.
2012-04-07 22:30:54 +02:00
Ralf Schmitt
e7cf0e1d7f use paste to test non-root installations 2012-04-03 22:59:01 +02:00
Ralf Schmitt
ec01935af6 test guess_pkgname_and_version with 'pep8' 2012-03-26 01:05:11 +02:00
Ralf Schmitt
f8818e2d9e add some more tests for guess_pkgname_and_version 2012-03-26 00:59:59 +02:00
Ralf Schmitt
dc0303bb1f add some tests for the pytz issue #6
pytz's version is '2012b' which we currently don't recognize as a
version string.
2012-03-26 00:59:59 +02:00
Ralf Schmitt
b680e34527 test that directories starting with a dot are ignored 2011-10-07 20:39:52 +02:00
Ralf Schmitt
219497b555 test for 404 when we don't have a package 2011-09-01 01:38:22 +02:00
Ralf Schmitt
16684872d0 cleanup with twill.remove_wsgi_intercept 2011-09-01 01:08:32 +02:00
Ralf Schmitt
cd811d131f add more tests for /simple/ 2011-09-01 00:19:14 +02:00
Ralf Schmitt
01a9288108 test that we don't serve files starting with a dot 2011-09-01 00:07:40 +02:00
Ralf Schmitt
c24b490cfa test fallback to pypi.python.org 2011-08-31 22:00:09 +02:00
Ralf Schmitt
ee3c545932 test that /favicon.ico doesn't redirect and returns a 404 2011-08-31 21:22:52 +02:00
Ralf Schmitt
baa2936217 add some tests for the WSGI app 2011-08-30 03:38:59 +02:00
Ralf Schmitt
775f64783d add some tests for core.main function 2011-08-30 02:36:25 +02:00