Skip to content

Decouple imports to fix error in python3.#60

Closed
nafur wants to merge 2 commits into
z4r:masterfrom
nafur:master
Closed

Decouple imports to fix error in python3.#60
nafur wants to merge 2 commits into
z4r:masterfrom
nafur:master

Conversation

@nafur

@nafur nafur commented Apr 14, 2018

Copy link
Copy Markdown

In python3 both the try case and the except case fails:

  • io must be used instead of cStringIO
  • filterfalse must be used instead of ifilterfalse
    By decoupling these imports into separate try-excepts, this gets more
    robust and should work in more cases. Also make io the default as it
    should work for all python >=2.6.

nafur and others added 2 commits April 14, 2018 18:10
In python3 both the try case and the except case fails:
- io must be used instead of cStringIO
- filterfalse must be used instead of ifilterfalse
By decoupling these imports into separate try-excepts, this gets more
robust and should work in more cases. Also make io the default as it
should work for all python >=2.6.
@danmichaelo

Copy link
Copy Markdown
Collaborator

@z4r , would you mind accepting this? The library is currently broken in Python 3.x. If you cannot find the time for it, please add more maintainers. I can become a co-maintainer if needed, I already maintain a couple of python libraries.

@z4r

z4r commented Aug 8, 2018

Copy link
Copy Markdown
Owner

Hi @danmichaelo, i sent you an invitation.

@danmichaelo

Copy link
Copy Markdown
Collaborator

Thanks, @z4r , I'll have a look at this later today. Could you also add me to PyPI, or do you prefer to keep control of that?

@z4r

z4r commented Aug 8, 2018

Copy link
Copy Markdown
Owner

pls @danmichaelo give me your ID on pypi

@erichorne

erichorne commented Oct 18, 2018

Copy link
Copy Markdown

Is there an ETA on merging this? As @danmichaelo noted, this library is currently broken as pulled via pip into a python3 environment.

[a little time passes]

Ah, I see the tests fail in spectacular ways. Fixing the import allows the system to at least load, but using rtkit appears to be the issue.. is that correct? If so, what work remains to port this over to python3?

@z4r

z4r commented Oct 18, 2018

Copy link
Copy Markdown
Owner

Hi @erichorne, I gave the role to @danmichaelo because ATM I've really no time to maintain this library.

tobiasge added a commit to tobiasge/python-rtkit that referenced this pull request Jan 29, 2019
This changes fixes the import for cStringIO and ifilterfalse as intended
by pull request z4r#60. In this old pull request the import for
ifilterfalse is tried in the wrong direction for Python 2 and 3.
tobiasge added a commit to tobiasge/python-rtkit that referenced this pull request Jan 29, 2019
This changes fixes the import for cStringIO and ifilterfalse as intended
by pull request z4r#60. In this old pull request the import for
ifilterfalse is tried in the wrong direction for Python 2 and 3.
@nafur nafur closed this Sep 3, 2020
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.

5 participants