This repository has been archived by the owner on Apr 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
Assorted fixes: Regex, reproducibility, and more. #97
Open
jonfoster
wants to merge
12
commits into
pabigot:next
Choose a base branch
from
jonfoster:next
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Rework XML regex code to follow the standards. It now completely parses the XML regex and generates a corresponding Python regex, instead of relying on the syntaxes being "close enough".
Use setuptools instead of distutils, for wheel support.
This fixes a warning when running setup.py, due to the version number having an invalid format.
Really old versions of Python are no longer supported by PyXB anyway, so there's no need to keep complicated code just to support them. Also use UUID4 rather than UUID1 for generating UUIDs, because there are privacy issues with people's MAC address being embedded in UUIDs in documents.
Make it posible to configure pyxbgen to generate bindings in a reproducible way. "Reproducible" means that the same input results in exactly the same output, byte-for-byte, without depending on: * the time the bindings were built * the path to the working directory they're buit in * the MAC address of the build PC (embedded in a UUID) * newly generated UUIDs (guaranteed to be different every time) * the iteration order of Python dicts/sets * the path separator (e.g. "/") used by the OS that the bindings are built on. Before this commit, the PyXB bindings changed every time they were built becasue they depended on all of the above. After this commit, you can pass options to pyxbgen to get reproducible bindings. The new options are: * --strip-file-paths - doesn't store paths to XSD files in bindings. * --no-timestamp - doesn't write build timestamp and Python version in comments in bindings. * --generation-uid= - specifies the Generation UID rather than randomly generating one. There are two reasons why people want this: 1) If bindings are committed to version control, then when bindings are rebuilt you want to see what actually changed and not see loads of spurious differences. 2) If bindings are not committed to version control but are built by some build system, then careful development teams want developers to be using the exact same bindings as each other and as the build system is building.
The changes look reasonable and likely to benefit users. However, I really don't have the time or interest necessary to merge them or, more importantly, undertake to resolve any issues that arise from them. At this point it seems you're in a better position than I am to maintain and evolve PyXB. If you're interested in taking over the project, please email me directly. |
A comment: |
Do not return intermediate internal classes like `_PyXBDateOnly_base`.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Hi,
Here are some assorted fixes I've made to PyXB.
More details are in the individual commit messages.
Thanks to Eurofins Digital Testing for paying me to work on most of these changes.
Kind regards,
Jon