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 .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion mathparse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
mathparse is a library for solving mathematical equations contained in strings
"""

__version__ = '0.2.6'
__version__ = '0.2.7'
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ version = {attr = "mathparse.__version__"}

[project]
name = "mathparse"
requires-python = ">=3.9,<3.14"
requires-python = ">=3.9,<3.15"
urls = { Documentation = "https://mathparse.chatterbot.us", Repository = "https://github.com/gunthercox/mathparse", Changelog = "https://github.com/gunthercox/mathparse/releases" }
authors = [
{name = "Gunther Cox"},
Expand Down
16 changes: 14 additions & 2 deletions tests/test_prefix_unary_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,13 @@ def test_sqrt_with_negative_causes_math_error(self):
# Verify it causes the expected math error
with self.assertRaises(ValueError) as context:
mathparse.parse('sqrt -16')
self.assertIn("math domain error", str(context.exception).lower())
# Python 3.14+ uses more specific error messages
error_msg = str(context.exception).lower()
self.assertTrue(
"math domain error" in error_msg or
"expected a nonnegative input" in error_msg,
f"Unexpected error message: {error_msg}"
)

def test_log_with_negative_causes_math_error(self):
"""
Expand All @@ -168,7 +174,13 @@ def test_log_with_negative_causes_math_error(self):
# Verify it causes the expected math error
with self.assertRaises(ValueError) as context:
mathparse.parse('log -10')
self.assertIn("math domain error", str(context.exception).lower())
# Python 3.14+ uses more specific error messages
error_msg = str(context.exception).lower()
self.assertTrue(
"math domain error" in error_msg or
"expected a positive input" in error_msg,
f"Unexpected error message: {error_msg}"
)

def test_sqrt_with_positive_after_operator(self):
"""
Expand Down