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

fix Python 3.7 compatibility #50

Merged
merged 2 commits into from Oct 17, 2018
Merged

fix Python 3.7 compatibility #50

merged 2 commits into from Oct 17, 2018

Conversation

adamyi
Copy link
Contributor

@adamyi adamyi commented Oct 17, 2018

Python 3.7 removes re._pattern_type.

See python/cpython#1646

Otherwise,

Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/adamyi/notes_to_keep/notes_to_keep/notes_to_keep.py", line 57, in <module>
    main()
  File "/Users/adamyi/notes_to_keep/notes_to_keep/notes_to_keep.py", line 53, in main
    start(args)
  File "/Users/adamyi/notes_to_keep/notes_to_keep/notes_to_keep.py", line 49, in start
    gkeep.start(gaia, password, notes, num, pfx, no_time, no_label)
  File "/Users/adamyi/notes_to_keep/notes_to_keep/gkeep.py", line 66, in start
    label = createLabel(keep)
  File "/Users/adamyi/notes_to_keep/notes_to_keep/gkeep.py", line 49, in createLabel
    label = keep.createLabel(name)
  File "/usr/local/lib/python3.7/site-packages/gkeepapi/__init__.py", line 664, in createLabel
    if self.findLabel(name):
  File "/usr/local/lib/python3.7/site-packages/gkeepapi/__init__.py", line 686, in findLabel
    (isinstance(query, re._pattern_type) and query.search(label.name)): # pylint: disable=protected-access
AttributeError: module 're' has no attribute '_pattern_type'

@kiwiz kiwiz merged commit 7489663 into kiwiz:master Oct 17, 2018
@kiwiz
Copy link
Owner

kiwiz commented Oct 17, 2018

Neat, thanks!

@adamyi adamyi deleted the patch-1 branch October 17, 2018 08:28
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.

None yet

2 participants