summaryrefslogtreecommitdiff
path: root/src/mailman/rest/helpers.py
Commit message (Collapse)AuthorAgeFilesLines
* Bump copyright years.Barry Warsaw2017-01-041-1/+1
|
* Use `atpublic` for @public instead of internal copy.Barry Warsaw2016-11-291-1/+1
|
* Learn to encode Messages and Header instances to JSONAurélien Bompard2016-11-281-0/+6
|
* Fix #207Barry Warsaw2016-07-141-0/+12
| | | | | A list's ``moderator_password`` can be set via the REST API. Given by Andrew Breksa.
* Clean up the rest directory.Barry Warsaw2016-03-251-24/+18
|
* Super duper.Barry Warsaw2016-01-261-2/+2
| | | | | * Python 3-ify super() calls. * Remove a bunch of obsolete exception classes.
* Refactor API differences into a separate class.Barry Warsaw2016-01-131-25/+0
| | | | | | | | | | | We now have an IAPI interface which defines methods to convert to/from UUIDs to their REST representations, and to calculate the API-homed full URL path to a resource. Add implementations API30 and API31 to handle the two different implementations so far. This also simplifies the various path_to() calls. Also: Add support for diff_cover to tox.ini to check that all differences against the master branch have full test coverage.
* Refactor API contexts.Barry Warsaw2016-01-131-1/+1
| | | | | | Rather than sprinkle API version string tests all over the place, create an IAPI interface which encapsulates the differences between API 3.0 and 3.1, and arrange for this to be used to convert to and from UUIDs.
* Additional refactoring to use the QuerySequence wrapper, so that we can stillBarry Warsaw2016-01-061-11/+6
| | | | | | use len() and slicing on SQLAlchemy query results. We also don't need to list()-ify the results in the tests. This isn't perfect, but at least it doesn't introduce yet another layer violation.
* Support SQL queries for CollectionMixin._get_collectionAurélien Bompard2016-01-061-4/+10
|
* Boost coverage.Barry Warsaw2016-01-031-3/+3
| | | | | | Use coverage.ini to ignore a few common idioms, so as to reduce code clutter. Invoke coverage slightly differently in the tox.ini.
* Happy New Year.Barry Warsaw2016-01-021-1/+1
|
* Cleanups, corner case fixes, and coverage.Barry Warsaw2015-12-311-2/+2
|
* Major push for completing issue #121. Now in API 3.1, all UUIDs must be theBarry Warsaw2015-12-301-1/+1
| | | | | | | | | hex representations of a UUID, not the int representation. Also: * Some general code cleanup. * Fix issue 185 (REST server crash when subscribing a user without a preferred address).
* _resource_as_dict() may not return None.Barry Warsaw2015-12-121-1/+4
| | | | Add some assertions to prove this is always the case.
* Sort the JSON output when [devmode]enabled is true.Barry Warsaw2015-11-211-1/+1
|
* Sort the JSON keys in dev modeAurélien Bompard2015-11-211-1/+2
| | | | This makes it much easier to compare VCR tapes.
* * Add NEWS and a missing _all__ key.Barry Warsaw2015-11-061-4/+6
| | | | * Wrap paragraph.
* Rework pagination to fix the 'start' and 'total_size' valuesAurélien Bompard2015-11-041-34/+25
|
* Clean up based on review.Barry Warsaw2015-07-181-0/+1
|
* * REST API version 3.1 introduced. Mostly backward compatible with versionBarry Warsaw2015-07-181-2/+6
| | | | | | 3.0 except that UUIDs are represented as hex strings instead of 128-bit integers, since the latter are not compatible with all versions of JavaScript.
* Plumb the subscription policy through the REST API.Barry Warsaw2015-04-151-0/+6
|
* Bump copyright years.Barry Warsaw2015-01-041-1/+1
|
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-221-3/+0
|
* Fix some basic REST plumbing, and make test_rosters pass.Barry Warsaw2014-12-111-3/+5
|
* Trunk merge.Barry Warsaw2014-11-081-5/+6
|\
| * Tox-ify the test suite. Now you don't have to create a virtualenv separately.Barry Warsaw2014-11-071-7/+11
| | | | | | | | | | | | | | | | | | | | | | To do this, we have to handle random test ordering, since tox explicitly sets PYTHONHASHSEED. That's a good thing for the future Python 3 port. Removed `mailman conf -t/--sort`; now the output is always sorted. RFC 2369 headers are now sorted before being added. etag repr dicts are sorted using pprint.pformat().
* | When we switch to tox, we'll get hash randomization, which breaks many tests.Barry Warsaw2014-11-061-2/+5
| | | | | | | | | | | | | | | | While I'm shipping a tox.ini, do not yet use tox to run the tests, unless you want to help fix the randomizations. In the meantime, I'm also adding a few randomization fixes, and updating to the latest falcon git trunk.
* | Refactor so that most modules don't need to import falcon, and so fewerBarry Warsaw2014-08-141-0/+46
| | | | | | | | | | unnecessary changes are needed for upstream falcon to support restish-ish traversal.
* | Complete the conversion from restish to falcon, modulo a clean up pass. AllBarry Warsaw2014-08-141-64/+5
| | | | | | | | REST tests pass. This requires an as yet unmerged internal change to falcon.
* | Lists and pagination are ported.Barry Warsaw2014-08-131-14/+6
| |
* | test_addresses and test_root are both passing now.Barry Warsaw2014-08-121-7/+4
| |
* | Get addresses.rst, i.e. /<api>/addresses working.Barry Warsaw2014-08-121-0/+42
|/
* Use print functions consistently through, and update all __future__ imports toBarry Warsaw2014-04-281-1/+1
| | | | | | | | reflect this. Also, mock out sys.stderr on some tests so that their nose2 output is quieter. A few other minor coding style consistencies.
* Bump copyright years.Barry Warsaw2014-01-011-1/+1
|
* Switch to PEP 435 enums from flufl.enums.Barry Warsaw2013-06-181-2/+2
|
* Tweaks and fixes by Barry.Barry Warsaw2013-03-211-25/+18
|
* Removed unused `default_count` argument and remove one wrapping level in ↵Florian Fuchs2013-03-201-21/+18
| | | | paginate decorator
* Fixed comment typoFlorian Fuchs2013-03-201-1/+1
|
* REST API collection pagination: slice result only if pagination params are ↵Florian Fuchs2013-03-201-1/+5
| | | | present in GET request
* REST API: Added pagination functionality to list, member and user collections.Florian Fuchs2013-03-201-0/+40
| | | | This is related to LP: #1156529.
* Bump copyright years.Barry Warsaw2013-01-011-1/+1
|
* * You can now PUT and PATCH on user resources to change the user's displayBarry Warsaw2012-09-221-0/+61
| | | | | | | | | | | | | | name or password. For passwords, you pass in the clear text password and Mailman will hash it before storing. Also: * Major refactoring of validators for PUT and PATCH. Pull the common logic out of configuration.py and put it in a PatchValidator class in helpers.py. Also move GetterSetter to helpers.py * Add new exception classes RESTError, UnknownPATCHRequestError, ReadOnlyPATCHRequestError. These are used in the PatchValidator. * Added Validator.update() which works nicely for PATCH and PUT.
* Do not taunt Happy Python 2.6 Fun Ball.Barry Warsaw2012-03-141-2/+2
| | | | | Clean up Python 2.7-isms and deprecations that break the tests suite on Python 2.6.
* copybumpBarry Warsaw2012-01-011-1/+1
|
* Happy New Year.Barry Warsaw2011-01-011-1/+1
|
* Fix the obvious errors identified by pyflakes. Skip false positives (mostlyBarry Warsaw2010-10-081-1/+0
| | | | | due to _() interpolation) and a few other problems that did not have immediately obvious fixes.
* Ugly, ugly, ugly hack to enable the non-standard HTTP verb PATCH for partialBarry Warsaw2010-09-011-0/+43
| | | | | | resource updates. None of the lower components (well, except restish) actually allows us to extend things for PATCH in any kind of principled way. I am the Kludge King.
* Refactor, and add a missing import.Barry Warsaw2010-08-231-69/+0
|
* Refactor the list configuration code via the REST interface, and flesh it outBarry Warsaw2010-08-231-8/+28
| | | | considerably.