I'm considering making two small incompatible changes to the JSON
representation of list requests in the REST API.  Here's what you currently
get (from rest/docs/moderation.rst) for a held subscription request:

    >>> dump_json('http://localhost:9001/3.0/lists/[email protected]/requests/1')
    address: [email protected]
    delivery_mode: regular
    display_name: Anne Person
    http_etag: "..."
    language: en
    password: password
    request_id: 1
    type: subscription
    when: 2005-08-01T07:49:23

I want to change the 'address' key to 'email' and remove the 'password' key,
e.g.:

    >>> dump_json('http://localhost:9001/3.0/lists/[email protected]/requests/1')
    delivery_mode: regular
    display_name: Anne Person
    email: [email protected]
    http_etag: "..."
    language: en
    request_id: 1
    type: subscription
    when: 2005-08-01T07:49:23

Unsubscription requests would just rename 'address' to 'email' (there is no
'password' key).  E.g. from:

    >>> dump_json('http://localhost:9001/3.0/lists/[email protected]/requests/2')
    address: [email protected]
    http_etag: "..."
    request_id: 2
    type: unsubscription

to:

    >>> dump_json('http://localhost:9001/3.0/lists/[email protected]/requests/2')
    email: [email protected]
    http_etag: "..."
    request_id: 2
    type: unsubscription

I could (mostly) keep backward compatibility by just adding the 'email' key
and keeping the 'address' key for now.  The 'password' key is trickier because
a subscription request's password is internally and randomly generated anyway,
and I am going to remove this.  I could keep 'password' with either the empty
string or some random garbage.

I'd like to just get rid of these and break compatibility, but if it would
cause pain to Postorius or other tools, I can deprecate the old names and
remove them in the future.

Let me know what you think.

Cheers,
-Barry

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Mailman-Developers mailing list
[email protected]
https://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Reply via email to