and though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here

  1. 03 Sep, 2016 1 commit
    • Jordan Moldow's avatar
      Refactor Translator to use less global state (#165) · 719a831d
      Jordan Moldow authored
      In the past, there was one `Translator`, which was a global
      singleton, and would be permanently modified any time a new
      object class with an `_item_type` was created.
      
      Recently, in v2.0.0a1, we tried out a change where the global
      translator would be modified any time a new object class with an
      `_item_type` OR with a baseclass with an `_item_type` was created.
      This means that every subclass operation mutated global state.
      We thought this would make it easier for developers to add their
      own classes to the SDK. In retrospect, it makes it much harder
      to write tests (because any temporary subclasses created,
      including by a mock library, will modify global state for the
      rest of the test run), and makes it impossible to intentionally
      create a subclass that shouldn't be registered in the
      translator. So we are reverting this behavior for v2.0.0a2.
      
      Furthermore, this adds the ability to create non-global
      translators (which are, by default, used on `BoxSession`
      objects), and the ability to add non-global registrations to
      these non-global translators. This is now the publicly
      recommended way for developers to register types, outside of the
      SDK itself.
      
      For now, the old mechanism of implicitly registering the
      official SDK classes with `_item_type` is retained. But we can
      experiment with the new system, and see if we prefer to switch
      to the explicit registration, and delete the implicit
      registration system, in v2.0.0a3.
      
      Also fix a bug that I discovered in `ExtendableEnumMeta`.
      719a831d
  2. 19 Aug, 2016 3 commits
    • Jordan Moldow's avatar
      Merge pull request #160 · e325da58
      Jordan Moldow authored
      Prepare for alpha release of 2.0.0
      
      Bump version to 2.0.0a1.
      
      Add @kelseymorris95 to AUTHORS.
      
      Fix up docstrings for Sphinx, and update docs sources.
      
      Clean up release notes.
      e325da58
    • Jordan Moldow's avatar
      Prepare for alpha release of 2.0.0 · 8374720c
      Jordan Moldow authored
      Bump version to 2.0.0a1.
      
      Add @kelseymorris95 to AUTHORS.
      
      Fix up docstrings for Sphinx, and update docs sources.
      
      Clean up release notes.
      8374720c
    • kelseymorris95's avatar
      Docs update (#159) · 309336d4
      kelseymorris95 authored
      Update HISTORY and README for new release.
      309336d4
  3. 18 Aug, 2016 2 commits
  4. 17 Aug, 2016 1 commit
    • kelseymorris95's avatar
      Add Cloneable interface and @api_call (#154) · 6199de87
      kelseymorris95 authored
      New `@api_call` decorator can be used to allow methods that make an API call to accept an extra
      parameter `extra_network_parameters`, to be used for sending low level request parameters to
      Requests or whatever network layer is being used.
      
      When `extra_network_parameters` is provided, the underlying `BoxSession` is cloned, and the
      `extra_network_parameters` are attached to the new one.
      
      Decorate all existing API call methods with `@api_call`.
      6199de87
  5. 15 Aug, 2016 2 commits
  6. 01 Aug, 2016 5 commits
  7. 08 Jul, 2016 1 commit
    • kelseymorris95's avatar
      Allow custom subclasses of smart objects (#149) · 3f5908c8
      kelseymorris95 authored
      Enable `Translator` registered subclasses of smart objects to be returned
      from smart object methods.
      
      Remove all hard coded smart object return types in favor of a lookup in
      `Translator` or returning an instance of `self.__class__`.
      3f5908c8
  8. 21 Jun, 2016 1 commit
    • kelseymorris95's avatar
      Add Event class (#139) · 76652d96
      kelseymorris95 authored
      Added an `Event` class, edited `Events.get_event()` to return a list of them.
      
      This creates a new branch in the object class hierarchy, with a distinction between REST objects (instances of `BaseObject` and its subclasses) and non-REST (objects that are not addressable / queryable in the API) objects (instances of `APIJSONObject` and its subclasses). `BaseObject` and `APIJSONObject` inherit from a common baseclass, `BaseAPIJSONObject`, which is now the base for translation.
      
      To maintain backwards-compatibility with methods that used to return `dict`, `APIJSONObject` implements the `Mapping` interface.
      
      Fixes #15.
      76652d96
  9. 26 May, 2016 2 commits
    • Jordan Moldow's avatar
      Merge pull request #137 from box/jwt_fixes · a1dba2d7
      Jordan Moldow authored
      Fixes to JWTAuth
      a1dba2d7
    • Jordan Moldow's avatar
      Fixes to JWTAuth · 1d1559a7
      Jordan Moldow authored
      Open the PEM private key file in 'rb' mode so that `.read()`
      returns `bytes` in Python 3. Otherwise, the default openssl
      backend of cryptography fails to use the key.
      
      Set the `_user_id` attribute to `None` when authenticating an
      enterprise instance.
      
      Fixes #136.
      1d1559a7
  10. 19 May, 2016 1 commit
  11. 18 May, 2016 1 commit
    • Jordan Moldow's avatar
      Always update `OAuth2` object with new tokens · 7239ba71
      Jordan Moldow authored
      If the protected method `_get_tokens()` returns new tokens,
      refresh is skipped, and those tokens are used.
      
      Previously, we would return the new tokens without updating the
      object state. Subsequent uses of the `OAuth2` object would use
      the old tokens.
      
      Now we will correctly update the object state.
      
      Fixes #128.
      
      Also make some minor test fixes and upgrade the version of mock
      that we use.
      
      Prepare for bump to version 1.5.2.
      7239ba71
  12. 23 Mar, 2016 4 commits
  13. 21 Mar, 2016 2 commits
  14. 17 Mar, 2016 1 commit
  15. 07 Mar, 2016 2 commits
    • Jeffrey Meadows's avatar
      Fix pylint errors. · f351d3d3
      Jeffrey Meadows authored
      f351d3d3
    • Jeffrey Meadows's avatar
      Add __repr__ for box objects. · efa3d2ca
      Jeffrey Meadows authored
      Box objects will now be repr'd including the object type and
      either the object's name or its Box id.
      
      Also, add support for dir() and vars() being called on Box
      objects. Those builtin functions will now include API response fields
      as attributes of the object.
      efa3d2ca
  16. 02 Mar, 2016 3 commits
  17. 26 Feb, 2016 1 commit
  18. 23 Feb, 2016 7 commits