Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: braintree/braintree_python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: directangular/braintree_python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Sep 23, 2016

  1. Accept unicode during param key building

    Many Python applications and frameworks use unicode strings wherever
    possible.  This makes it a bit awkward to do things like update a
    subscription, since the following code raises an error:
    
        braintree.Subscription.update('subscription_id', {
                "add_ons": {
                    "add": [
                        {
                            "inherited_from_id": "addon1",
                        }
                    ],
                    "remove": [u"addon2"]
                },
            })
    
    (Note the unicode add-on name in the "remove" list).
    
    Specifically, it raises:
    
        AttributeError: 'unicode' object has no attribute 'items'
    
    from resource.py:24.
    
    Be a bit more permissive by allowing instances of str *or* unicode to be
    used as a key, allowing the above code to succeed.
    mgalgs committed Sep 23, 2016
    Configuration menu
    Copy the full SHA
    fb7c897 View commit details
    Browse the repository at this point in the history
Loading