Commit Graph

404 Commits

Author SHA1 Message Date
Anders Kaseorg 29abbdaa07 requirements: Upgrade pip-tools to 4.1.0 and pip to 19.2.3.
Closes #13068.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-26 14:33:18 -07:00
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 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