{"id":15008781,"url":"https://github.com/lukesavefrogs/jython21-backport","last_synced_at":"2026-03-15T12:22:01.146Z","repository":{"id":164352536,"uuid":"639791416","full_name":"LukeSavefrogs/jython21-backport","owner":"LukeSavefrogs","description":"Backporting of some newer Python features down to Jython 2.1","archived":false,"fork":false,"pushed_at":"2025-11-13T14:48:45.000Z","size":154,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-13T04:09:17.489Z","etag":null,"topics":["jython","legacy-python","polyfill","python","python-legacy","python2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LukeSavefrogs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"LukeSavefrogs","patreon":"LukeSavefrogs","ko_fi":"lukesavefrogs","custom":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=RN3XMAHA8FZEE\u0026source=url"]}},"created_at":"2023-05-12T08:31:27.000Z","updated_at":"2025-11-13T14:48:29.000Z","dependencies_parsed_at":"2023-11-14T13:27:28.924Z","dependency_job_id":"7a8f5afc-72df-4479-8b52-6c447c701058","html_url":"https://github.com/LukeSavefrogs/jython21-backport","commit_stats":{"total_commits":179,"total_committers":1,"mean_commits":179.0,"dds":0.0,"last_synced_commit":"61b6ffc1663fadef1f77c047139864b9cc1c3f60"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/LukeSavefrogs/jython21-backport","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeSavefrogs%2Fjython21-backport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeSavefrogs%2Fjython21-backport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeSavefrogs%2Fjython21-backport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeSavefrogs%2Fjython21-backport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LukeSavefrogs","download_url":"https://codeload.github.com/LukeSavefrogs/jython21-backport/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeSavefrogs%2Fjython21-backport/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28003386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jython","legacy-python","polyfill","python","python-legacy","python2"],"created_at":"2024-09-24T19:20:32.749Z","updated_at":"2025-12-24T13:39:39.451Z","avatar_url":"https://github.com/LukeSavefrogs.png","language":"Python","funding_links":["https://github.com/sponsors/LukeSavefrogs","https://patreon.com/LukeSavefrogs","https://ko-fi.com/lukesavefrogs","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=RN3XMAHA8FZEE\u0026source=url"],"categories":[],"sub_categories":[],"readme":"# Jython 2.1 backporting\n\n[![CPython tests](https://github.com/LukeSavefrogs/jython21-backport/actions/workflows/run-python-tests-lin.yml/badge.svg)](https://github.com/LukeSavefrogs/jython21-backport/actions/workflows/run-python-tests-lin.yml)\n[![CPython tests](https://github.com/LukeSavefrogs/jython21-backport/actions/workflows/run-python-tests-mac.yml/badge.svg)](https://github.com/LukeSavefrogs/jython21-backport/actions/workflows/run-python-tests-mac.yml)\n[![CPython tests](https://github.com/LukeSavefrogs/jython21-backport/actions/workflows/run-python-tests-win.yml/badge.svg)](https://github.com/LukeSavefrogs/jython21-backport/actions/workflows/run-python-tests-win.yml)\n\n[![Jython tests](https://github.com/LukeSavefrogs/jython21-backport/actions/workflows/run-jython-tests-lin.yml/badge.svg)](https://github.com/LukeSavefrogs/jython21-backport/actions/workflows/run-jython-tests-lin.yml)\n[![Jython tests](https://github.com/LukeSavefrogs/jython21-backport/actions/workflows/run-jython-tests-mac.yml/badge.svg)](https://github.com/LukeSavefrogs/jython21-backport/actions/workflows/run-jython-tests-mac.yml)\n[![Jython tests](https://github.com/LukeSavefrogs/jython21-backport/actions/workflows/run-jython-tests-win.yml/badge.svg)](https://github.com/LukeSavefrogs/jython21-backport/actions/workflows/run-jython-tests-win.yml)\n\nCollection of features present in **newer Python** versions (`v2.x`, `v3.x`) backported to **legacy Python versions** (tested down to `v2.1`).\n\nSupported Python implementation:\n\n- [**CPython**](https://www.python.org/)\n- [**Jython**](https://www.jython.org/)\n\n## Features\n\nThis package provides backporting for the following features:\n\n- [**`pathlib.Path()`**](src/polyfills/pathlib/) class (`Python\u003e=3.4`)\n- [**`bool()`**](src/polyfills/stdlib/future_types/) class (`Python\u003e=2.3`) as well as `True` and `False` ([`Python\u003e=2.3`](https://giedrius.blog/2018/01/04/what-is-actually-true-and-false-in-python/))\n- [**`dict()`**](src/polyfills/stdlib/future_types/) class\n- [**`sorted()`**](src/polyfills/stdlib/) function (`Python\u003e=2.4`)\n- [**`sum()`**](src/polyfills/stdlib/) function (`Python\u003e=2.3`)\n- [**`collections.OrderedDict()`**](src/polyfills/collections/) (`Python\u003e=2.7`)\n- [**`json`**](src/polyfills/json/) module (`Python\u003e=2.6`)\n- [**`logging`**](src/polyfills/logging/) module (`Python\u003e=2.3`)\n- [**`itertools`**](src/polyfills/itertools/) module (`Python\u003e=2.3`)\n- [**`set()`**](src/polyfills/stdlib/sets.py) class (`sets` module `Python\u003e=2.3`, standard library `Python\u003e=2.4`)\n- [**`print()`**](src/polyfills/stdlib/) function (keyword arguments such as `end` or `sep` were added in `Python 3.3`, see module docstring for more details)\n\n## Tests\n\nAfter performing a change to a module it's best practice to **always run tests** and update those failing (or add some if it's a new feature).\n\n### All repository\n\nTo run all the tests in this repository use the following command:\n\n```shell\npoetry run python -m unittest discover ./src/\n```\n\nYou can test single files using the following commands:\n\n### Single module\n\n#### Locally\n\nWhen developing using `poetry` use the following command:\n\n```shell\npoetry run python /path/to/module.py\n```\n\nFor example:\n\n```shell\n(polyfills-py3.9) → ~\\polyfills › poetry run python .\\src\\polyfills\\pathlib\\__init__.py\n..........\n----------------------------------------------------------------------\nRan 10 tests in 0.004s\n\nOK\n```\n\n#### Remotely\n\nTo run tests on a host running the Websphere Application Server Jython console (`wsadmin.sh`) run the following command:\n\n```shell\n/path/to/profile/bin/wsadmin.sh -lang jython -f /path/to/module.py\n```\n\nFor example:\n\n```shell\nusername@hostname ~ $ /opt/Websphere/MyCell/profiles/dmgr/bin/wsadmin.sh -lang jython -f /src/polyfills/pathlib/__init__.py\nWASX7209I: Connected to process \"dmgr\" on node MyNode using SOAP connector;  The type of process is: DeploymentManager\n..........\n----------------------------------------------------------------------\nRan 10 tests in 0.068s\n\nOK\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukesavefrogs%2Fjython21-backport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukesavefrogs%2Fjython21-backport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukesavefrogs%2Fjython21-backport/lists"}