{"id":10001,"library":"okonomiyaki","title":"Okonomiyaki","description":"Okonomiyaki is a self-contained Python library designed to handle metadata specifically for Enthought-specific egg and runtime archives. It provides tools for creating, reading, and manipulating package information, platforms, and versions. The current version is 3.0.0, with major versions introducing significant breaking changes and an irregular release cadence.","status":"active","version":"3.0.0","language":"en","source_language":"en","source_url":"https://github.com/enthought/okonomiyaki","tags":["packaging","metadata","enthought","eggs","runtime","platform"],"install":[{"cmd":"pip install okonomiyaki","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"symbol":"PackageInfo","correct":"from okonomiyaki.package_info import PackageInfo"},{"symbol":"EPDPlatform","correct":"from okonomiyaki.platforms import EPDPlatform"},{"symbol":"PythonVersion","correct":"from okonomiyaki.versions import PythonVersion"},{"symbol":"PEP440Version","correct":"from okonomiyaki.versions import PEP440Version"}],"quickstart":{"code":"from okonomiyaki.package_info import PackageInfo, PackageInfoVersion\nfrom okonomiyaki.platforms import EPDPlatform\nfrom okonomiyaki.versions import PythonVersion, PEP440Version\n\n# Create a PackageInfo object\npackage_info = PackageInfo(\n    name=\"scipy\",\n    version=PEP440Version(\"1.7.3\"),\n    build=2,\n    os_name=\"win\",\n    arch=\"x86_64\",\n    python_version=PythonVersion(3, 9, 7),\n    platform_version=\"\", # For Windows, platform_version is often empty\n    package_info_version=PackageInfoVersion.from_string(\"2.1\") # Default for v3.0.0\n)\n\nprint(f\"Package Name: {package_info.name}\")\nprint(f\"Package Version: {package_info.version}\")\nprint(f\"Platform: {package_info.platform.full_string}\")\nprint(f\"Python Version: {package_info.python_version.api_string}\")\n\n# Note: In Okonomiyaki 3.0.0, 'platforms' attribute was renamed to 'platform'\n# And 'supported_platforms' was renamed to 'supported_platform'\n# If this was an older version (pre-3.0.0), you might use package_info.platforms\n","lang":"python","description":"This quickstart demonstrates how to create a `PackageInfo` object, which is central to defining metadata for packages. It shows how to specify the package's name, version, build, platform details, and Python compatibility. It also highlights accessing the renamed 'platform' attribute in version 3.0.0."},"warnings":[{"fix":"Update your code to use `package_info.platform` instead of `package_info.platforms`.","message":"The `PackageInfo` attribute `platforms` was renamed to `platform`. Accessing the old attribute will result in an `AttributeError`.","severity":"breaking","affected_versions":"3.0.0+"},{"fix":"Update your code to use `package_info.supported_platform` instead of `package_info.supported_platforms`.","message":"The `PackageInfo` attribute `supported_platforms` was renamed to `supported_platform`. Accessing the old attribute will result in an `AttributeError`.","severity":"breaking","affected_versions":"3.0.0+"},{"fix":"Explicitly set `package_info_version=PackageInfoVersion.from_string(\"2.0\")` if compatibility with older metadata formats is required, or ensure your code handles metadata version 2.1.","message":"The default `package_info_version` for `PackageInfo` objects is now 2.1. Code that expects older default versions (e.g., 2.0) might behave differently, especially when serializing/deserializing.","severity":"breaking","affected_versions":"3.0.0+"},{"fix":"Ensure your environment is running Python 3.6 or higher. Older versions of Okonomiyaki might support Python 2, but are no longer maintained.","message":"Python 2.x support was completely removed. Okonomiyaki now requires Python 3.6 or newer.","severity":"breaking","affected_versions":"2.0.0+"},{"fix":"Remove any usage of `EPDPlatform.short`. Replace references to `LegacyEPDPlatform` with `EPDPlatform` and update logic as needed.","message":"The `EPDPlatform` class had its 'short' attribute removed, and `LegacyEPDPlatform` was entirely removed.","severity":"breaking","affected_versions":"2.0.0+"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Change `package_info.platforms` to `package_info.platform`.","cause":"In version 3.0.0, the `platforms` attribute on `PackageInfo` was renamed to `platform`.","error":"AttributeError: 'PackageInfo' object has no attribute 'platforms'"},{"fix":"Remove any usage of the `short` attribute from `EPDPlatform` instances.","cause":"The `short` attribute was removed from `EPDPlatform` in version 2.0.0.","error":"AttributeError: 'EPDPlatform' object has no attribute 'short'"},{"fix":"Replace `LegacyEPDPlatform` with `EPDPlatform` and adjust your code to the modern `EPDPlatform` API.","cause":"The `LegacyEPDPlatform` class was removed in version 2.0.0.","error":"ImportError: cannot import name 'LegacyEPDPlatform' from 'okonomiyaki.platforms'"},{"fix":"Upgrade your Python interpreter to version 3.6 or higher.","cause":"Okonomiyaki versions 2.0.0 and above dropped Python 2.x support and use Python 3-specific syntax (e.g., f-strings).","error":"SyntaxError: invalid syntax (if you try to run on Python 2.x)"}]}