Skip to content

Conversation

@pawelmhm
Copy link
Contributor

@pawelmhm pawelmhm commented Oct 27, 2020

that appear in Python 3.8.2

I get following warnings in 3.8

/home/pawel/.pyenv/versions/3.8.2/lib/python3.8/site-packages/mf2py/parser.py:409: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if x is not "":
/home/pawel/.pyenv/versions/3.8.2/lib/python3.8/site-packages/mf2py/dom_helpers.py:144: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  results = [t for t in text_collection(el, replace_img, img_to_src, base_url) if t is not '']

@tommorris
Copy link
Collaborator

This looks fine to me, and once Travis has finished being extremely slow, I'll happily merge it in.

Context for the change that I may as well document here: Python 3.8 is now emitting SyntaxWarning errors where is or is not is used with numeric or string types. This is rather an opinionated change made in bpo-34850. I guess whether we like this change, that's what Python has decided, so it is better to fix it than not.

Also, this PR has prompted me to add issues #159 and #160 because of Travis being sloooow.

Tom Morris and others added 4 commits October 27, 2020 18:24
This improves performance: a Travis build recently took over 1h21m to test
against the specified versions of Python on just Ubuntu. GitHub Actions lets us
matrix test against all the Python versions we care about, and build on Windows
and macOS as well as Linux, in just under 4m. This seems like enough of a win
in itself to just fully replace Travis.
@tommorris tommorris merged commit 0cabfbb into microformats:master Oct 27, 2020
@tommorris
Copy link
Collaborator

Merged, thanks again @pawelmhm.

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