Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Cereja library to version 2.1.2 with a focus on memory management improvements and new cryptography features. The changes include replacing time.time() with time.monotonic() for more reliable elapsed time measurements, implementing comprehensive memory cleanup with weak references and threading locks, and introducing a new cryptography module with encryption/decryption capabilities.
Key Changes
- Memory Management: Enhanced
_Stdout,_ConsoleBase,Progress, andMatrixclasses with weak references, thread locks, and proper cleanup methods to prevent memory leaks - Time Measurement: Migrated from
time.time()totime.monotonic()across all timing-related code for monotonic clock guarantees - New Cryptography Module: Added
cereja/hashtools/_crypto.pywith custom HMAC-based stream cipher for encryption/decryption operations
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 30 comments.
Show a summary per file
| File | Description |
|---|---|
| cereja/init.py | Updated version to 2.1.2 and added hashtools exports |
| cereja/hashtools/_crypto.py | New cryptography module with custom stream cipher implementation |
| cereja/hashtools/init.py | Added crypto module exports |
| tests/testcrypto.py | Comprehensive test suite for new crypto functionality |
| cereja/experimental/gitchangelog.py | New git changelog generation utility |
| cereja/utils/time.py | Replaced time.time() with time.monotonic() in Timer class |
| cereja/utils/decorators.py | Updated time_exec and scheduled decorators to use monotonic time |
| cereja/system/_win32.py | Updated Windows timer implementation to use monotonic time |
| cereja/concurrently/process.py | Updated process timing to use monotonic clock |
| cereja/display/_display.py | Major refactoring with weak references, thread safety, and resource cleanup |
| cereja/array/_array.py | Improved flatten algorithm, enhanced Matrix class with better documentation |
| cereja/utils/git/runner.py | Modified git command execution with stdout redirection changes |
| tests/testsDataIterator.py | Expanded test data for random element testing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| try: | ||
| self.stop() | ||
| self.cleanup() | ||
| except: |
There was a problem hiding this comment.
'except' clause does nothing but pass and there is no explanatory comment.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.