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

Which version of Panda3D it support? #2

Closed
leotada opened this issue Jun 10, 2018 · 7 comments
Closed

Which version of Panda3D it support? #2

leotada opened this issue Jun 10, 2018 · 7 comments

Comments

@leotada
Copy link
Contributor

leotada commented Jun 10, 2018

Which version of Panda3D it support?
I tried to run in 1.94 and occour this error:

src/gui/base/mgr.py", line 23, in init
    cls._task_mgr = base.task_mgr
AttributeError: ShowBase instance has no attribute 'task_mgr'

And Python 3 support is planned?

@Epihaius
Copy link
Owner

That error happens because I use the snake_case of base.taskMgr, but base.task_mgr is not defined in version 1.94 of Panda3D.
Therefore, you will need a recent 1.10 development build of Panda3D. Not only because I want to use snake_case in my code as much as possible (camelCase will be phased out in future versions of Panda3D, I believe), but I also want/need to make use of some of the latest bugfixes, without which my code wouldn't work properly.

And since I want my project to be as "future-proof" as possible, I will definitely adapt my code to work with Python 3 eventually. Before I do that, though, I'd like to see Panda3D itself switch over to Python 3 as its main Python version. Right now, its support of Python 3 still seems like a work in progress, so that's why I'd like to wait a bit before changing Python versions (and I don't like the idea of maintaining 2 different versions of my project, or relying on Python's 2to3 library to do automatic conversions, as I fear this might do some weird things to my code; I'd rather do the conversion myself).

@rdb
Copy link

rdb commented Jun 11, 2018

For the record, Panda3D 1.10 is completely compatible with Python 3 at this stage, and the Python 3 support is no longer considered "experimental" but first-class and of primary priority.

It is possible to keep the codebase simultaneously compatible with Python 2 and Python 3, like Panda3D also does for the direct tree. The six library could be used to help make this easier. You could also consider installing a Continuous Integration or code checking plug-in on the GitHub repository so that it can automatically check for breaking changes.

@Epihaius
Copy link
Owner

For the record, Panda3D 1.10 is completely compatible with Python 3 at this stage, and the Python 3 support is no longer considered "experimental" but first-class and of primary priority.

Ah, that is great news! Thank you for letting me know!
Hmm, maybe I should just bite the bullet then and start converting the code to Python 3 before doing anything else. It's already a major new version of my project anyway (with the big GUI overhaul), and by the time it will be truly production ready most people will probably prefer using Python 3, so continued support of Python 2 might be a waste of effort.

By the way @rdb, did you receive the email I sent you on 28 May? The most important part of that email was that I encountered some performance issues with my GUI system, apparently caused by garbageCollectStates when copying PNMImage sub-images (which also seemed to lead to a memory leak in PStats), and I wondered if setting garbage-collect-states to False (which seems to fix the issue) could cause some other kind of problems. There seemed to be other factors at play, which made things a bit confusing, which is why I haven't created an issue for it yet (as you might want to check it out for yourself first, now that the code is available).

@rdb
Copy link

rdb commented Jun 11, 2018

I did not receive an e-mail from you (not in spambox either). I'd be curious to analyse such an issue with garbage-collect-states. I'm not sure how copying PNMImage could cause such an issue, though. This type of issue would be caused by constantly assigning new Texture objects to your nodes, or something like that. Please do make sure you're not still using a development build from last year, though.

There should not be a harmful effect from disabling it, other than performance. Some applications perform better with it enabled, some perform better with it disabled.

@leotada
Copy link
Contributor Author

leotada commented Jun 12, 2018

I can help with the Python 3 support. I have made this at koparka wezu/koparka#12 , but here we can use full Python 3 if you wish.

@Epihaius
Copy link
Owner

I can help with the Python 3 support. I have made this at koparka wezu/koparka#12 , but here we can use full Python 3 if you wish.

That would be great! Yes, full Python 3 please, thank you!

@Epihaius
Copy link
Owner

Full support of Python 3 has now been realized.

Thanks to leotada and rdb for your contribution and motivation!

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

No branches or pull requests

3 participants