Unreleased
Upcoming changes that will be in the next release.Fixed
- Fixed dict comprehension code generation crash (
TypeError: 'Tuple' object is not subscriptable) incpp.pyby accessingnode.elt.elts[0]/node.elt.elts[1]instead ofnode.elt[0]/node.elt[1] - Fixed dict comprehension type inference in
graph.py:isinstance(node.elt, tuple)was alwaysFalseforast.Tuplenodes, so key/value type constraints were never set up. Changed tonode in self.gx.dictcomp_to_lc.values() - Fixed
runtests --runexecuting unbuilt ext tests by aligning ctest regex with the build target suffix incmake.py - Added missing
WORKING_DIRECTORYfor non-Windows ext tests in CMake configuration
Changed
- Converted build system to uv, replacing pip/setuptools workflow with
uvcommands in Makefile - Applied mypy strict mode fixes across core modules (
__init__,cmake,config,cpp,graph,infer,makefile,stats) - Converted documentation from Sphinx/RST to MkDocs with Markdown
- Replaced
README.rstwithREADME.md - Removed generated Sphinx HTML/JS/CSS assets from
docs/ - Added
mkdocs.ymlconfiguration
- Replaced
- Updated
Makefiletest target to fix test invocation - Refactored
graph.pyandinfer.pyto resolve type issues
Removed
- Removed
requirements.txt(dependencies now managed viapyproject.tomland uv)
[0.9.12] - 2024
Major release introducing local dependency management and significant internal refactoring.Added
Local Dependency Management
Starting with 0.9.12,
--local-deps is now the default dependency manager, eliminating the need for external package managers.- Local dependency management (
--local-depsflag) with bundled zip archives:- Builds bdwgc and pcre2 from compressed sources in
shedskin/ext/ - Extracts to platform-specific cache on first use:
- macOS:
~/Library/Caches/shedskin/ - Linux:
~/.cache/shedskin/ - Windows:
%LOCALAPPDATA%/shedskin/Cache/
- macOS:
- Caches built static libraries for subsequent compilations
- Works completely offline (no network required)
- Cross-platform support (Linux, macOS, Windows)
- Builds bdwgc and pcre2 from compressed sources in
LocalDependencyManagerclass incmake.pyfor zip-based dependency building- CLI option
--local-depsfor bothtranslate(Makefile) andbuild(CMake) commands
Testing
- Unit tests for core modules (
tests/unit/, 74 tests total):test_config.py: Tests for GlobalInfo and state objectstest_graph.py: Tests for constraint graph buildingtest_infer.py: Tests for type inferencetest_cpp.py: Tests for C++ code generation config
Changed
Dependency Management
- Made
--local-depsthe default dependency manager forbuild,run, andruntestssubcommands- Dependencies are now automatically built from bundled
ext/sources - No external package manager required out of the box
- Dependencies are now automatically built from bundled
- Bundled bdwgc (v8.2.10) and pcre2 (pcre2-10.47) sources as compressed zip archives in
ext/:- Reduced from 25MB (full sources) to 1.2MB (trimmed and compressed)
- Removed documentation, tests, CI/CD files, autotools, legacy platform support
- Removed SLJIT (JIT compiler) from pcre2 as Shed Skin doesn’t use JIT features
- Simplified CMake output directories to
${CMAKE_BINARY_DIR}(executables inbuild/)
Architecture Refactoring
- Refactored
GlobalInfoclass into focused state objects for better code organization:FileSystemPaths: Immutable paths for shedskin installation, resources, and librariesBuildConfiguration: Build flags (bounds_checking, int32/64, nogc, etc.)NamingContext: C++ keywords, prefix, and builtin type namesEntityRegistry: Functions, classes, variables, modules, and inheritance trackingGraphBuildingContext: Temporary graph building state (loops, comprehensions, etc.)TypeInferenceState: Core type inference data (cnode, types, constraints, etc.)
- Created new
shedskin/state/package containing the focused state dataclasses - Maintained 100% backwards compatibility via property delegation in
GlobalInfo
CLI Improvements
- Consolidated CLI argument definitions using argparse parent parsers:
- Created
_create_shared_parsers()method with reusable argument groups - Shared parsers:
stats,types,disable,compiler,cmake - Reduced code duplication across
translate,build,run,runtestssubcommands
- Created
Security
- Replaced
os.system()withsubprocess.run()across all modules:cmake.py: shellcmd, cmake config/build/test, pytestmakefile.py: Command execution in_execute()__init__.py: Executable running and Windows color output hack
Documentation
- Documented type inference tuning constants in
infer.py:INCREMENTAL: Enable incremental analysis modeINCREMENTAL_FUNCS: Functions to add per round (default: 5)INCREMENTAL_DATA: Enable incremental allocation trackingINCREMENTAL_ALLOCS: Allocations before restart (default: 1)MAXITERS: Maximum iterations per round (default: 30)CPA_LIMIT: Initial cartesian product limit (default: 10)
- Added
MAX_TYPE_DEPTHconstant intypestr.pyfor recursion limit (default: 10)
Fixed
- Fixed CMake build failure when source file path is absolute (e.g., building from a different directory with
../examples/foo.py). The issue occurred because absolute parent paths were being concatenated with build directories, creating invalid paths likebuild/exe/C:/Users/.../file.cpp - Resource leaks: Added context manager support to
MakefileWriterclass - File handling: Use context managers for file operations in
config.py
Removed
- Removed Conan dependency manager support:
- Removed
--conanCLI option - Removed
ConanBDWGC,ConanPCRE, andConanDependencyManagerclasses - Removed
ENABLE_CONANCMake option - Removed
shedskin/resources/conan/directory - Removed conan from
requirements.txt
- Removed
Version History
Shed Skin has been in development since 2005. Version 0.9.12 represents a significant milestone in maturity and usability.Key Milestones
- 2005: Initial release by Mark Dufour
- Various versions: Gradual improvements in type inference, optimization, and library support
- 0.9.x series: Focus on stability, usability, and modern Python 3 support
- 0.9.12 (2024): Major architectural improvements and simplified dependency management
Performance Evolution
Shed Skin has consistently improved performance over the years:Example Programs
Shed Skin successfully compiles over 80 non-trivial programs (at over 25,000 lines in total), including:- Games: DOOM, Othello, Quake, C64 emulator
- Graphics: Ray tracer, Voronoi diagrams, 3D rendering
- Algorithms: A*, neural networks, genetic algorithms
- Utilities: rsync-like tool, SHA implementations