sbidy / MacroMilter

This python based milter (mail-filter) checks an incoming mail for suspicious VBA macro code in MS 20xx Office attachments (doc, xls, ppt ...).
MIT License
37 stars 14 forks source link

Python 3 support #46

Open robert-scheck opened 5 years ago

robert-scheck commented 5 years ago

When looking to https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3, I feel we should start to test MacroMilter using Python 3 in the future. Python 3.4 is also available via EPEL 7, including PyMilter. This does not mean that I am proposing to break Python 2.7 compatibility in MacroMilter though.

robert-scheck commented 5 years ago

https://fedoraproject.org/wiki/Changes/F31_Mass_Python_2_Package_Removal will sooner or later lead to MacroMilter removal in Fedora due to Python 2.x dependencies, given Python 2.x reaches finally EOL on 2020-01-01.

robert-scheck commented 5 years ago

As per https://bugzilla.redhat.com/show_bug.cgi?id=1738083, the Python 3 support starts to get important. I'm currently investigating to ensure proper Python 3.6 (or later) dependencies on all relevant branches to avoid the needs to have Python 2 support here and Python 3 support there.

sbidy commented 5 years ago

I covered and tested the Py3 comp. in the 3.7 branch. Actual there is an issue with the io.BytesIO and io.StringIO (which is a new implementation in py3). I'm working on that - in general the code is Python 3.6+ compatible.

robert-scheck commented 5 years ago

Thank you. Please let me know when there is something that has pre-release quality. Python 3.6 is the available Python in RHEL/CentOS 7.7 and 8.0 (and later), Fedora has Python 3.7.

robert-scheck commented 4 years ago

Do you have some status update? Will there be a MacroMilter version supporting Python 3.6+ until mid-November?

sbidy commented 4 years ago

Still in testing. I'm looking forward to release the 3.7 for Py3 in Nov. / early Dec.. I have to check the functionality with "real world" mail traffic but my current test system was "unavailable".

robert-scheck commented 4 years ago

I covered and tested the Py3 comp. in the 3.7 branch. Actual there is an issue with the io.BytesIO and io.StringIO (which is a new implementation in py3). I'm working on that - in general the code is Python 3.6+ compatible.

Not sure if I get the issue properly, but oletools/mraptor_milter.py seems to support Python 3 meanwhile, did you have a look there?