89 Commits

Author SHA1 Message Date
Feanil Patel
8143796b26 docs: update references from setup.py to pyproject.toml
Update documentation, comments, and docstrings throughout the codebase
to reflect the migration from setup.py to pyproject.toml:

- Transformer class docstrings: changed to reference "entry point name
  in the package configuration" for better future-proofing
- Block structure module docs: updated to reference pyproject.toml
- Test file comments: updated entry point references
- Config files (tox.ini, pytest.ini): updated references
- Documentation (extension_points.rst, course apps ADRs): updated to
  reference pyproject.toml with inclusive language for external packages
- Requirements documentation (github.in): updated with inclusive language
- edxmako README: modernized install command to use pip install

Historical ADRs and references to external packages that may still use
setup.py were intentionally left unchanged or updated with inclusive
language acknowledging both pyproject.toml and setup.py.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-03 10:46:16 -05:00
Tarun Tak
18d5abb2f6 chore: Replace pytz with zoneinfo for UTC handling - Part 1 (#37523)
First PR to replace pytz with zoneinfo for UTC handling across codebase.

This PR migrates all UTC timezone handling from pytz to Python’s standard
library zoneinfo. The pytz library is now deprecated, and its documentation
recommends using zoneinfo for all new code. This update modernizes our
codebase, removes legacy pytz usage, and ensures compatibility with
current best practices for timezone management in Python 3.9+. No functional
changes to timezone logic - just a direct replacement for UTC handling.

https://github.com/openedx/edx-platform/issues/33980
2025-10-28 16:23:22 -04:00
Feanil Patel
f491b97b22 fix: Update naming for courseware section/subsection.
These used to be named chapter and section before but we want to update
the courseware index view to use the new names if it's gonna stick
around.
2025-08-07 15:35:04 -04:00
Irtaza Akram
a8a8ae3286 fix: replace pkg_resources with importlib.resources (#36213) 2025-02-13 17:43:07 +05:00
Jesper Hodge
1f43d17b21 Revert "Replace pkg_resources with importlib.resources" (#36208) 2025-02-05 08:51:50 -05:00
Irtaza Akram
acdbff8b4c fix: remove pkg_resources 2025-01-08 16:45:19 +05:00
salmannawaz
f76b6b4e10 Remove bok-choy reference (#34216)
* chore: remove bok-choy references
2024-02-14 09:42:08 -05:00
Feanil Patel
66e987997c Revert "Revert "chore: remove bok-choy settings"" 2023-11-01 13:41:37 -04:00
Robert Raposa
083ccbf09b Revert "chore: remove bok-choy settings" 2023-10-31 15:27:44 -04:00
salman2013
9452cef97d chore: resolve conflicts 2023-10-23 12:05:25 +05:00
Feanil Patel
e3851ab3d1 test: Update to reuse variables in more places.
Some of the places where we had explicit copies of the password were not
necessary so we referece the exsting TEST_PASSWORD variable where
possible.
2023-10-16 12:33:25 -04:00
Feanil Patel
64e91d4080 test: Update to an even longer password. 2023-10-12 10:31:13 -04:00
Feanil Patel
1e2ea85372 test: Update more tests that had short passwords. 2023-10-10 16:36:26 -04:00
salman2013
a763287152 chore: remove all reference for bok-choy 2023-09-28 16:05:15 +05:00
Arunmozhi
d417a7561f refactor: rename ItemFactory to BlockFactory 2023-01-23 14:47:47 +01:00
Piotr Surowiec
f419d6b194 feat: deprecate track_function and publish in ModuleSystem [BD-13] (#30046)
* feat: delete `track_function` from ModuleSystem

* feat: delete `publish` argument from ModuleSystem
2022-11-15 10:46:24 -05:00
Sarina Canelake
4a2f231302 fix: fix github url strings (org edx -> openedx) 2022-09-15 14:52:28 -04:00
Michael Terry
afd19f0513 feat!: drop legacy courseware tab access for learners
The only way to access the legacy courseware is now through the
Studio preview feature (and at some point, when the MFE supports a
preview mode, we can then remove even that).

This drops the courseware.use_legacy_frontend waffle.
2022-04-19 12:27:10 -04:00
Michael Terry
b905de757b test: more Old Mongo removal from tests
Convert more tests from MONGO_AMNESTY to SPLIT modulestores.

This is in preparation for just wholesale denying access to Old
Mongo, so I either converted tests to split or just deleted some
test variants that were Old Mongo specific. (e.g. ddt lines)
2022-02-11 14:50:30 -05:00
Michael Terry
cb1bb7fa64 test: switch default test store to the split store
It's long past time that the default test modulestore was Split,
instead of Old Mongo. This commit switches the default store and
fixes some tests that now fail:
- Tests that didn't expect MFE to be enabled (because we don't
  enable MFE for Old Mongo) - opt out of MFE for those
- Tests that hardcoded old key string formats
- Lots of other random little differences

In many places, I didn't spend much time trying to figure out how to
properly fix the test, and instead just set the modulestore to Old
Mongo.

For those tests that I didn't spend time investigating, I've set
the modulestore to TEST_DATA_MONGO_AMNESTY_MODULESTORE - search for
that string to find further work.
2022-02-04 14:32:50 -05:00
Jawayria
4347c35072 chore: Applied lint-amnesty on openedx/tests 2021-12-06 14:01:53 +05:00
stvn
5dd8302d8b refactor: Move GlobalStaffFactory helper to common/ 2021-04-14 07:26:39 -07:00
Usama Sadiq
6a79d47589 refactor: Ran pyupgrade on openedx/{testing, tests} 2021-04-08 14:49:40 +05:00
Aarif
b58ea1f03c replaced unittest assertions pytest assertions (#26576) 2021-02-22 16:18:51 +05:00
Awais Qureshi
7321e9e5eb BOM-2338
Apply pylint-amnesty.
2021-02-08 17:42:01 +05:00
Leonardo Martinez
b4fee68283 Fix the DeprecationWarning for unescape (#23936)
This PR solves the DeprecationWarning mentioned in:
https://build.testeng.edx.org/job/edx-platform-python-pipeline-master/warning_5freport_5fall_2ehtml/

HTMLParser was renamed in html.parser in Python3:
https://docs.python.org/2/library/htmlparser.html#module-HTMLParser

* html_parser.HTMLParser().unescape from six.moves has been deprecated

* instead use html.unescape from Python3

Documentation for unescape in Python3:
https://docs.python.org/3/library/html.html#html.unescape

- html_parser from six.moves has been deprecated

- instead use html.parser from Python3

- Order imports using isort

- Delete unused import crum
2020-06-19 09:27:45 -04:00
Daniel Francis
82c0ca0da8 Fixing implicit parser name for Beautiful Soup (lms, openedx) (#24100)
Fixing 56 GuessedAtParserWarnings, in commit edx#24098

Background: BeautifulSoup automatically picks the fastest parser available. By default, it picks the "lxml" parser.

Per the [BeautifulSoup](https://www.crummy.com/software/BeautifulSoup/bs4/doc/#installing-a-parser) documentation:

> Beautiful Soup supports the HTML parser included in Python’s standard library, but it also supports a number of third-party Python parsers. One is the lxml parser. Depending on your setup, you might install lxml with one of these commands.
> Another alternative is the pure-Python html5lib parser, which parses HTML the way a web browser does. 

Context: We changed two statements, one in lms and another in openedx. Both statements fire up BeautifulSoup. Now we explicitly ask for "lxml," following the recommendation on BeautifulSoup's documentation:

> If you can, I recommend you install and use lxml for speed. If you’re using a very old version of Python – earlier than 2.7.3 or 3.2.2 – it’s essential that you install lxml or html5lib. Python’s built-in HTML parser is just not very good in those old versions.

Before:
`soup = BeautifulSoup(content)`

After:
`soup = BeautifulSoup(markup=content, features="lxml")`

The warnings are gone, tests are passing in local.
2020-06-18 15:41:07 -04:00
Aarif
6ee2089077 fixed warnings for wrong-import-order 2020-04-08 23:43:06 +05:00
Feanil Patel
6e3fe00fff Fix all E303 pep8 errors. 2019-12-30 12:25:38 -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
Ayub
f08a7e7268 Merge pull request #22032 from edx/BOM-xblock-recommender-tests-fix
BOM Project Xblock Recommber integration tests fix
2019-10-15 13:03:40 +05:00
Awais Qureshi
f7adc71c44 BOM-924
Fixing TypeError, the JSON object must be str, not 'bytes'.
2019-10-15 12:11:24 +05:00
Ayub khan
f0133d861d BOM Project Xblock Recommber integration tests fix
Python3 json can not work with bytes type input so used simplejson
instead of python json which works with both bytes and unicode
type input.
Previously we mistakenly updated StringIO to six.String io. which
caused the tests failure. Used io.BytesIO to fix the issues as
assci character bytes can not be converted to unicode.
2019-10-14 18:20:42 +05:00
asadazam93
7a43721f81 Upgrade python 3 decode error 2019-10-04 16:17:11 +05:00
David Ormsbee
9a1385585f Convert response bytes to str before JSON parsing. (#21375)
Convert response bytes to str before JSON parsing.
2019-08-19 11:01:55 -04:00
aarif
61800c619f replaced StringIO imports with import from six
replaced cStringIO and StringIO imports with import from six

fixed StringIO imports

fixed StringIO imports

fixed XSS python-wrap warning
2019-08-08 00:09:16 +05:00
Jeremy Bowman
ff7292538e More pylint fixes (#20692) 2019-05-28 09:19:31 -04:00
aliciaerwin
ddeb7c4204 INCR-237 Run python modernize on openedx/tests (#20494) 2019-05-24 15:46:18 -04:00
Michael Youngstrom
4bbd1dee0b Remove shards from commonlib-unit tests 2019-02-12 14:28:35 -05:00
Dillon Dumesnil
dbd85410f8 Removing test file for removed review xblock 2019-01-31 10:19:54 -05:00
cclauss
8fca11b85c Use print() function in both Python 2 and Python 3 2019-01-13 17:16:37 +01:00
Farhanah Sheets
5c3c0f0fcb Edit test value to be valid URL format 2018-09-10 20:21:56 -04:00
Jeremy Bowman
3ff3eee2f2 TE-2689 Remove useless pylint suppressions part 4 2018-08-20 12:54:22 -04:00
Jeremy Bowman
c290bf8a07 TE-2524 Stop using nose.plugins - openedx 2018-08-02 14:54:50 -04:00
Eric Fischer
247bb50ed2 s/django.core.urlresolvers/django.urls/g
Django 1.10 deprecation fix for Hackathon XIX
Addresses PLAT-1397
2018-06-05 13:59:09 -04:00
Stuart Young
1fd2167144 rebalance python unittests onto new shards 2018-05-03 11:16:05 -04:00
Jeremy Bowman
113e8dde61 PLAT-1885 Stop using deprecated BlockUsageLocator properties 2018-01-12 16:40:21 -05:00
Jeremy Bowman
d3d6272d8f PLAT-1873 to_deprecated_string() cleanup part 1 2018-01-08 13:51:42 -05:00
Dillon Dumesnil
a03ce146a0 Removing debugging 2017-12-08 15:35:29 -05:00
Dillon Dumesnil
aa8b7ab2ec Fixing correctness text so it doesn't match 'correct' in the word 'correctness' causing my tests to fail. This should be improved soon 2017-12-08 13:34:44 -05:00