Python 3 support in the same code base #19

Open
wants to merge 12 commits into
from

Conversation

Projects
None yet
2 participants
@eliben

eliben commented Mar 6, 2012

Hi Corbin,

This is construct modified to run under Python 3 as well as Python 2, in the same code base. Specifically, both of the following test runs are succeeding:

python3 construct/tests/testall.py
python3 -m unittest discover construct/tests/

Regarding what this means for construct - it doesn't mean parsing Unicode. construct is for parsing byte streams, so the changes are solely for the purpose of making it run at all on Python 3.

I agree completely that text/unicode parsing is not the focus of construct, and would even go as far as to remove the current very partial and incomplete support construct has for text parsing. This is ultimately your decision of course.

Feel free to ask me any questions/details about the pull request. It's a pretty straightforward port to a python 2/3 portable code, really.

@tomerfiliba

This comment has been minimized.

Show comment
Hide comment
@tomerfiliba

tomerfiliba May 15, 2012

hi @eliben -- i applied you patch to https://github.com/construct/construct (where construct is now being developed)
i'm making some radical changes and i wish you'd take a look at the patched code. by the way, we're now using six for py2-3 compat, so some of the code can go

hi @eliben -- i applied you patch to https://github.com/construct/construct (where construct is now being developed)
i'm making some radical changes and i wish you'd take a look at the patched code. by the way, we're now using six for py2-3 compat, so some of the code can go

@eliben

This comment has been minimized.

Show comment
Hide comment
@eliben

eliben May 20, 2012

Hi Tomer,
Glad to see it finally made it in. What specifically would you want me
to look at?
Eli

On Tue, May 15, 2012 at 10:53 PM, Tomer Filiba
reply@reply.github.com
wrote:

hi eli -- i applied you patch to https://github.com/construct/construct (where construct is now being developed)
i'm making some radical changes and i wish you'd take a look at the patched code. by the way, we're now using six for py2-3 compat, so some of the code can go


Reply to this email directly or view it on GitHub:
#19 (comment)

eliben commented May 20, 2012

Hi Tomer,
Glad to see it finally made it in. What specifically would you want me
to look at?
Eli

On Tue, May 15, 2012 at 10:53 PM, Tomer Filiba
reply@reply.github.com
wrote:

hi eli -- i applied you patch to https://github.com/construct/construct (where construct is now being developed)
i'm making some radical changes and i wish you'd take a look at the patched code. by the way, we're now using six for py2-3 compat, so some of the code can go


Reply to this email directly or view it on GitHub:
#19 (comment)

ramiro referenced this pull request in ramiro/construct May 3, 2013

Merge pull request #19 from berenm/patch-1
Allow the Pointer to relocate relative to EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment