Commit Graph

11168 Commits

Author SHA1 Message Date
Taranjeet a137bf15ed Wrap some lines with length greater than 120.
With some tweaks by tabbott.
2016-07-06 14:35:16 -07:00
Eklavya Sharma e26afeeecf Add .coverage to .gititnore. 2016-07-06 14:25:09 -07:00
Eklavya Sharma 4f181acb83 Add python 3 mode to provision.py.
When provision.py is run using python 2, retain original behavior
of creating a python 2 venv using requirements/py2_dev.txt and
creating a python 3 venv using requirements/mypy.txt.
When provision.py is run using python 3, install a single python 3
venv with requirements/py3_dev.txt.
2016-07-06 13:50:55 -07:00
Eklavya Sharma cdc067e751 tools/provision.py: Use universal_newlines=True. 2016-07-06 13:50:55 -07:00
Eklavya Sharma 7e020e3dae scripts/lib/setup_venv.py: Use universal_newlines=True.
In python 3, subprocess uses bytes for input and output if
universal_newlines=False (the default).  It uses str for input and
output if universal_newlines=True.
Since we're dealing with strings here, add universal_newlines=True
to subprocess.check_output calls.
2016-07-06 13:50:55 -07:00
Eklavya Sharma ce6ddd574a zerver/lib/test_helpers.py: Replace os.path.walk by os.walk.
os.path.walk has been removed in python 3.
2016-07-06 11:49:55 -07:00
Eklavya Sharma 6505cbf2bf zerver/lib/timeout.py: Replace isAlive by is_alive.
In threading.Thread, isAlive has been removed in python 3.
We should use is_alive instead.
2016-07-06 11:49:48 -07:00
Eklavya Sharma d8de54abe5 zerver/migrations: Squash an AlterField from 0002 into 0001.
Squash the AlterField on UserProfile.groups in 0002 into the
AddField in 0001.  This is done to avoid a probable bug in Django,
where running migrations in python 3 sometimes led to a KeyError.
2016-07-06 11:40:12 -07:00
Umair Khan 05d36626e8 Revert "Revert "Add casper tests for default language setting.""
This reverts commit ce1676e219.

Now that we've fixed the English locale being missing, these tests
should work again.
2016-07-06 11:35:17 -07:00
Umair Khan 47fb293f8a i18n: Add English locale to language list if missing.
The English locale data is only present if the user has run `manage.py
makemigrations` on the system.
2016-07-06 11:34:28 -07:00
Tim Abbott 84dac8950f Add language_options.json to .gitignore. 2016-07-06 10:30:45 -07:00
Tim Abbott ce1676e219 Revert "Add casper tests for default language setting."
This reverts commit e4b32905bf.

This new test was failing in Travis CI.
2016-07-04 12:45:18 -07:00
Eklavya Sharma 2d4dcd1698 Replace bytes by strings in zerver migrations 2, 13, 18. 2016-07-04 12:08:37 -07:00
Eklavya Sharma 6553e16b89 Replace bytes by strings in zerver/migrations/0001. 2016-07-04 12:08:37 -07:00
Eklavya Sharma 90f306421f Replace bytes by strings in zilencer/migrations. 2016-07-04 12:08:37 -07:00
Umair Khan e4b32905bf Add casper tests for default language setting.
Fixes #1076.
2016-07-04 11:56:31 -07:00
Umair Khan 054d14bb96 Add documentation to announce default language setting. 2016-07-04 11:56:24 -07:00
Umair Khan 4c178bc00f Improve the alert messages for display settings. 2016-07-04 11:56:02 -07:00
Umair Khan 035fceb814 Add dynamically loaded language dropdown. 2016-07-04 11:56:02 -07:00
Conrad Dean bbf7a9c801 Annotate zerver/lib/event_queue.py. 2016-07-04 03:01:33 +05:30
Conrad Dean 9812e676f0 Annotate zerver/lib/queue.py. 2016-07-04 03:01:32 +05:30
Eklavya Sharma 192663edcf zerver/lib/narrow.py: Fix annotations. 2016-07-04 03:01:32 +05:30
Eklavya Sharma 95b6e668a7 zerver/lib/actions.py: Fix annotations.
Change queue_ids from text_type to str.
2016-07-04 03:01:32 +05:30
Eklavya Sharma 9772a512cb Use abstract types in annotations. 2016-07-04 03:01:32 +05:30
Eklavya Sharma fdf4d67cde zerver/tornado.py: Convert queue_id to str. 2016-07-04 02:58:57 +05:30
Eklavya Sharma de19b24f74 zerver/lib/handlers.py: Fix an annotation. 2016-07-04 02:20:25 +05:30
Eklavya Sharma 4761cc27dd zerver/middleware.py: Fix annotations.
* Use abstract types where relevant.
* Fix string types.
* Fix annotation of args and kwargs.
2016-07-04 02:14:42 +05:30
Eklavya Sharma f1b72c5f41 Upgrade wheel before installing venv requirements.
This is required because an older wheel version causes problems
when building wheels on python 3.
2016-07-02 11:53:26 -07:00
Eklavya Sharma 7daa40bf4f Add python3-specific requirements files. 2016-07-02 11:53:26 -07:00
Eklavya Sharma fea6c56978 Move packages from prod.txt to py2_prod.txt. 2016-07-02 11:53:26 -07:00
Eklavya Sharma bf345a0b30 Move packages from common.txt to py2_common.txt. 2016-07-02 11:53:26 -07:00
Eklavya Sharma 0b714ea6c6 Use python2-specific requirements files. 2016-07-02 11:53:26 -07:00
Eklavya Sharma 146dc310a7 Add python2-specific requirements files.
For now just make these files point to their non-specific
counterparts.
2016-07-02 11:53:26 -07:00
Eklavya Sharma 6d8ba90db9 zerver/models.py: Modify imports for mypy in py3 mode.
Change 'from zerver.lib import bugdown' to
'import zerver.lib.bugdown as bugdown' to make zerver/models.py
pass mypy check in python 3 mode.
2016-07-02 10:38:48 -07:00
Eklavya Sharma dcd568960b Add files to mypy's python 3 exclude list. 2016-07-02 10:38:48 -07:00
Eklavya Sharma 5879e18bad Add a 'type: ignore' in zulip_tools.py.
Subprocess.CalledProcessError's __init__ takes 4 arguments out
of which 2 are optional.  It is being passed 2 arguments in
zulip_tools.py. However, python 3 stubs are incorrect and only
1 argument has been marked as default.
See https://github.com/python/typeshed/pull/329.
Add '# type: ignore' to that line so that mypy check passes in
python 3 mode.
2016-07-02 10:38:48 -07:00
Eklavya Sharma b44ae38bff tools/run-mypy: Add Python 3 mode. 2016-07-02 10:38:48 -07:00
Eklavya Sharma b902c1ae45 bugdown: Replace raw unicode literal with non-raw.
Raw unicode literals are disallowed in python 3.
2016-07-02 10:38:48 -07:00
Eklavya Sharma 3177cee740 Upgrade pyflakes. 2016-07-02 08:01:53 +05:30
Eklavya Sharma 766e055229 Upgrade six. 2016-07-02 08:01:48 +05:30
Krit Karan 406cce7027 README: Repoint translating documentation at RTD. 2016-07-01 10:11:48 -07:00
Krit Karan 6c38023cbb REAMDE: Fix (transifex) to [transifex].
This caused the Transifex link to be broken.
2016-07-01 10:11:33 -07:00
Eklavya Sharma 61d052ae41 Upgrade mypy version. 2016-07-01 20:16:36 +05:30
Tim Abbott 3b16daad18 provision: Add a shebang line. 2016-06-30 22:34:58 -07:00
Kartik Maji f8bb7503e6 Add ability to pin streams to top of the streams sidebar list.
Based on work by Lauren Long, with some tweaks by tabbott.
2016-06-30 22:26:09 -07:00
Kartik Maji a32167d921 test_events: Sort subscribers list.
The subscribers list is appended to in `peer_add` events with not
regard for preserving the ordering, and ordering isn't really
important here, so it seems best to just sort it in these checks.
2016-06-30 16:52:51 -07:00
Vishnu Ks 1cbd39b768 Unique link generator for realm creation. 2016-06-30 15:52:41 -07:00
Alex Wilson 8c62cff1b7 bugdown: Clean up paths to emojis. 2016-06-30 15:48:02 -07:00
Alex Wilson 2f47945981 Separate unicode emojis from named emojis. 2016-06-30 15:48:02 -07:00
Alex Wilson b040839c76 Add unicode emoji to frontend markdown parser.
Fixes 2nd half of #1011.
2016-06-30 15:48:02 -07:00