Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "streams.py"
version = "1.3.0"
version = "1.4.0"
authors = ["Stefan Garlonta <stefan@pickwicksoft.org>"]
description = "A stream library for Python inspired by Java Stream API"
keywords = ["streams", "parallel", "data"]
Expand Down
2 changes: 1 addition & 1 deletion pystreamapi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from pystreamapi.__stream import Stream
from pystreamapi._streams.error.__levels import ErrorLevel

__version__ = "1.3.0"
__version__ = "1.4.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Consider deriving version from pyproject.toml (or a single source) to avoid drift between version declarations.

Having the version in both pyproject.toml and init.py increases the risk of mismatch. Consider reading it from a single authoritative source (e.g., importlib.metadata, a generated _version module, or a small script) so it only needs updating in one place.

Suggested implementation:

from importlib import metadata

from pystreamapi.__stream import Stream
from pystreamapi._streams.error.__levels import ErrorLevel

try:
    # Derive version from package metadata (pyproject.toml / setup)
    __version__ = metadata.version("pystreamapi")
except metadata.PackageNotFoundError:
    # Fallback for editable / local usage when package metadata is unavailable
    __version__ = "0.0.0"

__all__ = ["Stream", "ErrorLevel"]
  1. Ensure the project name in pyproject.toml is exactly "pystreamapi" so metadata.version("pystreamapi") matches the distribution name.
  2. If you want __version__ to be part of the public API, you may also want to add "__version__" to __all__ elsewhere in your codebase, or in this file.

__all__ = ["Stream", "ErrorLevel"]
Loading