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

Re: [HTCondor-users] FutureWarning: The ""requirements" argument of xquery() will be renamed to "constraint" in a future release.



Also use constraint=None rather than constraint=true

they should give the same results, but the first is less work for the schedd

 

-tj

 

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of htcondor-users@xxxxxxxxxxx
Sent: Friday, September 4, 2020 4:29 PM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Cc: Josh KARPEL <karpel@xxxxxxxx>
Subject: Re: [HTCondor-users] FutureWarning: The ""requirements" argument of xquery() will be renamed to "constraint" in a future release.

 

Hi Larry,

 

This deprecation is discussed in detail in the v8.9.8 release notes: https://htcondor.readthedocs.io/en/latest/version-history/development-release-series-89.html#version-8-9-8

 

The new keyword argument names are "constraint" (instead of "requirements") and "projection" (instead of "attr_list"). To prevent the warning, change your call to

 

     schedd.xquery(constraint="ClusterId == %d" % id, limit=1)  

 

 

Josh Karpel

 

 

On Fri, Sep 4, 2020 at 4:19 PM <larry.martell@xxxxxxxxx> wrote:

I have suddenly started getting this message from my python code.

I use xquery like this:

schedd.xquery(requirements="ClusterId == %d" % id, limit=1)

Reading about constraint it seems to be a boolean:

xquery( constraint = true, attr_list = [], limit, opts, name )

How do I update my xquery call to use constraint so I do not get that message?
_______________________________________________
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/