You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@eendebakpt Thanks for checking! The regular expression currently in CPython is no longer correct for IronPython. In fact, even the check for IronPython further down in _sys_version would not work with the current sys.version. The latest 2.7 and 3.4 releases both use the format that's in the current repo:
2.7.12 (2.7.12.1000)
[.NETFramework,Version=v4.5 on .NET Framework 4.8.9139.0 (64-bit)]
3.4.0 (3.4.0.1000)
[.NETFramework,Version=v4.6.2 on .NET Framework 4.8.9139.0 (64-bit)]
The current diff with CPython is as follows:
_ironpython_sys_version_parser=re.compile(
-r'IronPython\s*'-r'([\d\.]+)'-r'(?: \(([\d\.]+)\))?'-r' on (.NET [\d\.]+)', re.ASCII)
--# IronPython covering 2.6 and 2.7-_ironpython26_sys_version_parser=re.compile(
-r'([\d.]+)\s*'-r'\(IronPython\s*'-r'[\d.]+\s*'-r'\(([\d.]+)\) on ([\w.]+ [\d.]+(?: \(\d+-bit\))?)\)'-)
+r'([\w.+]+)\s*'# "version<space>"+r'(?: DEBUG)?\s*'# DEBUG - IronPython DEBUG builds only+r'\(([^,]+)\)\s*'# "(fileversion)<space>"+r'\[([^\]]+)\]?') # "[compiler]"
@eendebakpt Thanks for checking! The regular expression currently in CPython is no longer correct for IronPython. In fact, even the check for IronPython further down in _sys_version would not work with the current sys.version. The latest 2.7 and 3.4 releases both use the format that's in the current repo:
2.7.12 (2.7.12.1000)
[.NETFramework,Version=v4.5 on .NET Framework 4.8.9139.0 (64-bit)]
3.4.0 (3.4.0.1000)
[.NETFramework,Version=v4.6.2 on .NET Framework 4.8.9139.0 (64-bit)]
The current diff with CPython is as follows:
_ironpython_sys_version_parser=re.compile(
-r'IronPython\s*'-r'([\d\.]+)'-r'(?: \(([\d\.]+)\))?'-r' on (.NET [\d\.]+)', re.ASCII)
--# IronPython covering 2.6 and 2.7-_ironpython26_sys_version_parser=re.compile(
-r'([\d.]+)\s*'-r'\(IronPython\s*'-r'[\d.]+\s*'-r'\(([\d.]+)\) on ([\w.]+ [\d.]+(?: \(\d+-bit\))?)\)'-)
+r'([\w.+]+)\s*'# "version<space>"+r'(?: DEBUG)?\s*'# DEBUG - IronPython DEBUG builds only+r'\(([^,]+)\)\s*'# "(fileversion)<space>"+r'\[([^\]]+)\]?') # "[compiler]"
@slozier Thanks for the info. Given the fact that the regular expressions in the current cpython main do not work, what should we do with the ironpython parsing in cpython? Three options: i) leave as it is, ii) remove the ironpython version parsing iii) update with the expressions above. Is ironpython still using the platform.py from current cpython repo (or expected to use in the near future)?
Three options: i) leave as it is, ii) remove the ironpython version parsing iii) update with the expressions above. Is ironpython still using the platform.py from current cpython repo (or expected to use in the near future)?
@eendebakpt While I would love to take option iii, given how far behind we are (ipy's stdlib is based off 3.4) I don't expect us to be using cpython's main any time soon (and things may change by the time we get there). So that leaves options i and ii. It seems to me like option i serves no one (other than requiring no additional effort). So option ii is probably best (as long as it doesn't close the door on getting ipy in there if we ever catch up).
Thanks, let's go with option 2 then. But I'm perfectly happy with option 3 if you want it and the door is always open â all you need to do is ask :-)
Activity
slozier commentedon Mar 9, 2023
@eendebakpt Thanks for checking! The regular expression currently in CPython is no longer correct for IronPython. In fact, even the check for IronPython further down in
_sys_versionwould not work with the currentsys.version. The latest 2.7 and 3.4 releases both use the format that's in the current repo:The current diff with CPython is as follows:
eendebakpt commentedon Mar 10, 2023
@slozier Thanks for the info. Given the fact that the regular expressions in the current cpython main do not work, what should we do with the ironpython parsing in cpython? Three options: i) leave as it is, ii) remove the ironpython version parsing iii) update with the expressions above. Is ironpython still using the platform.py from current cpython repo (or expected to use in the near future)?
slozier commentedon Mar 10, 2023
@eendebakpt While I would love to take option iii, given how far behind we are (ipy's stdlib is based off 3.4) I don't expect us to be using cpython's main any time soon (and things may change by the time we get there). So that leaves options i and ii. It seems to me like option i serves no one (other than requiring no additional effort). So option ii is probably best (as long as it doesn't close the door on getting ipy in there if we ever catch up).
hauntsaninja commentedon Mar 11, 2023
Thanks, let's go with option 2 then. But I'm perfectly happy with option 3 if you want it and the door is always open â all you need to do is ask :-)