ivoflipse / pydicom

Automatically exported from code.google.com/p/pydicom
0 stars 1 forks source link

Add support for python3.0 #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
As of mid-Sept/08, python 3.0 release candidate is out. This changes many
features of the language, some in ways that are not backward compatible.
pydicom code will have to change (perhaps a fork) to run under python 3.0.
It will be some time before python 3.0 is widely adopted, however.

Original issue reported on code.google.com by darcymason@gmail.com on 26 Sep 2008 at 8:16

GoogleCodeExporter commented 9 years ago
Set difficulty to 'Medium', but not sure how much work this will entail. 
Step 1 could be to even work out what the major issues will be.

Original comment by darcymason@gmail.com on 12 Jun 2009 at 4:02

GoogleCodeExporter commented 9 years ago
I suspect that most people will not need a Dicom parser in Python 3 as long as 
Numpy
is not available for Python 3. At least I don't ...

Original comment by almar.klein@gmail.com on 26 Feb 2010 at 3:45

GoogleCodeExporter commented 9 years ago
What's the status on this now? I'm currently moving most of my stuff to Python 
3, and could use a Dicom reader in Py3k :)

Original comment by almar.klein@gmail.com on 1 Jun 2012 at 7:45

GoogleCodeExporter commented 9 years ago
I made a lot of progress on it but then haven't had time to get back to it. 
Still failing lots of unit tests after running 2to3. I think all of the changes 
I made should be in the main repository (I'll check to make sure), if you're 
interested in helping debug, just run 2to3 on it and see where it is at. (helps 
a lot to have virtual envs set up for py2 and for py3 versions).

Original comment by darcymason@gmail.com on 1 Jun 2012 at 11:44

GoogleCodeExporter commented 9 years ago
Thanks. I'd love to help, but I'm too busy with other projects right now.

Original comment by almar.klein@gmail.com on 1 Jun 2012 at 11:49

GoogleCodeExporter commented 9 years ago
I'm more than willing to help with this conversion. It seems that most packages 
have finally added 3.x support. 

A couple house keeping things before I dig in.

It seems that the current approach is to run 2to3 over the current 2.x codebase 
and then use the unittests to ensure compatibility with 3. Then I assume you've 
used the in_py3 flag to get around instances where the 2to3 tool fails, correct?

How would you like the commits to be broken down? A new commit for every 
unittest that is repaired? Additionally, it looks as if you preface 3.x 
compatibility fixes with py3 in the commit message.

I just want to make sure that I understand your methodology before digging in.

-Suever

Original comment by Suever@gmail.com on 1 Jun 2012 at 1:57

GoogleCodeExporter commented 9 years ago
>> It seems that the current approach is to run 2to3 over the current 2.x 
codebase 
>> and then use the unittests to ensure compatibility with 3. 
>> Then I assume you've used the in_py3 flag to get around instances where the 
2to3 tool fails, correct?

Yes, exactly.

>> How would you like the commits to be broken down? A new commit for every 
unittest 
>> that is repaired? Additionally, it looks as if you preface 3.x compatibility 
fixes 
>> with py3 in the commit message.

I'm not too picky about the commit frequency. If it's something really trivial, 
it could wait for a few fixes all together. But I do like the 'py3:' at the 
front of the message to help separate from other fixes going on.

Thanks for the help
-Darcy

Original comment by darcymason@gmail.com on 1 Jun 2012 at 4:52

GoogleCodeExporter commented 9 years ago
What's the status of this issue with regard to upcoming 0.9.8? 

In the release notes for 0.9.7 it says "pydicom 0.9.7 resolves some remaining 
bugs before moving to python 3 compatibility." However, the current 0.9.8rc1 
does not seem to work on Python 3.

I may now have some time available to help with Python 3 compatibility.

Original comment by almar.klein@gmail.com on 23 Nov 2012 at 3:32

GoogleCodeExporter commented 9 years ago
The milestone for full python 3 support is version 1.0. 

The recent optimizations of the DS (decimal vs. float) value representation 
killed some of the python3 compatibility. I am currently in the process of 
updating the code base to incorporate the DS optimizations while at the same 
time providing python 3 compatibility.

It should be in a state soon where you can use the development version 
(straight from the repository) to run pydicom on python3.

Original comment by Suever@gmail.com on 23 Nov 2012 at 6:05

GoogleCodeExporter commented 9 years ago
Anything I can do to help?

Original comment by almar.klein@gmail.com on 23 Nov 2012 at 9:22

GoogleCodeExporter commented 9 years ago
I just made some modifications that fix the errors that were occurring during 
the python 3 unit tests. To test the software, you just need to download the 
latest version from the repository and uncomment some lines at the top of 
setup.py.

NOTE: This is in no way officially supported yet. Some of the internal workings 
of the library will most likely change before the official 1.0 release. If you 
are using pydicom for anything important, please stick to one of the stable 
releases running on python2.x.

As far as helping out. There are some design decisions that have to be made 
prior to more work being done. However, if you feel adventurous, feel free to 
test this out on python 3 and let us know if you have any major issues. Keep in 
mind that new revisions may temporarily break python 3 compatibility even 
though we will try our best to ensure that it passes all unit tests.

-Suever

Original comment by Suever@gmail.com on 24 Nov 2012 at 1:05

GoogleCodeExporter commented 9 years ago
For more discussion on the status of python 3 compatibility, feel free to 
subscribe to the pydicom-dev mailing list 
(http://groups.google.com/group/pydicom-dev), specifically this thread:

https://groups.google.com/forum/?fromgroups=#!topic/pydicom-dev/A9xx-vdUOhY

Original comment by Suever@gmail.com on 24 Nov 2012 at 10:34

GoogleCodeExporter commented 9 years ago
Thanks, the latest version seems to run fine. 

Original comment by almar.klein@gmail.com on 24 Nov 2012 at 10:45