All notable changes to the Python package will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Rebrand:
aiperceivable→apstack(updated package metadata, URLs, README, andNOTICE).
apdev[release]andapdev[dev]now includetwine>=6.1.0(with PEP 639 / Metadata 2.4 support) alongsidebuild>=1.0.
release.shnow checks PyPI release status via the PyPI JSON API instead of requiringpip, so it works inuv-managed virtual environments withoutpip.release.shnow resolvestwineviatwine,python -m twine, oruvxfallback, and points missing-tool errors toapdev[release].
release.shauto-derives the git tag prefix from the package's relative path under the repository root (e.g.python/vX.Y.Zinapcore/apdev,mcp/python/vX.Y.Zinapcore-surfaces), falling back topythonat the repository root (compatible withapflow,django-apcore, etc.).- Override tag prefix via
TAG_PREFIXenv var (includingTAG_PREFIX=""for barevX.Y.Ztags) or[tool.apdev] tag_prefixinpyproject.toml. - Override GitHub release title via
RELEASE_TITLEenv var. - Tests in
tests/test_release_scripts.pycovering tag prefix and release title resolution across Python, TypeScript, and Rust release scripts.
- Default GitHub release title and annotated git tag message changed from
Release <version>to<project> (Python) v<version>for clear identification in multi-package and multi-language monorepos. release.shheader banner now prints the resolvedTagandReleasetitle.
create_github_release_apinow builds JSON withjq -n --arg ... --rawfileso special characters inRELEASE_TITLEorTAGcannot break the payload.
- CI for the Python package: ruff check and format, pytest with coverage on a
3.10-3.13 matrix,
bash -nand shellcheck forrelease.sh,python -m buildplustwine check, anduv lock --check. make lint-python,format-python,test-python,build-pythonandcheck-pythonin the root Makefile.[tool.apdev]in this package's ownpyproject.toml, and a CI step that runsapdev check-charsandapdev check-importson the package itself.- The package declares
Typing :: Typed, matching thepy.typedit ships.
- Ship the Apache-2.0 licence:
LICENSEandNOTICEare now in the repository, the wheel and the sdist, with PEP 639 metadata (license = "Apache-2.0"pluslicense-files). The licence classifier is gone, andbuild-system.requiresneedssetuptools>=77. buildmoved out of the runtime dependencies intoapdev[release], and stays inapdev[dev]. A plain install no longer pullsbuild,packagingandpyproject-hooks, andrelease.shnames the extra when the frontend is missing.- ruff also checks
B,UP,SIM,RUFandPTH; pytest runs with-ra --strict-markers --strict-configand enforces coverage at 80% (branch coverage is 87%). uv.lockregenerated; it still pinned apdev 0.2.5.
check-importsno longer reports "no circular imports detected" when nothing was scanned: a missing package directory, a wrong--package, or a package without modules exits 1.from pkg import subis recorded aspkg.sub, so cycles using that import style are found.check-chars: missing paths report "file not found", malformed charset files reportError: Invalid charset ...instead of a JSON traceback, binary files are skipped instead of raisingUnicodeDecodeError, and an explicit path that expands to nothing is an error.- The test modules start with
from __future__ import annotations, sostr | Pathsignatures no longer break collection on Python 3.10. release.shno longer useslocal x=$(...), which masked exit statuses (shellcheck SC2155).- CI: the workflow-level
defaults.run.working-directoryalso applied to the shellcheck job, resolving its path topython/python/src/...; the default is scoped to the test job now. - Three assertions in the charset tests were written the wrong way round (they
asked whether a range sits inside the CJK block instead of whether CJK sits
inside a range); they use a
_contains()helper now. - Test fixtures use
\uescapes rather than literal CJK, so the repository passes its own defaultcheck-charsrun.
apdev release --account NAME/-a NAME, and[tool.apdev] github_account, so the GitHub release is published as a chosenghlogin instead of whichever account happens to be active. The token is resolved withgh auth token --user NAMEand exported for that run only, so the active account is never switched;GITHUB_ACCOUNTworks as an environment override, and an account that is not logged in aborts before any step runs.- The release header prints
GitHub user: <login>next to the PyPI section. get_github_tokenhonoursGH_TOKENwhen step 6.5 clearsGITHUB_TOKEN, so the API fallback uses the same account as the CLI.
- The README documents
github_accountand the two-loginghsetup.
owner/repois parsed from any remote form, including per-account SSH aliases such asgit@github-work:owner/repo.git. Previously only agithub.comprefix was stripped, so step 6.5 passed a URL togh release create --repoand failed.
apdev release --repository NAME/-r NAME, and[tool.apdev] pypi_repositoryin the consumer project, sotwine uploadtargets a named~/.pypircsection instead of always using[pypi]. Resolution order is flag,PYPI_REPOSITORYenvironment variable,[tool.apdev], thenpypi.- The release header prints the resolved section, so it is obvious which PyPI account a release will use before anything is uploaded.
[tool.apdev]keys are documented in the README Configuration section, includingpypi_repository.
release.shparses its arguments with a while loop, and readspypi_repositorywith awk instead oftomllib, so the script still works on machines whosepython3predates 3.11.
- Refresh
uv.lock(pytest9.2.0,coverage7.16.2, and other patch updates). No public API changes.
apdev releaseuses the project's.venvwhen invoked without an active virtual environment, so it can find the project's Python and release tools.apdev.__version__now matches the package version; it had drifted to0.2.3.
- Rebrand: aipartnerup → aiperceivable
- Release script version check now supports dynamic versions via
importlib.metadata(not just static__version__ = "x.x.x") - Added hint message suggesting
pip install -e .when version mismatch is detected
- Custom charset support via shared JSON definition files (
shared/charsets/) load_charset(name_or_path)— load a bundled preset (e.g.chinese) or custom JSON fileresolve_charsets(charset_names, charset_files)— merge base + extra charsets with deduplication- Bundled charset presets:
base,chinese,japanese,korean - CLI
--charsetflag (repeatable) to enable preset charsets - CLI
--charset-fileflag (repeatable) to load custom charset JSON files APDEV_EXTRA_CHARSenvironment variable — comma-separated charset names or file paths, used as fallback when no CLI args providedcheck-chars: Block Elements (U+2580-U+259F) and Braille Patterns (U+2800-U+28FF) to default allowed ranges
- Character ranges and dangerous codepoints now loaded from
charsets/base.jsoninstead of hardcoded constants check_file()andcheck_paths()accept optionalextra_rangesanddangerouskwargs for custom charset supportis_allowed_char()now excludes dangerous codepoints (Trojan Source vectors) even though they fall within the General Punctuation allowed range
is_allowed_char()previously returnedTruefor dangerous codepoints (U+200B, U+202E, etc.) because they fall within the General Punctuation range (U+2000-U+206F)load_charset()now catches all exceptions fromimportlib.resources(not justFileNotFoundError)check_file()now uses lazy-loaded cache instead of re-parsingbase.jsonon every call
check-chars: Dangerous character blacklist (bidi controls + zero-width chars, CVE-2021-42574) with comment-aware detection — flags in code, allows in commentscheck-chars:is_dangerous_char()public function andDANGEROUS_CODEPOINTSconstantcheck-chars: Comment region detection state machine for Python (#) and JS/TS (//,/* */) with string literal trackingcheck-imports: Relative import support —from .foo import xandfrom . import foonow resolve correctly for cycle detection
check-imports:ImportAnalyzernow handlesnode.level > 0(relative imports) by resolving againstcurrent_modulewith correct package vs module distinction
- Use language-prefixed git tags (
python/v0.1.5) to support monorepo with independent package versions - URL-encode tag in GitHub API calls to handle
/in tag names
- Fix release script version check to use
PACKAGE_NAMEwhen reading init.py
- Add
PACKAGE_NAMEdefault (project name with hyphens converted to underscores) for release script
- Fix PyPI version check false positives: use exact match instead of
grep -wto prevent partial version matching (e.g.0.2.0matching0.2.0.1) - Fix
sedRE error on macOS when detecting GitHub repo from git remote (BSD sed doesn't support non-greedy.+?)
- Add
build>=1.0as a project dependency for package building support
check-chars- Validate files contain only allowed characters (ASCII, emoji, technical symbols)check-imports- Detect circular imports in a Python package with configurable--packageand--src-dir- Unified CLI entry point:
apdev <command> - Configuration support via
[tool.apdev]in consumer'spyproject.toml - Pre-commit hook definitions for
check-charsandcheck-imports apdev release- Interactive release automation (auto-detects project name and GitHub repo)python -m apdevsupport