Skip to content

topicdiff.py 0.4: make script compatible with Python 3 #363

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

Merged
merged 1 commit into from
Sep 22, 2019

Conversation

jspricke
Copy link
Contributor

No description provided.

@flashcode flashcode added bug Unexpected problem or unintended behavior feature New feature request and removed bug Unexpected problem or unintended behavior labels Sep 21, 2019
@flashcode
Copy link
Member

Hi,

I think the script will not work with Python 2 any more because zip_longest is not available. For now all scripts must be compatible with Python 2 and 3, during the transition.

I suggest to import with a try/except, like that:

    try:
        from itertools import zip_longest
    except ImportError:
        from itertools import izip_longest as zip_longest

@flashcode flashcode self-assigned this Sep 21, 2019
@flashcode flashcode added the waiting info Waiting for info from author of issue label Sep 21, 2019
@jspricke
Copy link
Contributor Author

updated, thanks for the proposal.

@flashcode flashcode removed the waiting info Waiting for info from author of issue label Sep 22, 2019
@flashcode flashcode merged commit ee45b49 into weechat:master Sep 22, 2019
@jspricke jspricke deleted the topicdiff_python3 branch September 22, 2019 20:24
@flashcode flashcode added the python3 Script is not compatible with Python 3 label Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request python3 Script is not compatible with Python 3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants