[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Wrong version in the HTCondor Python package



Hi Gaetan,

This is indeed a mistake, thanks for the report! It looks like the regexp pattern isn't greedy enough when matching the first digits out of the HTCondor version string:

>>> htcondor.version()
'$CondorVersion: 10.3.0 2023-03-06 BuildID: UW_Python_Wheel_Build $'
>>> import re
>>> re.match("^.*(\d+\.\d+\.\d+)", htcondor.version()).group(1)
'0.3.0'

If you're using htcondor.__version__ somewhere in your code, one possible workaround is overwriting that value using a regexp pattern that makes sure all digits are grabbed:

>>> htcondor.__version__ = htcondor._re.match("^.*(?<!\d)(\d+\.\d+\.\d+)(?!\d)", htcondor.version()).group(1)
>>> htcondor.__version__
'10.3.0'

We'll get this fixed for the next release. Thanks again!

Jason

On Thu, May 25, 2023 at 9:55âAM Gaetan Geffroy <gage@xxxxxxxxx> wrote:

Hi,

Â

I noticed this:

Is there a reason for it, or is it a mistake ?

Â

Thanks,

GaÃtan


Gaetan Geffroy
Junior Software Engineer,ÂSpace

Terma GmbH
Europaarkaden II, BratustraÃe 7, 64293 Darmstadt, Germany
TÂ+49 6151 86005 43Â(direct)ÂÂâÂÂTÂ+49 6151 86005-0
Terma GmbHÂ-ÂSitz DarmstadtÂÂâÂÂHandelsregisterÂNr.:ÂHRBÂ7411,ÂDarmstadt
GeschÃftsfÃhrer:ÂPoul VighÂ/ÂSteen Vejby SÃrensen
www.terma.comÂâÂ
Linkedin â Twitter â Instagram â Youtube


Attention:
This e-mail (and attachment(s), if any) - intended for the addressee(s) only - may contain confidential, copyright, or legally privileged information or material, and no one else is authorized to read, print, store, copy, forward, or otherwise use or disclose any part of its contents or attachment(s) in any form. If you have received this e-mail in error, please notify me by telephone or return e-mail, and delete this e-mail and attachment(s). Thank you.

_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users

The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/