Opened 2 years ago

Closed 2 years ago

#23791 closed defect (worksforme)

Make pynac build with Python 3

Reported by: embray Owned by:
Priority: major Milestone: sage-8.1
Component: python3 Keywords:
Cc: fbissey, chapoton Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

As discussed in the past (e.g. #15530) pynac does not work, at least at one time with Python 3. #18537 apparently at least got it to build with Python 3 headers, but nothing working beyond that. When pynac is built in Sage, even with SAGE_PYTHON3=yes, it builds pynac against Python 2.

This breaks horribly more or less as soon as pynac is invoked in Sage with Python 3, because the way libpynac works it assumes it's being loaded into an already initialized Python interpreter--well we do have a Python 3 interpreter running, but the Python 2 interpreter it's trying to use is not initialized. And in any case I don't want to think about what will happen if we try to pass PyObject *s between different Python interpreters. Obviously pynac should be made to work with Python 3. Somehow I couldn't find an existing ticket specifically for this though.

It looks like some work has already done to make pynac work with Python 3, but Sage doesn't seem to be using it properly yet.

Change History (2)

comment:1 Changed 2 years ago by embray

Oh, I think this was actually fixed by #23325. Confirming...

comment:2 Changed 2 years ago by embray

  • Resolution set to worksforme
  • Status changed from new to closed

Yes, #23325 fixed it--libpynac links with libpython3.6 now. I didn't see that ticket since it was closed, but not really "merged" into the "develop" branch. Sorry for the noise.

Note: See TracTickets for help on using tickets.