Mathewpeterson/add more deprecation

@dianakhuang @dmitchell @cpennington Review?
The code with offerings is used in edx-platform, and has been in
opaque-keys. I'd rather be explicit about the deprecation than just drop it
on the floor (primarily out of an abundance of caution, but also to allow
us to make changes to edx-platform gradually).

-Cale


On Thu, Jul 3, 2014 at 1:26 PM, Don Mitchell <notifications@github.com>
wrote:

> In opaque_keys/edx/locator.py:
>
> > @@ -182,6 +182,18 @@ def __init__(self, org=None, course=None, run=None, branch=None, version_guid=No
> >              org, course, run (string): the standard definition. Optional only if version_guid given
> >              branch (string): the branch such as 'draft', 'published', 'staged', 'beta'
> >          """
> > +        offering_arg = kwargs.pop('offering', None)
> > +        if offering_arg:
> > +            warnings.warn(
> > +                "offering is deprecated! Use course and run instead.",
> > +                DeprecationWarning
> > +            )
> > +            offering_split = offering_arg.split("/")
> > +            if not course:
> > +                course = offering_split[0]
> > +            if not run and len(offering_split)>1:
> > +                run = offering_split[1]
>
> Because we still haven't gone live w/ CourseLocators (or did but are no
> longer), I think we can just get rid of offering w/o proving backward
> compatibility.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/edx/opaque-keys/pull/24/files#r14526692>.
>