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

canmatrix.formats.loads() fails due to undefined StringIO #103

Closed
altendky opened this issue Oct 20, 2017 · 6 comments
Closed

canmatrix.formats.loads() fails due to undefined StringIO #103

altendky opened this issue Oct 20, 2017 · 6 comments
Assignees

Comments

@altendky
Copy link
Collaborator

With 0.6 released where should a fix get committed? If the dev branch lives on should it get renamed to just dev?

Along with an import, presumably there's some 2/3 considerations to be made here.

fileObject = StringIO.StringIO[string]

@ebroecker
Copy link
Owner

rename to dev is the right way.

@ebroecker
Copy link
Owner

should be fixed - could you please review?

@ebroecker
Copy link
Owner

@altendky
Is this still open or can we close this issue?

@altendky
Copy link
Collaborator Author

Sorry I missed the first query. Yes, the described issue appears to be resolved, but I'm not big on version conditional and variant functionality. Both Py2 and 3 have 'byte sequences' and 'character sequences' and this function should take one of those in both versions.

I guess the first question is do we want bytes or characters being passed? I suppose we end up with a special case where we likely want either two functions or just bytes due to the fancy-schmancy mixed encoding support we have. If just one function it ought to be loadb() and use io.BytesIO in both Py2 and Py3 with no version or type checking or str->bytes encoding.

http://python-future.org/compatible_idioms.html#stringio
http://python-future.org/compatible_idioms.html#stringio-module

(yes, this could be a separate ticket or just ignored)

@ebroecker ebroecker self-assigned this Apr 6, 2018
@ebroecker
Copy link
Owner

want to do this after 0.7

@ebroecker
Copy link
Owner

I took it into #236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants