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

Fixes for re module bugs and other minor differences from CPython #1

Closed

Conversation

michalpokusa
Copy link
Contributor

@michalpokusa michalpokusa commented Oct 26, 2023

🪛Fixes:

  • Library used FileNotFoundError, which is not present in CircuitPython
  • One of example used str.title() which is not present in CircuitPython
  • Some parts of the code were still vulnerable to bug in re module that incorrectly detected positions of unicode characters
  • There is another bug in re module, that incorrectly matches [\s\S] pattern, so it had to be changed to something that does the same thing, using other tokens

Last two ones should be a temporary solution, until the bugs are fixed, but for now they are necessary.

🏗️ Refactor:

  • EDIT1: Changed hash comment in .html files to HTML comments

Additional testing would be highly appreciated. 😃

@dhalbert
Copy link

If it doesn't work properly on 8.x.x without the fixes, let's leave them in for now. You could add comments or a draft PR to be merged at a later date to remove the fixes.

@michalpokusa michalpokusa changed the title Fixes for re module bugs and other minor differences from Python Fixes for minor differences from CPython Oct 26, 2023
@michalpokusa michalpokusa changed the title Fixes for minor differences from CPython Fixes for re module bugs and other minor differences from CPython Oct 27, 2023
@michalpokusa
Copy link
Contributor Author

michalpokusa commented Nov 8, 2023

I think it is now ready for merge, after release of 9.0.0 I will publish a PR that removes the workaround, as the re modeule is fixed there.

EDIT1: As the CP 9.0.0 is nearly stable, the workarounds will not be necessary, other changes that were present in this PR are included in #2

@michalpokusa michalpokusa marked this pull request as ready for review November 8, 2023 00:12
@michalpokusa michalpokusa deleted the workaround-for-re-module-bug branch March 7, 2024 23:11
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.

2 participants