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: dropbox/dropbox-sdk-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.6.1
Choose a base ref
...
head repository: dropbox/dropbox-sdk-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 139,995 additions and 33,939 deletions.
  1. +3 −0 .coveragerc
  2. +31 −0 .github/ISSUE_TEMPLATE/bug_report.md
  3. +1 −0 .github/ISSUE_TEMPLATE/config.yml
  4. +20 −0 .github/ISSUE_TEMPLATE/feature_request.md
  5. +25 −0 .github/ISSUE_TEMPLATE/question_help.md
  6. +16 −0 .github/dependabot.yml
  7. +18 −0 .github/pull_request_template.md
  8. +122 −0 .github/workflows/ci.yml
  9. +74 −0 .github/workflows/coverage.yml
  10. +46 −0 .github/workflows/pypiupload.yml
  11. +69 −0 .github/workflows/spec_update.yml
  12. +22 −6 .gitignore
  13. +1 −4 .gitmodules
  14. +6 −0 .pylintrc
  15. +19 −0 .readthedocs.yml
  16. +5 −0 CODE_OF_CONDUCT.md
  17. +75 −0 CONTRIBUTING.md
  18. +2 −2 LICENSE
  19. +1 −0 MANIFEST.in
  20. +47 −93 README.rst
  21. +17 −0 UPGRADING.md
  22. +15 −0 codecov.yml
  23. +9 −0 docs/api/async.rst
  24. +7 −0 docs/api/auth.rst
  25. +7 −0 docs/api/common.rst
  26. +7 −0 docs/api/contacts.rst
  27. +8 −0 docs/api/dropbox.rst
  28. +7 −0 docs/api/exceptions.rst
  29. +7 −0 docs/api/file_properties.rst
  30. +7 −0 docs/api/file_requests.rst
  31. +7 −0 docs/api/files.rst
  32. +7 −0 docs/api/oauth.rst
  33. +7 −0 docs/api/paper.rst
  34. +7 −0 docs/api/seen_state.rst
  35. +7 −0 docs/api/sharing.rst
  36. +7 −0 docs/api/team.rst
  37. +7 −0 docs/api/team_common.rst
  38. +7 −0 docs/api/team_log.rst
  39. +7 −0 docs/api/team_policies.rst
  40. +7 −0 docs/api/users.rst
  41. +7 −0 docs/api/users_common.rst
  42. +18 −17 docs/conf.py
  43. +20 −2 docs/index.rst
  44. +0 −58 docs/moduledoc.rst
  45. +6 −5 dropbox/__init__.py
  46. +259 −0 dropbox/account.py
  47. +5 −306 dropbox/async.py
  48. +284 −0 dropbox/async_.py
  49. +528 −87 dropbox/auth.py
  50. +0 −771 dropbox/babel_serializers.py
  51. +0 −562 dropbox/babel_validators.py
  52. +4,478 −1,087 dropbox/base.py
  53. +2,279 −556 dropbox/base_team.py
  54. +103 −0 dropbox/check.py
  55. +0 −1,660 dropbox/client.py
  56. +355 −15 dropbox/common.py
  57. +138 −0 dropbox/contacts.py
  58. +0 −466 dropbox/dropbox.py
  59. +800 −0 dropbox/dropbox_client.py
  60. +20 −4 dropbox/exceptions.py
  61. +2,297 −0 dropbox/file_properties.py
  62. +1,394 −0 dropbox/file_requests.py
  63. +10,547 −5,493 dropbox/files.py
  64. +371 −184 dropbox/oauth.py
  65. +252 −0 dropbox/openid.py
  66. +3,184 −0 dropbox/paper.py
  67. +0 −833 dropbox/properties.py
  68. +0 −422 dropbox/rest.py
  69. +60 −0 dropbox/secondary_emails.py
  70. +150 −0 dropbox/seen_state.py
  71. +48 −327 dropbox/session.py
  72. +5,798 −7,065 dropbox/sharing.py
  73. +1 −56 dropbox/stone_base.py
  74. +1 −772 dropbox/stone_serializers.py
  75. +1 −563 dropbox/stone_validators.py
  76. +13,692 −9,052 dropbox/team.py
  77. +212 −177 dropbox/team_common.py
  78. +87,850 −0 dropbox/team_log.py
  79. +1,769 −241 dropbox/team_policies.py
  80. +0 −1,396 dropbox/trusted-certs.crt
  81. +752 −1,015 dropbox/users.py
  82. +80 −0 dropbox/users_common.py
  83. +1 −1 example/back-up-and-restore/README.md
  84. +25 −22 example/back-up-and-restore/backup-and-restore-example.py
  85. +27 −0 example/oauth/commandline-oauth-pkce.py
  86. +85 −0 example/oauth/commandline-oauth-scopes.py
  87. +29 −0 example/oauth/commandline-oauth.py
  88. +7 −7 example/updown.py
  89. +22 −19 generate_base_client.py
  90. +12 −0 requirements.txt
  91. +10 −0 scripts/release_note_generator.sh
  92. +27 −0 scripts/update_version.sh
  93. +9 −2 setup.cfg
  94. +46 −21 setup.py
  95. BIN setuptools-3.1-py2.7.egg
  96. BIN setuptools-3.1.zip
  97. +1 −1 spec
  98. +0 −1 stone
  99. BIN test/{ → fixtures}/Costa Rican Frog.jpg
  100. BIN test/{ → fixtures}/dropbox_song.mp3
  101. 0 test/{ → fixtures}/foo.txt
  102. +78 −0 test/integration/expired-certs.crt
  103. +338 −0 test/integration/test_dropbox.py
  104. +248 −0 test/integration/trusted-certs.crt
  105. +5 −0 test/requirements.txt
  106. +0 −12 test/run_tests.sh
  107. +0 −548 test/test_dropbox.py
  108. +414 −0 test/unit/test_dropbox_unit.py
  109. +88 −5 tox.ini
  110. +0 −3 update_version.sh
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[run]
branch = True
source = dropbox/
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: "\U0001F41B Bug report"
about: Create a report to help us improve the SDK
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of the bug.

**To Reproduce**
The steps to reproduce the behavior

**Expected Behavior**
A clear description of what you expected to happen.

**Actual Behavior**
A clear description of what actually happened

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Versions**
* What version of the SDK are you using?
* What version of the language are you using?
* What platform are you using? (if applicable)

**Additional context**
Add any other context about the problem here.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: "\U0001F680 Feature Request"
about: Suggest an idea for this SDK
title: ''
labels: enhancement
assignees: ''

---

**Why is this feature valuable to you? Does it solve a problem you're having?**
A clear and concise description of why this feature is valuable. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered. (if applicable)

**Additional context**
Add any other context or screenshots about the feature request here.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/question_help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: "\U0001F4AC Questions / Help"
about: Get help with issues you are experiencing
title: ''
labels: help-wanted, question
assignees: ''

---

**Before you start**
Have you checked StackOverflow, previous issues, and Dropbox Developer Forums for help?

**What is your question?**
A clear and concise description of the question.

**Screenshots**
If applicable, add screenshots to help explain your question.

**Versions**
* What version of the SDK are you using?
* What version of the language are you using?
* What platform are you using? (if applicable)

**Additional context**
Add any other context about the question here.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "monthly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
18 changes: 18 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--
Thank you for your pull request. Please provide a description below.
-->

## **Checklist**
<!-- For completed items, change [ ] to [x]. -->

**General Contributing**
- [ ] Have you read the Code of Conduct and signed the [CLA](https://opensource.dropbox.com/cla/)?

**Is This a Code Change?**
- [ ] Non-code related change (markdown/git settings etc)
- [ ] SDK Code Change
- [ ] Example/Test Code Change

**Validation**
- [ ] Does `tox` pass?
- [ ] Do the tests pass?
122 changes: 122 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: CI
on:
pull_request:

jobs:
CI:
continue-on-error: true
runs-on: ${{ matrix.os }}
# Supported Versions:
# https://github.com/actions/python-versions/blob/main/versions-manifest.json
strategy:
matrix:
os: [macos-13, windows-latest]
python-version: [3.6, 3.7, 3.8, pypy-3.7]
exclude:
- os: windows-latest
python-version: 3.6
include:
- os: ubuntu-20.04
python-version: 3.7
- os: ubuntu-20.04
python-version: 2.7
steps:
- uses: actions/checkout@v2
- if: ${{ matrix.python-version == '2.7' }}
name: Setup Python environment (2.7)
run: |
sudo apt-get install python-is-python2
curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python get-pip.py
- if: ${{ matrix.python-version != '2.7' }}
name: Setup Python environment
uses: actions/setup-python@v3.1.4
with:
python-version: ${{ matrix.python-version }}
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install -r requirements.txt
pip install -r test/requirements.txt
python setup.py install --user
- name: Run Linter
run: |
flake8 setup.py dropbox example test
- name: Run Unit Tests
run: |
pytest -v test/unit/test_dropbox_unit.py
Docs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup Python environment
uses: actions/setup-python@v3.1.4
with:
python-version: '3.7'
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install twine sphinx
pip install -r requirements.txt
pip install -r test/requirements.txt
python setup.py install
- name: Test Doc Generation
run: |
sphinx-build -b html docs build/html
- name: Test Dist Generation
run: |
python setup.py sdist bdist_wheel
twine check dist/*
Integration:
continue-on-error: true
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, windows-latest]
python-version: [3.6, 3.7, 3.8, pypy-3.7]
exclude:
- os: windows-latest
python-version: 3.6
include:
- os: ubuntu-20.04
python-version: 3.7
- os: ubuntu-20.04
python-version: 2.7
steps:
- uses: actions/checkout@v2.3.4
- if: ${{ matrix.python-version == '2.7' }}
name: Setup Python environment (2.7)
run: |
sudo apt-get install python-is-python2
curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python get-pip.py
- if: ${{ matrix.python-version != '2.7' }}
name: Setup Python environment
uses: actions/setup-python@v3.1.4
with:
python-version: ${{ matrix.python-version }}
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
pip install -r requirements.txt
pip install -r test/requirements.txt
python setup.py install --user
- name: Run Integration Tests
env:
LEGACY_USER_DROPBOX_TOKEN: ${{ secrets.LEGACY_USER_DROPBOX_TOKEN }}
LEGACY_USER_CLIENT_ID: ${{ secrets.LEGACY_USER_CLIENT_ID }}
LEGACY_USER_CLIENT_SECRET: ${{ secrets.LEGACY_USER_CLIENT_SECRET }}
LEGACY_USER_REFRESH_TOKEN: ${{ secrets.LEGACY_USER_REFRESH_TOKEN }}
SCOPED_USER_DROPBOX_TOKEN: ${{ secrets.SCOPED_USER_DROPBOX_TOKEN }}
SCOPED_USER_CLIENT_ID: ${{ secrets.SCOPED_USER_CLIENT_ID }}
SCOPED_USER_CLIENT_SECRET: ${{ secrets.SCOPED_USER_CLIENT_SECRET }}
SCOPED_USER_REFRESH_TOKEN: ${{ secrets.SCOPED_USER_REFRESH_TOKEN }}
SCOPED_TEAM_DROPBOX_TOKEN: ${{ secrets.SCOPED_TEAM_DROPBOX_TOKEN }}
SCOPED_TEAM_CLIENT_ID: ${{ secrets.SCOPED_TEAM_CLIENT_ID }}
SCOPED_TEAM_CLIENT_SECRET: ${{ secrets.SCOPED_TEAM_CLIENT_SECRET }}
SCOPED_TEAM_REFRESH_TOKEN: ${{ secrets.SCOPED_TEAM_REFRESH_TOKEN }}
DROPBOX_SHARED_LINK: ${{ secrets.DROPBOX_SHARED_LINK }}
run: |
pytest -v test/integration/test_dropbox.py
74 changes: 74 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Coverage
on:
push:
branches:
- main
pull_request:
schedule:
- cron: 0 0 * * *

jobs:
Coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python environment
uses: actions/setup-python@v3.1.4
with:
python-version: '3.7'
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install coverage pytest
pip install -r requirements.txt
pip install -r test/requirements.txt
python setup.py install
- name: Generate Unit Test Coverage
run: |
coverage run --rcfile=.coveragerc -m pytest test/unit/test_dropbox_unit.py
coverage xml
- name: Publish Coverage
uses: codecov/codecov-action@v3.1.6
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit
fail_ci_if_error: true
IntegrationCoverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python environment
uses: actions/setup-python@v3.1.4
with:
python-version: '3.7'
- name: Install Requirements
run: |
python -m pip install --upgrade pip
pip install coverage pytest
pip install -r requirements.txt
pip install -r test/requirements.txt
python setup.py install
- name: Generate Unit Test Coverage
env:
LEGACY_USER_DROPBOX_TOKEN: ${{ secrets.LEGACY_USER_DROPBOX_TOKEN }}
LEGACY_USER_CLIENT_ID: ${{ secrets.LEGACY_USER_CLIENT_ID }}
LEGACY_USER_CLIENT_SECRET: ${{ secrets.LEGACY_USER_CLIENT_SECRET }}
LEGACY_USER_REFRESH_TOKEN: ${{ secrets.LEGACY_USER_REFRESH_TOKEN }}
SCOPED_USER_DROPBOX_TOKEN: ${{ secrets.SCOPED_USER_DROPBOX_TOKEN }}
SCOPED_USER_CLIENT_ID: ${{ secrets.SCOPED_USER_CLIENT_ID }}
SCOPED_USER_CLIENT_SECRET: ${{ secrets.SCOPED_USER_CLIENT_SECRET }}
SCOPED_USER_REFRESH_TOKEN: ${{ secrets.SCOPED_USER_REFRESH_TOKEN }}
SCOPED_TEAM_DROPBOX_TOKEN: ${{ secrets.SCOPED_TEAM_DROPBOX_TOKEN }}
SCOPED_TEAM_CLIENT_ID: ${{ secrets.SCOPED_TEAM_CLIENT_ID }}
SCOPED_TEAM_CLIENT_SECRET: ${{ secrets.SCOPED_TEAM_CLIENT_SECRET }}
SCOPED_TEAM_REFRESH_TOKEN: ${{ secrets.SCOPED_TEAM_REFRESH_TOKEN }}
DROPBOX_SHARED_LINK: ${{ secrets.DROPBOX_SHARED_LINK }}
run: |
coverage run --rcfile=.coveragerc -m pytest test/integration/test_dropbox.py
coverage xml
- name: Publish Coverage
uses: codecov/codecov-action@v3.1.6
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration
fail_ci_if_error: true
46 changes: 46 additions & 0 deletions .github/workflows/pypiupload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Publish to PyPi

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [2.7, 3.7]

steps:
- uses: actions/checkout@v2.3.4
- if: ${{ matrix.python-version == '2.7' }}
name: Setup Python environment (2.7)
run: |
sudo apt-get install python-is-python2
curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python get-pip.py
- if: ${{ matrix.python-version != '2.7' }}
name: Setup Python environment
uses: actions/setup-python@v3.1.4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build
run: |
python setup.py bdist_wheel
- name: Build Sources (Python 3)
run: python setup.py sdist
if: ${{ matrix.python-version != '2.7' }}
- name: Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_secret }}
run: |
twine check dist/*
twine upload dist/*
Loading