Commit Graph

94 Commits

Author SHA1 Message Date
M. Zulqarnain
e35d3de376 refactor: pyupgrade on docs & pavelib (#26768) 2021-03-05 15:24:59 +05:00
Ned Batchelder
981ecb675e build: private.txt files weren't handled properly
The requirements/edx/private.txt file is for dev's own private package
needs.  There are two installation mechanisms in edx-platform, and
neither handled the file properly:

- `paver install_prereqs` had the wrong file name.  The file was moved
  almost three years ago, and paver wasn't kept up.

- `make requirements` used `private.*` which included private.in, which
  pip-sync balks at.
2021-02-26 22:19:47 -05:00
Jawayria
69e0dc7d68 Applied pylint-amnesty to {docs, import_shims, pavelib} 2021-02-02 21:17:16 +05:00
Jeremy Bowman
efc04e3399 Remove notifier_api app DEPR-111 (#25464)
Part of the notifier service deprecation (DEPR-106).

Also removed pdfminer from the package uninstall list, since we no longer install the package it conflicts with either.
2020-10-29 11:17:23 -04:00
Feanil Patel
1e4866e89b Merge branch 'master' into alanoe/fix_npm_install_error_handling_in_master 2020-06-26 15:58:37 -04:00
morenol
a4a7e63ef8 Remove usage of enum34, since we are already in python>=3.4 (#24337)
enum34 is causing problems in python3.8 tests of edx-platform because it has incompatibility with recent versions of python, the error the error happens while importing the re module in these python versions.

This library is a backport of enum of python3.4 made for python<3.4, therefore is not needed anymore.

edx-val was updated to remove that dependency: https://github.com/edx/edx-val/pull/245
2020-06-26 13:13:12 -04:00
M. Zulqarnain
bc568309ec BOM-1701: Ran pyupgrade on pavelib (#24230) 2020-06-17 17:09:38 +05:00
Alan Evangelista
30495b4580 Fix 'npm install' command execution error handling
'npm install' command execution was changed from paver.easy.sh()
to subprocess.Popen() in commit 0dd13fad1b,
but exception handling was not updated accordingly. Due to this,
errors in 'npm install' execution were not detected.
2020-04-19 19:40:21 -03:00
Ayub-khan
3c1140dc49 BOM-1045
-Upgrade edx-drf-extensions
-settings-update
2020-03-10 16:06:02 +05:00
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