Commit Graph

85 Commits

Author SHA1 Message Date
Awais Jibran
9f456e28b7 Fix Pavelib prereqs.
Do not read file as bytes, as it would fail the comparison of byte with str.
PROD-1322
2020-02-26 22:48:20 +05:00
Jeremy Bowman
7bbd229526 Unpin more outdated dependencies (#22898)
Unpin several more outdated dependencies whose changelogs don't contain any significant backwards incompatible changes. Also add "moto" to the list of packages to uninstall from existing environments, since it requires a jsondiff version that clashes with the one we now use (triggering a harmless but distracting warning on dependency updates).

We can potentially stop using path.py/path altogether by switching to pathlib in the Python 3 standard library, but that merits a separate PR of its own.

Also, note that I'm not actually unpinning freezegun; different PRs restricted it in both constraints.txt and test.in, I'm just removing the latter redundant constraint.
2020-01-23 06:59:32 -05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Jeremy Bowman
63574e12b8 Remove pytest version constraint (#22626)
Fix the issue that was preventing us from upgrading pytest.  pytest does some manipulation of test packages that prevents `pkg_resources` from loading resources from them, but used to contain a workaround for the problem.  That workaround was [removed](https://github.com/pytest-dev/pytest/issues/5392) in 4.6.0 as a performance enhancement when pytest switched from `pkg_resources` to `importlib-metadata` for its own entrypoint handling.  This tripped up one of our test modules which defined classes that loaded templates from inside a test package.  Moving these resources to the parent package fixes the problem.

More and more, `pkg_resources` is being abandoned in favor of `importlib-metadata` and `importlib_resources` as they have a simpler design with much better performance.  However, `importlib_resources` doesn't support loading files from any directory which isn't itself a Python package (and doesn't allow direct use of paths including directories within the package).  Jinja2 chose a [different approach](https://github.com/pallets/jinja/pull/1082) that we may want to emulate in our resource handling.

Also fixed usage of a removed `pytest.raises()` parameter and a bug in our configuration of the `common/lib` tests that became a problem after the upgrade.
2019-12-30 09:10:57 -05:00
Jeremy Bowman
6f3e1e7e3d Fix remaining pavelib test failures BOM-598 (#21819) 2019-09-27 10:52:22 -04:00
Feanil Patel
61544f0e2c Fix paver for python 3. 2019-09-12 10:17:25 -04:00
Feanil Patel
f1ec3e97a9 Fix i18n extract command. 2019-09-05 16:31:48 -04:00
arbisoft
0726356d7c Fixing python-modernize issues. 2019-07-10 18:35:47 +05:00
J. Cliff Dyer
95aee94089 INCR-41: Replace pdfminer with pdfminer.six 2019-03-28 15:24:47 -07:00
Jeremy Bowman
39a28d2586 TE-2871 Switch to mysqlclient 2019-03-01 14:34:13 -05:00
cclauss
c0c935b685 Old style exceptions --> new style for Python 3 2019-02-19 13:09:23 +01:00
Matthew Piatetsky
6cf44a0467 fix unicode strings in pavelib/ 2019-02-05 09:14:20 -05:00
Michael Youngstrom
e7898d153d Move to python3-saml 2019-01-30 16:35:16 -05:00
cclauss
8fca11b85c Use print() function in both Python 2 and Python 3 2019-01-13 17:16:37 +01:00
Stuart Young
10cfd3434e remove paver timeout decorator 2018-10-01 13:43:02 -04:00
Stuart Young
c7ece71142 increase npm installation timeouts 2018-09-12 14:20:12 -04:00
Stuart Young
0dd13fad1b add paver timeout decorator and npm installation logs 2018-09-07 08:46:04 -04:00
Robert Raposa
58f6e92522 Upgrade DOT to 1.1.2. 2018-07-11 17:36:56 -04:00
Robert Raposa
9bb8f4272e Add warning for paver install_prereqs. 2018-07-11 17:00:30 -04:00
Michael Youngstrom
17238132b7 Remove NPM install for unittest runs 2018-06-29 12:47:55 -04:00
Jeremy Bowman
9ca9aa44c6 PLAT-2060 Use pip-tools to manage requirements files (take 2)
This reverts commit a7fa0c211d.
2018-04-12 17:22:48 -04:00
Feanil Patel
a7fa0c211d Revert "PLAT-2060 Use pip-tools to manage requirements files" 2018-04-10 12:54:41 -04:00
Jeremy Bowman
432347b881 PLAT-2060 Use pip-tools to manage requirements files 2018-04-09 17:07:02 -04:00
Ned Batchelder
d84d261cde Merge pull request #16533 from bzhang443/master
Delete hard coded npm registry setting to accelerate installation
2018-01-22 16:52:53 -05:00
Jesse Zoldak
1db4b052c0 No need to show pip freeze output on the console 2017-12-12 12:17:54 -05:00
Jeremy Bowman
05e7a4d671 PLAT-1830 Allow running any test suite in tox 2017-12-11 15:43:01 -05:00
Calen Pennington
653cc22580 Run pip freeze after installing python prereqs 2017-12-01 14:34:48 -05:00
Bison Zhang
ac5243037a delete hard coded npm registry setting
to accelerate installation, people usually set npm registry to a faster mirror by running 'npm config set registry BLAH_BLAH'
and even if the customized config not available, by default it is 'NPM_REGISTRY = "https://registry.npmjs.org/"', so delete these lines always works.
2017-11-09 20:27:24 -06:00
John Eskew
8eb5945e39 Move Django requirement into separate file to enable tox testing. 2017-09-25 10:33:14 -04:00
John Eskew
d483fe1b68 Mirror the devstack prereqs in CircleCI and paver install_prereqs 2017-07-26 15:40:12 -04:00
Andy Armstrong
93235d118d Reorder imports using isort (except lms and cms) 2017-05-30 16:04:54 -04:00
Clinton Blackburn
8e1b9e1733 Added support for disabling removal of old Python libraries
The NO_PYTHON_UNINSTALL environment variable can now be used to disable the task that removes older versions of Python libraries. This task is not necessary for Docker images/containers since we always create a fresh virtualenv when we create the image.
2017-04-24 18:06:46 -04:00
Ned Batchelder
91a235a96d Fix two wrong egg names
These are the only two egg names that are wrong in this file.  We have
to uninstall i18n-tools, because the distribution name changed.  The
lti-consumer XBlock hasn't changed named, we just had the wrong name in
the requirements file.
2017-01-25 14:22:58 -05:00
Ben Patterson
67be6807a4 Add tests. Enjoy your coverage and feel confident. 2016-11-16 12:24:50 -05:00
Ben Patterson
f52e3cf830 Workaround for cb() never called errors
Problem:

Intermittent "cb() never called!" errors on npm installs for platform.
This is likely due to a race condition on installing OS-specific bits that are built during time of install. When more than one compilation takes place at one time, this error can occur.

Workaround:

Detect the error and re-run the install. (When retrying, one or all of the bits have been compiled. So running it again just finishes the install.)
2016-11-16 12:24:49 -05:00
Ben Patterson
b3a3d729a1 Use nodeenv to manage node version in Jenkins builds
This change:
* gives us the flexibility of managing node from pull-request to pull-request. It'll be a huge lift to folks that want to test out node upgrades like @bjacobel or @andy-armstrong
* Sets us up for a port to Xenial, which will be accomplished in part by using nodeenv for managing the node environment. See a companion PR on the configuration repo for edxapp: edx/configuration#3444

This pull request does not:
* Attempt to solve any stability issues in builds related to node.
* Make node installs any faster
* Create any caching infrastructure to speed up node installs. They will be approximately as fast as they were before. Downloading the node bits build-to-build adds about 3 seconds, which is worth it for the added flexibility.
2016-11-10 10:02:32 -05:00
stu
48b2575ca5 log pip freeze output for debugging jenkins builds 2016-11-01 11:21:46 -04:00
Jesse Zoldak
fea64a66ff Only install python coverage prereqs for coverage paver tasks TE-1673 2016-10-26 10:15:08 -04:00
Calen Pennington
ea28eb6197 Revert "Revert "Merge pull request #13021 from cpennington/paver-timing""
This reverts commit acf50c4469.
2016-08-03 16:13:10 -04:00
Calen Pennington
acf50c4469 Revert "Merge pull request #13021 from cpennington/paver-timing"
This reverts commit ed80381b41, reversing
changes made to 205cb8b3eb.
2016-07-26 13:32:59 -04:00
Calen Pennington
f94530ba12 [EV-62] Add the ability to log timing information during paver tasks 2016-07-22 10:54:48 -04:00
J. Cliff Dyer
f2ea041948 Allow paver users to uninstall obsolete python packages via a paver command.
MA-2250
2016-04-01 16:37:15 -04:00
J. Cliff Dyer
1df040228a Configure LMS to select oauth2 providing library.
Available backends:

* django-oauth-toolkit (DOT)
* django-oauth2-provider (DOP)

* Use provided client ID to select backend for
  * AccessToken requests
  * third party auth-token exchange
* Create adapters to isolate library-dependent functionality
* Handle django-oauth-toolkit tokens in edX DRF authenticator class

MA-1998
MA-2000
2016-03-30 14:21:27 +00:00
Jesse Zoldak
9251a6dc26 Always uninstall python packages on the uninstall list before installing the python requirements 2016-03-09 17:10:11 -05:00
Ned Batchelder
526db7293a A better way to manage the Python packages to uninstall. 2016-02-23 13:51:49 -05:00
Clinton Blackburn
8af930d2eb Fixed package uninstall for django-oauth2-provider
edx-django-oauth2-provider is being mistaken for django-oauth2-provider. Making the filter less liberal ensures we properly uninstall django-oauth2-provider once.

ECOM-3647
2016-02-11 11:46:38 -05:00
Clinton Blackburn
f78945bd1d Updated expected version for python_uninstall_version.txt
Follow up to #11432. This value needs to be incremented to ensure the old package is uninstalled.

ECOM-3647
2016-02-10 19:46:55 -05:00
Clinton Blackburn
219b7f75cf Merge pull request #11432 from edx/clintonb/oauth-client-credentials
Updated django-oauth2-provider
2016-02-10 16:44:37 -05:00
Clinton Blackburn
e92802b382 Updated django-oauth2-provider
New package includes support for client credentials grant.
2016-02-08 21:48:22 -05:00
Ben Patterson
f1b366589b Remove ruby dependencies.
Sass compilation is no longer dependent on Ruby, so we are
removing its dependencies.
2016-02-08 17:02:55 -05:00