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

Allow passing a bytestring to XmlRfcParser #1174

Open
1 task done
rjsparks opened this issue Oct 10, 2024 · 1 comment
Open
1 task done

Allow passing a bytestring to XmlRfcParser #1174

rjsparks opened this issue Oct 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@rjsparks
Copy link
Member

rjsparks commented Oct 10, 2024

Description

Right now, we have to pass the name of a file to XmlRfcParser, which turns around and .read()s the file into memory. If we already have the content in memory, we have to do a round-trip through the filesystem that is unnecessary and adds complexity around temporary file management (see the PR at svgcheck for dealing with taking input from stdin).

Enhance the signature of init to allow passing in the bits if we have them already rather than passing a filename.

Consider deprecating passing in the filename and removing that option in the future.

Code of Conduct

@rjsparks rjsparks added the enhancement New feature or request label Oct 10, 2024
@rjsparks rjsparks changed the title Allow passing a bytestring to RfcXmlParser Allow passing a bytestring to XmlRfcParser Oct 10, 2024
@rjsparks
Copy link
Member Author

(edited to s/RfcXmlParser/XmlRfcParser/, but now I also wonder if we should start looking to change the name of the class)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant