豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

LukeSavefrogs/jython21-backport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

185 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jython 2.1 backporting

CPython tests CPython tests CPython tests

Jython tests Jython tests Jython tests

Collection of features present in newer Python versions (v2.x, v3.x) backported to legacy Python versions (tested down to v2.1).

Supported Python implementation:

Features

This package provides backporting for the following features:

Tests

After 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).

All repository

To run all the tests in this repository use the following command:

poetry run python -m unittest discover ./src/

You can test single files using the following commands:

Single module

Locally

When developing using poetry use the following command:

poetry run python /path/to/module.py

For example:

(polyfills-py3.9) → ~\polyfills › poetry run python .\src\polyfills\pathlib\__init__.py
..........
----------------------------------------------------------------------
Ran 10 tests in 0.004s

OK

Remotely

To run tests on a host running the Websphere Application Server Jython console (wsadmin.sh) run the following command:

/path/to/profile/bin/wsadmin.sh -lang jython -f /path/to/module.py

For example:

username@hostname ~ $ /opt/Websphere/MyCell/profiles/dmgr/bin/wsadmin.sh -lang jython -f /src/polyfills/pathlib/__init__.py
WASX7209I: Connected to process "dmgr" on node MyNode using SOAP connector;  The type of process is: DeploymentManager
..........
----------------------------------------------------------------------
Ran 10 tests in 0.068s

OK

About

Backporting of some newer Python features down to Jython 2.1

Topics

Resources

License

Stars

Watchers

Forks

Languages