-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix remaining travis warnings #81
Commits on Jun 10, 2019
-
Fix remaining escape sequence warnings in lex patterns.
Raw strings (marked by the `r` prefix) are normally used for regular expression patterns to allow that module to expand any backslash-escape sequences without interference from the Python interpreter's string expansion, and thus the requirement for extra quoting. This practice is further encouraged by python 3.5 and later raising a `DepreciationWarning` when encountering escape sequences it can't expand, as is common is re patterns. However, in python 2.7, the `re` module doesn't expand \u and \U escapes for unicode codepoints, so patterns with non-ascii characters can only be used in raw strings when using python 3.3 or later, or the external `regex` module, and neither `u` nor `r` quoted strings will work for patterns in both languages. However, Python will concatenate whitespace-separated string literals even if they use different quoting. Take advantage of this to split the lexer patterns into raw- and unicode-quoted segments as appropriate. Also remove some unnecessary escape sequences.
Configuration menu - View commit details
-
Copy full SHA for 14e01ba - Browse repository at this point
Copy the full SHA 14e01baView commit details -
travis: Replace pep8 with pycodestyle.
The pep8 name is deprecated, and the tool continues under the new name.
Configuration menu - View commit details
-
Copy full SHA for f2bdbe1 - Browse repository at this point
Copy the full SHA f2bdbe1View commit details -
travis: Use
pytest
invocation.Now that we're using a newer pytest, we can invoke it as such even in the jython build, instead of using the older `py.test`.
Configuration menu - View commit details
-
Copy full SHA for 50d7165 - Browse repository at this point
Copy the full SHA 50d7165View commit details -
Sanitize lexer pattern regex escapes.
The parser's token pattern strings escaped almost all punctuation characters, but the Python `re` module has a fairly limited set of special characters which must be backslash-escaped. In particular, characters like @ ! : and space do not need escapes, and even more are fine inside a [] environment describing a set of characters. Audit the expression strings and remove most unnecessary escapes. I left some sequences like `[^\^\[]` which aren't ambiguous without escapes for clarity of reading.
Configuration menu - View commit details
-
Copy full SHA for 508473f - Browse repository at this point
Copy the full SHA 508473fView commit details
Commits on Jun 11, 2019
-
travis: Use the default python3 on macOS.
The default osx image on travis doesn't have an up-to-date set of homebrew packages, so the `brew upgrade` step must compile many packages from source and takes tens of minutes to complete. This makes for very slow test feedback and occasionally failures when the job times out. Travis itself doesn't provide python3 packages through the `language` and `python` yaml keys like it does on Linux. Setting these keys fails trying to download the requested tarball. Give up therefore, and just use whatever python3 was installed on the image by default. Currently that is 3.6.5 from homebrew. This significantly speeds up test feedback.
Configuration menu - View commit details
-
Copy full SHA for 86a99d4 - Browse repository at this point
Copy the full SHA 86a99d4View commit details
Commits on Jun 20, 2019
-
Add a lexer test to verify multiline notes.
The #note environment can be any free text up to a double newline. Subsequent lines don't need to be intented like with #tr. It didn't seem like we had text coverage for this feature.
Configuration menu - View commit details
-
Copy full SHA for fecf4e3 - Browse repository at this point
Copy the full SHA fecf4e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 602530d - Browse repository at this point
Copy the full SHA 602530dView commit details -
Fix regression with #note and unprimed line numbers.
Sanitizing the regular expression pattern strings, I accidentally removed the optional mark ('?') from the collection of prime characters used to conclude a #note when it doesn't end in a double newline. Restore this, and clarify the related comment.
Configuration menu - View commit details
-
Copy full SHA for 06bfd65 - Browse repository at this point
Copy the full SHA 06bfd65View commit details -
Backport regression test with #note to python2.
Python 2.7 can't handle the unicode prime values in normal `str` objects, so construct the generated line label as a unicode object instead.
Configuration menu - View commit details
-
Copy full SHA for 26229aa - Browse repository at this point
Copy the full SHA 26229aaView commit details
Commits on Jun 21, 2019
-
I used this to guide constructing the new unit tests. Thanks to ageorgou for catching that I'd left it in the committed version.
Configuration menu - View commit details
-
Copy full SHA for e86c3b2 - Browse repository at this point
Copy the full SHA e86c3b2View commit details -
Rename a varable to avoid confusion with a built-in. Thanks to ageorgou for the suggestion.
Configuration menu - View commit details
-
Copy full SHA for 6959cd9 - Browse repository at this point
Copy the full SHA 6959cd9View commit details