Fix missing mdoc, mso, & tests folders when installing on Windows.#11
Merged
peppelinux merged 4 commits intoIdentityPython:mainfrom Mar 17, 2025
Merged
Conversation
peppelinux
approved these changes
Mar 15, 2025
PascalDR
reviewed
Mar 17, 2025
pymdoccbor/mso/issuer.py
Outdated
| :rtype: Sign1Message | ||
| """ | ||
| utcnow = datetime.datetime.utcnow() | ||
| utcnow = datetime.datetime.now(datetime.UTC) |
Contributor
There was a problem hiding this comment.
Suggested change
| utcnow = datetime.datetime.now(datetime.UTC) | |
| utcnow = datetime.datetime.now(timezone.utc) |
PascalDR
reviewed
Mar 17, 2025
pymdoccbor/settings.py
Outdated
| X509_COMMON_NAME = os.getenv('X509_COMMON_NAME', u"mysite.com") | ||
|
|
||
| X509_NOT_VALID_BEFORE = os.getenv('X509_NOT_VALID_BEFORE', datetime.datetime.utcnow()) | ||
| X509_NOT_VALID_BEFORE = os.getenv('X509_NOT_VALID_BEFORE', datetime.datetime.now(datetime.UTC)) |
Contributor
There was a problem hiding this comment.
Suggested change
| X509_NOT_VALID_BEFORE = os.getenv('X509_NOT_VALID_BEFORE', datetime.datetime.now(datetime.UTC)) | |
| X509_NOT_VALID_BEFORE = os.getenv('X509_NOT_VALID_BEFORE', datetime.datetime.now(timezone.utc)) |
PascalDR
reviewed
Mar 17, 2025
pymdoccbor/settings.py
Outdated
| X509_NOT_VALID_AFTER = os.getenv( | ||
| 'X509_NOT_VALID_AFTER', | ||
| datetime.datetime.utcnow() + datetime.timedelta( | ||
| datetime.datetime.now(datetime.UTC) + datetime.timedelta( |
Contributor
There was a problem hiding this comment.
Suggested change
| datetime.datetime.now(datetime.UTC) + datetime.timedelta( | |
| datetime.datetime.now(timezone.utc) + datetime.timedelta( |
PascalDR
suggested changes
Mar 17, 2025
Contributor
PascalDR
left a comment
There was a problem hiding this comment.
It's better if we use timezone to retrieve the UTC class.
peppelinux
approved these changes
Mar 17, 2025
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.
When installing on Windows with
pip install git+https://github.com/IdentityPython/pyMDOC-CBOR.gitthe mdoc, mso, and tests folders are missing from the installation leading to mdoc failures. This PR fixes the issue by updating the sub-packages detection in the setup.py file.__init__.pyfiles to mdoc sub-package to aid detectionpytest --pyargs pymdoccbor.testspasses all tests without warnings