Python3.11などの新しいバージョンのコードを、古いバージョンで動作するように変換するツールです。
あくまでも動作するように小手先の変換を施すだけであって、複雑なパターンの変換や厳密な等価性が必要な場合には使用できません。 また、当然ですが可読性はある程度失われます。
具体的には、以下のような変換を行います。
- 代入や関数定義の型アノテーションを文字列リテラルに置き換える
- 旧バージョンに存在しない要素の
from typing importを削除する alias: TypeAlias = SomeTypeという形のTypeAliasの定義をする代入文の右辺を文字列リテラルに置き換える- match文をif文に変換する(複雑なものには未対応)
Release files for compatibilityer 0.3.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| compatibilityer-0.3.8.tar.gz | 4.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| compatibilityer-0.3.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.3 kB
Release files / compatibilityer-0.3.8.tar.gz
| Download URL | compatibilityer-0.3.8.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d7ee77e141af8a228dd39286c1657598498434d7515e51a5f114943982d610a
|
|
BLAKE2b-256 checksum How to use checksums |
3090b7294130976d7a8da70deae590dd0a3f70bbc12f3fbf5b8862c95f1feba2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.11.0rc2 Linux/5.15.0-52-generic
|
Release files / compatibilityer-0.3.8-py3-none-any.whl
| Download URL | compatibilityer-0.3.8-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc91b247d27f713024b7dedd62d53ba71c20a2604827c404293db10b6ef5300e
|
|
BLAKE2b-256 checksum How to use checksums |
5d139d9c811b37f2535880851219bae0d4290e99b628adba53169ef62a393441
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.11.0rc2 Linux/5.15.0-52-generic
|