Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Python optimizations temporarily in final release builds to preserve assert statements and runtime checks #266

Merged

Conversation

cary-rowen
Copy link
Collaborator

@cary-rowen cary-rowen commented Sep 7, 2024

Link to issue number:

This change addresses the handling of Python optimization in final release builds.

Summary of the issue:

In previous builds, Python’s optimization mode was automatically activated for final releases, which resulted in the removal of assert statements. This led to the omission of critical runtime checks in the production environment, potentially causing unexpected behavior or failure in the application.

Description of how this pull request fixes the issue:

This pull request disables Python’s optimization mode in final release builds to ensure that assert statements and important runtime checks are preserved. Although optimizations are typically desired for final releases, this is a temporary measure until we can implement a more robust way of handling runtime checks without relying on assert statements. Clear messaging has also been added to indicate that optimization will be revisited in future versions.

Testing performed:

Manual testing of the build process confirmed that Python optimizations are no longer applied, and the assert statements remain active, even in final release versions. The program runs successfully with the critical checks intact.

Known issues with pull request:

None currently known, but future work will involve reevaluating how to enable optimizations while maintaining necessary runtime validations.

…reserve assert statements and runtime checks.
@cary-rowen cary-rowen merged commit ce6cde7 into blindpandas:develop Sep 7, 2024
1 check was pending
@cary-rowen cary-rowen deleted the DisablePythonOptimization branch September 7, 2024 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant