Commit Graph

860 Commits

Author SHA1 Message Date
Anders Kaseorg f1b91e577e requirements: Include packages that pip-tools considers unsafe.
It’s unclear why pip-tools considers these packages unsafe, and
excluding them from being pinned has resulted in nondeterministic
output that makes our test suite unhappy.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-25 22:32:31 -07:00
Tim Abbott 63841814ce requirements: Rerun update-locked-requirements.
Apparently, pip 19.2.3 was released yesterday, resulting in
test-locked-requirements failing after we merged the latest updates to
it.
2019-08-25 16:13:04 -07:00
Anders Kaseorg 6822634d22 requirements: Remove editable flag from *.in.
Fixes #12374.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-25 15:03:20 -07:00
Anders Kaseorg fb9e9b76a8 requirements: When removing future requirement, leave it commented.
futures is no longer there to be removed.  Be clear about why we’re
removing future (it was never a “pip-tools bug”), and leave evidence
behind to help indicate how long that will be needed.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-25 15:03:20 -07:00
Anders Kaseorg a053a925b3 requirements: Upgrade pip-tools to 3.8.0; downgrade pip to 19.1.1.
These are not the latest versions, but pip-tools 3.9.0 or 4.0.0 fails
to resolve dependencies from Git URLs:

pip._internal.exceptions.DistributionNotFound: No matching distribution found for zulip==0.6.1_git (from -r requirements/common.in (line 135))

while pip 19.2 breaks pip-tools 3.8.0:

TypeError: __init__() got an unexpected keyword argument 'find_links'

Fixes #10802.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-25 15:03:20 -07:00
Vishnu Ks d472d30c28 requirements: Upgrade stripe pip package from 2.21.0 to 2.35.0. 2019-08-19 11:09:33 -07:00
Anders Kaseorg a5596011a0 queue_processors, python_examples: Fix mypy errors.
zerver/openapi/python_examples.py:105: error: Argument 1 to "get_user_presence" of "Client" has incompatible type "str"; expected "Dict[str, Any]"
    zerver/openapi/python_examples.py:563: error: Argument 1 to "add_reaction" of "Client" has incompatible type "Dict[str, object]"; expected "Dict[str, str]"
    zerver/openapi/python_examples.py:576: error: Argument 1 to "remove_reaction" of "Client" has incompatible type "Dict[str, object]"; expected "Dict[str, str]"
    zerver/worker/queue_processors.py:587: error: Argument "client" to "extract_query_without_mention" has incompatible type "EmbeddedBotHandler"; expected "ExternalBotHandler"

These were only missed because mypy daemon mode requires us to set
`follow_imports = skip` for the `zulip` package.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-16 14:13:40 -07:00
Anders Kaseorg bfc5617f04 requirements: Update zulint.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-16 14:13:40 -07:00
David Rosa 0d52d24d64 docs: pip upgrade recommonmark and CommonMark
Summary:
- recommonmark: 0.4.0 -> 0.5.0
- CommonMark: 0.5.4 -> 0.9.0
- Fixed links getting their .md file extension cut off
- Supressed 262 new warnings

Details:
Appended #anchors to markdown github links as a workaround to
recommonmark 0.5.0 cutting off the ".md" part from them.
Sphinx build would fail as follows

[documentation_crawler] ERROR: Please check link:
<404 https://github.com/zulip/zulipbot/blob/master/.github/CONTRIBUTING>
<404 https://github.com/zulip/zulip/blob/master/requirements/README>
<404 https://github.com/zulip/python-zulip-api/blob/master/zulip_bots/README>

sphinx build would also log a "WARNING: None:any reference target not found"
for every link ending in .html
So a good temporary solution is to suppress all warnings with the method suggested here:
https://stackoverflow.com/questions/37359407/suppress-warnings-for-unfound-references-with-default-role-any-in-sphinx

A better solution would be to edit all links ending .html and use .md instead;
which would also solve PR #11719.

Fixes #11395.
2019-08-15 22:41:40 -07:00
Vishnu KS 7a433f279a requirements: Upgrade Django from 1.11.22 to 1.11.23. 2019-08-15 16:56:31 -07:00
Anders Kaseorg 72655611ce requirements: Use maintained fork django-sendfile2 of django-sendfile
The original seems to be unmaintained
(johnsensible/django-sendfile#65).  Notably, this fixes a bug in the
filename parameter, which perviously showed the Python 3 repr of a
byte string (johnsensible/django-sendfile#49).

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-12 15:40:08 -07:00
Anders Kaseorg b0859f4b1e linter_lib: Fix mypy errors.
tools/linter_lib/pyflakes.py:35: error: Argument 3 to "run_pyflakes" has incompatible type "List[Tuple[bytes, bytes]]"; expected "List[Tuple[str, str]]"
    tools/linter_lib/custom_check.py:110: error: Argument "rules" to "RuleList" has incompatible type "List[Dict[str, Any]]"; expected "List[Rule]"
    tools/linter_lib/custom_check.py:214: error: Argument "rules" to "RuleList" has incompatible type "List[Dict[str, Any]]"; expected "List[Rule]"
    tools/linter_lib/custom_check.py:214: error: Argument "shebang_rules" to "RuleList" has incompatible type "List[Dict[str, Any]]"; expected "List[Rule]"
    tools/linter_lib/custom_check.py:502: error: Argument "rules" to "RuleList" has incompatible type "List[Dict[str, Any]]"; expected "List[Rule]"
    tools/linter_lib/custom_check.py:502: error: Argument "shebang_rules" to "RuleList" has incompatible type "List[Dict[str, Any]]"; expected "List[Rule]"
    tools/linter_lib/custom_check.py:519: error: Argument "rules" to "RuleList" has incompatible type "List[Dict[str, Any]]"; expected "List[Rule]"
    tools/linter_lib/custom_check.py:706: error: Argument "rules" to "RuleList" has incompatible type "List[Dict[str, Any]]"; expected "List[Rule]"
    tools/linter_lib/custom_check.py:728: error: Argument "rules" to "RuleList" has incompatible type "List[Dict[str, Any]]"; expected "List[Rule]"
    tools/linter_lib/custom_check.py:738: error: Argument "rules" to "RuleList" has incompatible type "List[Dict[str, Any]]"; expected "List[Rule]"
    tools/linter_lib/custom_check.py:779: error: Argument "rules" to "RuleList" has incompatible type "List[Dict[str, Any]]"; expected "List[Rule]"
    tools/linter_lib/custom_check.py:779: error: Argument "length_exclude" to "RuleList" has incompatible type "Set[str]"; expected "List[str]"
    tools/linter_lib/custom_check.py:803: error: Argument "length_exclude" to "RuleList" has incompatible type "Set[str]"; expected "List[str]"
    tools/linter_lib/custom_check.py:805: error: Unsupported operand types for + ("List[Rule]" and "List[Dict[str, Any]]")
    tools/linter_lib/custom_check.py:819: error: Argument "rules" to "RuleList" has incompatible type "List[Dict[str, Any]]"; expected "List[Rule]"

These were missed the `zulint` package was missing PEP 561 type
annotation markers, and if it’d had them, mypy daemon mode would’ve
required us to set `follow_imports = skip` for it.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-09 17:22:45 -07:00
Anders Kaseorg 7625f0ecae requirements: Use a pinned zulint commit, not master.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-06 23:05:43 -07:00
Anders Kaseorg 68dd8e4ec8 mypy: Migrate from mypy_extensions to typing_extensions.
This gives us access to typing_extensions.Deque, which was not added
to typing until 3.5.4.

(PROVISION_VERSION is not bumped because the transitive dependency set
in dev.txt hasn’t changed.)

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-05 17:24:09 -07:00
Mateusz Mandera d8ee11d849 requirements: Add 'decorator' dependency.
We already had this as an indirect dependency, but now it's going to be
needed to write a decorator for rate limiting authenticate() functions,
so it should be added to common.in.
2019-08-02 15:03:00 -07:00
Mateusz Mandera 8f6f78b912 requirements: Upgrade redis from 2.10.6 to 3.2.1.
Fixes #11209.

This requires changing how zadd is used in rate_limiter.py:
In redis-py >= 3.0 the pairs to ZADD need to be passed as a dictionary,
not as *args or **kwargs, as described at
https://pypi.org/project/redis/3.2.1/ in the section
"Upgrading from redis-py 2.X to 3.0".

The rate_limiter change has to be in one commit with the redis upgrade,
because the dict format is not supported before redis-py 3.0.
2019-07-29 15:34:05 -07:00
Aman 2183a74040 zulint: Use zulint from the extracted repository.
zulint will be added as a "third-party" dependency in zulip from now
on.  See the new project at https://github.com/zulip/zulint for more
details.
2019-07-26 11:35:43 -07:00
Vishnu Ks b602cbbb82 requirements: Upgrade defusedxml from 0.5.0 to 0.6.0. 2019-07-26 10:57:31 -07:00
Vishnu Ks cb8b935ee8 requirements: Upgrade certifi from 2019.3.9 to 2019.6.16. 2019-07-26 10:57:31 -07:00
Vishnu Ks 628030b742 requirements: Upgrade wheel from 0.33.1 to 0.33.4. 2019-07-26 10:57:31 -07:00
Vishnu Ks 0b9b9e5673 requirements: Upgrade pip from 19.1 to 19.2.1. 2019-07-26 10:57:31 -07:00
Vishnu Ks 3ebffe06bf requirements: Upgrade tblib from 1.3.2 to 1.4.0. 2019-07-26 10:57:31 -07:00
Vishnu Ks 096244a783 requirements: Upgrade snakeviz from 2.0.0 to 2.0.1. 2019-07-26 10:57:31 -07:00
Vishnu Ks 5c4fcf809a requirements: Upgrade Scrapy from 1.6.0 to 1.7.2. 2019-07-26 10:57:31 -07:00
Vishnu Ks f6791b30af requirements: Upgrade moto from 1.3.7 to 1.3.13. 2019-07-26 10:57:31 -07:00
Vishnu Ks dccb41fa47 requirements: Upgrade isort from 4.3.17 to 4.3.21. 2019-07-26 10:57:31 -07:00
Vishnu Ks 4f6d6ff9e1 requirements: Upgrade gitlint from 0.11.0 to 0.12.0. 2019-07-26 10:57:31 -07:00
Vishnu Ks 9487539930 requirements: Upgrade twilio from 6.26.2 to 6.29.2. 2019-07-26 10:57:31 -07:00
Vishnu Ks 2ed41095d6 requirements: Upgrade SQLAlchemy from 1.3.3 to 1.3.6. 2019-07-26 10:57:31 -07:00
Vishnu Ks 65457441f3 requirements: Upgrade Pygments from 2.3.1 to 2.4.2. 2019-07-26 10:57:31 -07:00
Vishnu Ks 7531afa9a4 requirements: Upgrade psycopg2 from 2.8.2 to 2.8.3. 2019-07-26 10:57:31 -07:00
Vishnu Ks f3eb7a8aa9 requirements: Upgrade premailer from 3.4.0 to 3.5.0. 2019-07-26 10:57:31 -07:00
Vishnu Ks 43c8d915d8 requirements: Upgrade phonenumberslite from 8.10.12 to 8.10.15. 2019-07-26 10:57:31 -07:00
Vishnu Ks 5871a81ba0 requirements: Upgrade mock from 2.0.0 to 3.0.5. 2019-07-26 10:57:31 -07:00
Vishnu Ks b2bab27afe requirements: Upgrade lxml from 4.3.3 to 4.3.4. 2019-07-26 10:57:31 -07:00
Vishnu Ks e9920164e4 requirements: Upgrade ijson from 2.3 to 2.4. 2019-07-26 10:57:31 -07:00
Vishnu Ks b57d90d7f2 requirements: Upgrade httplib2 from 0.12.3 to 0.13.0. 2019-07-26 10:57:31 -07:00
Vishnu Ks da04697167 requirements: Upgrade django-two-factor-auth from 1.8.0 to 1.9.1. 2019-07-26 10:57:31 -07:00
Vishnu Ks 501b58c6e8 requirements: Upgrade django-bitfield from 1.9.5 to 1.9.6. 2019-07-26 10:57:31 -07:00
Vishnu Ks 5d40082fe0 requirements: Upgrade django-auth-ldap from 1.7.0 to 2.0.0. 2019-07-26 10:57:31 -07:00
Vishnu Ks aaa056b150 requirements: Upgrade disposable-email-domains from 0.0.49 to 0.0.52. 2019-07-26 10:57:31 -07:00
Vishnu Ks 20a466a73f requirements: Upgrade beautifulsoup4 from 4.7.1 to 4.8.0. 2019-07-26 10:57:31 -07:00
Vishnu Ks fb4db2c851 requirements: Upgrade apns2 from 0.4.1 to 0.5.0. 2019-07-26 10:57:31 -07:00
Wyatt Hoodes 3060bb2208 requirements: Upgrade to mypy 0.720.
We also add the option of the newly added `--warn_unreachable`
flag.
2019-07-25 17:41:10 -07:00
Anders Kaseorg 6d5a20ac62 requirements: Remove django-pipeline.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-24 17:40:31 -07:00
neiljp (Neil Pilgrim) ba7a0934e3 requirements: Upgrade mypy to 0.711.
This comes with it a big performance improvement; mypy is now only
barely our slowest linter even if it wasn't previously running.

Fixes: #12058
2019-07-22 17:12:50 -07:00
Harshit Bansal bf14a0af4d auth: Migrate google auth to python-social-auth.
This replaces the two custom Google authentication backends originally
written in 2012 with using the shared python-social-auth codebase that
we already use for the GitHub authentication backend.  These are:

* GoogleMobileOauth2Backend, the ancient code path for mobile
  authentication last used by the EOL original Zulip Android app.

* The `finish_google_oauth2` code path in zerver/views/auth.py, which
  was the webapp (and modern mobile app) Google authentication code
  path.

This change doesn't fix any known bugs; its main benefit is that we
get to remove hundreds of lines of security-sensitive semi-duplicated
code, replacing it with a widely trusted, high quality third-party
library.
2019-07-21 20:51:34 -07:00
Rohitt Vashishtha 726d5003e1 bugdown: Force absolute urls in topic links.
If a url doesn't have a scheme, browsers would treat it as a relative
url and open something like: https://chat.zulip.org/google.com instead.

This PR fixes the issue on the backend; the frontend implementation
remains out of sync and the user sending the message wouldn't see
any linkification for urls without a scheme.

Fixes #12791.
2019-07-19 12:02:52 -07:00
Eeshan Garg 8dfc9d8bca pypi: Upgrade to release 0.6.1. 2019-07-15 12:28:16 -07:00
Tim Abbott 06d3194ff6 dependencies: Use the django-bitfield 1.9.5 release.
The release contains all the fixes from our fork.
2019-07-12 16:25:40 -07:00
Anders Kaseorg 0555007bd0 requirements: Remove unused dependencies.
* backports-abc: For old Python versions.
* backports.ssl-match-hostname: For old Python versions.
* docopt: Has never been used directly.
* gitdb: Has never been used directly.
* ndg-httpsclient: No longer used by requests ≥ 2.12.1.
* pycrypto: Has never been used directly.
* smmap: Has never been used directly.
* typing: For old Python versions.
* typing_extensions: For old Python versions.

PROVISION_VERSION is not bumped because these were already unused
since at least the last major bump.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-10 15:44:50 -07:00
Anders Kaseorg 51b5188299 requirements: Delist recursive dependencies from *.in not used directly.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-07-10 15:44:50 -07:00
Vishnu Ks 0b35bb96f0 requirements: Upgrade pillow from 5.4.1 to 6.1.0.
Fixes #12193
2019-07-07 22:28:54 -07:00
Vishnu Ks 4f65b50c44 requirements: Upgrade django-otp from 0.5.2 to 0.6.0.
This indirect dependency was upgraded separately since
it contained a migration with autogenerated name.
2019-07-07 22:28:54 -07:00
Vishnu Ks 41f6de1e92 requirements: Upgrade django from 1.11.20 to 1.11.22. 2019-07-07 22:28:54 -07:00
Vishnu Ks ccf6710cd6 requirements: Upgrade Twisted from 19.2.0 to 19.2.1. 2019-07-07 22:28:54 -07:00
Vishnu Ks 8143b4e47f requirements: Upgrade indirect python dependencies. 2019-07-07 22:28:54 -07:00
Rohitt Vashishtha d6e8bd6515 dependencies: Upgrade markdown from 3.0.1 -> 3.1.1.
Fixes #12192.
2019-07-03 15:06:19 -07:00
Priyank Patel 352b864124 requirements: Add pyinotify dependency. 2019-05-29 16:49:33 -07:00
Vishnu Ks 9e86a8b4d4 requirements: Explicitly specefy phonenumberslite as a dependency.
If we don't specify phonenumberslite explicitly it would
be removed when setuptools is upgraded to latest version.
2019-05-27 12:07:47 -07:00
Rishi Gupta d9d0285865 requirements: Downgrade stripe from 2.27.0 to 2.21.0.
Reverts c09962b and 697b4b2. The lines that break look like
stripe.Invoice.finalize_invoice(stripe_invoice).

Something like stripe_invoice.finalize_invoice() would work, but it's a big
change given how the tests in test_stripe.py currently work.
2019-05-15 17:27:32 -07:00
Puneeth Chaganti 0884764421 url preview: Add python-magic dependency for content-type sniffing. 2019-05-06 12:37:32 -07:00
Mayank Madan aae01f5795 dependencies: Install line_profiler from our fork.
This is required for Python 3.7 support; line_profiler needs a release
with Cython rerun following the Python 3.7 release, and this achieves
that goal.
2019-05-05 17:53:00 -07:00
Vishnu Ks b4a54483ed Revert "requirements: Upgrade moto from 1.3.7 to 1.3.8."
This reverts commit 4ee65b70b4.
2019-04-28 21:18:01 -07:00
Vishnu Ks 8d2a3e58d7 requirements: Upgrade moto from 1.3.7 to 1.3.8. 2019-04-26 16:22:00 -07:00
Vishnu Ks c99b82bae8 requirements: Upgrade setuptools from 40.8.0 to 41.0.1. 2019-04-26 16:22:00 -07:00
Vishnu Ks 07ca80a7e6 requirements: Upgrade pip from 19.0.3 to 19.1. 2019-04-26 16:22:00 -07:00
Vishnu Ks 43bc029f68 requirements: Upgrade twilio from 6.26.1 to 6.26.2. 2019-04-26 16:22:00 -07:00
Vishnu Ks c09962bd7b requirements: Upgrade stripe from 2.26.0 to 2.27.0. 2019-04-26 16:22:00 -07:00
Vishnu Ks b8d74ad594 requirements: Upgrade gitlint from 0.10.0 to 0.11.0. 2019-04-26 16:22:00 -07:00
Vishnu Ks 3ccd8ef26d requirements: Upgrade coverage from 4.5.2 to 4.5.3. 2019-04-26 16:22:00 -07:00
Vishnu Ks f9f823066e requirements: Upgrade pyasn1-modules from 0.2.4 to 0.2.5. 2019-04-26 16:22:00 -07:00
Vishnu Ks a956854df3 requirements: Upgrade indirect dependencies in thumbor.txt. 2019-04-26 16:22:00 -07:00
Vishnu Ks 4c48ff3822 requirements: Upgrade indirect dependencies in docs.txt. 2019-04-26 16:22:00 -07:00
Vishnu Ks df47b6010e requirements: Upgrade Twisted from 18.9.0 to 19.2.0. 2019-04-26 16:22:00 -07:00
Vishnu Ks 5423188e07 requirements: Upgrade isort from 4.3.11 to 4.3.17. 2019-04-26 16:22:00 -07:00
Vishnu Ks 0e12626763 requirements: Upgrade snakeviz from 1.0.0 to 2.0.0. 2019-04-26 16:22:00 -07:00
Vishnu Ks 7e2e7ca0e5 requirements: Upgrade virtualenv-clone from 0.5.1 to 0.5.3. 2019-04-26 16:22:00 -07:00
Vishnu Ks 5970f0f277 requirements: Upgrade twilio from 6.25.0 to 6.26.1. 2019-04-26 16:22:00 -07:00
Vishnu Ks 697b4b22c2 requirements: Upgrade stripe from 2.21.0 to 2.26.0. 2019-04-26 16:22:00 -07:00
Vishnu Ks 45e6f07f63 requirements: Upgrade SQLAlchemy from 1.3.0 to 1.3.3. 2019-04-26 16:22:00 -07:00
Vishnu Ks 54ad03775e requirements: Upgrade pytz from 2018.9 to 2019.1. 2019-04-26 16:22:00 -07:00
Vishnu Ks a34cfd4782 requirements: Upgrade psycopg2 from 2.7.7 to 2.8.2. 2019-04-26 16:22:00 -07:00
Vishnu Ks eb00e78856 requirements: Upgrade premailer from 3.3.0 to 3.4.0. 2019-04-26 16:22:00 -07:00
Vishnu Ks 20cd564f27 requirements: Add Pillow to unupgradable.json. 2019-04-26 16:22:00 -07:00
Vishnu Ks f0bcb061a6 requirements: Add Markdown to unupgradable.json. 2019-04-26 16:22:00 -07:00
Vishnu Ks 4158251b0b requirements: Upgrade lxml from 4.3.2 to 4.3.3. 2019-04-26 16:22:00 -07:00
Vishnu Ks c33437d473 requirements: Upgrade Jinja2 from 2.10 to 2.10.1. 2019-04-26 16:22:00 -07:00
Vishnu Ks 9d022eb127 requirements: Upgrade httplib2 from 0.12.1 to 0.12.3. 2019-04-26 16:22:00 -07:00
Vishnu Ks 57c762d6c4 requirements: Upgrade disposable-email-domains from 0.0.46 to 0.0.49. 2019-04-26 16:22:00 -07:00
Vishnu Ks cc7ac7241d requirements: Add defusedxml to unupgradable.json. 2019-04-26 16:22:00 -07:00
Vishnu Ks 2c5510b34a requirements: Upgrade cffi from 1.12.2 to 1.12.3. 2019-04-26 16:22:00 -07:00
Vishnu Ks 3177e981fd requirements: Upgrade certifi from 2018.11.29 to 2019.3.9. 2019-04-26 16:22:00 -07:00
Vishnu Ks ab63f2b524 requirements: Upgrade indirect dependencies in dev.txt, prod.txt. 2019-04-26 16:22:00 -07:00
neiljp (Neil Pilgrim) 1348c8fd05 requirements: Upgrade mypy to 0.670.
Requires minor adjustment for accented 'i' in variable name.
2019-04-16 17:50:12 -07:00
neiljp (Neil Pilgrim) 2160ece8e2 requirements: Upgrade mypy to 0.660. 2019-04-16 17:50:12 -07:00
Eeshan Garg a6abafa54b python-zulip-api: Upgrade to release 0.6.0. 2019-03-19 20:07:53 -02:30
Tim Abbott dee2de91a9 Revert "docs: Update dependencies for docs."
This reverts commit 4303b42abd.

This appears to have broken various documentation links to
e.g. README.md on GitHub.
2019-03-06 09:55:51 -08:00
Vishnu Ks 65d0b5d501 requirements: Upgrade sphinx from 1.8.3 to 1.8.4. 2019-03-06 09:31:24 -08:00
Vishnu Ks 2c62e7cf6b requirements: Upgrade isort from 4.3.10 to 4.3.11. 2019-03-06 09:31:24 -08:00