Dear Dave,

Many thanks for fixing the date handling in such short time! I have 
tested it and it works perfectly fine now.

Best regards,
Andrii

On 27/04/2016 00:09, Dave Kuhlman wrote:
> Andrii,
>
> I believe I have a fix for this.  It covers minInclusive,
> maxInclusive, minExclusive, and maxExclusive for each of xs:date,
> xs:time, and xs:dateTime.
>
> This change turns out to require changing only a few lines of code.
> But, I had to try several bad, or at least poor ways before backing
> myself into a reasonably good way.
>
> I also added new unit test cases for the validation of the date/time
> simpleType.
>
> I've attached a patch against v. 2.22b, but you will likely find it
> easier to use Mercurial to clone (or pull) these changes from
> Bitbucket: https://bitbucket.org/dkuhlman/generateds
>
> Please let me know what you think of this fix and whether it works
> for you.
>
> Thanks again for reporting this and for pointing me at a solution.
>
> Dave
>
> On Fri, Apr 22, 2016 at 04:53:35PM +0100, Andrii Iudin wrote:
>> Dear Dave and generateDS mailing group,
>>
>> After updating to the recent version 2.22a the generated Python source
>> code for structures appears to have a validation of xs:date elements.
>> We have one with a facet minInclusive set to '2002-01-01'. The
>> previously used version 2.13a produced just
>>       def validate_dateType(self, value):
>>           # Validate type dateType, a restriction on xs:date.
>>           pass
>>
>> However, now it is defined as
>>       def validate_dateType(self, value):
>>           # Validate type dateType, a restriction on xs:date.
>>           if value is not None and Validate_simpletypes_:
>>               if value < 2002-01-01:
>>                   warnings_.warn('Value "%(value)s" does not match xsd
>> minInclusive restriction on dateType' % {"value" : value} )
>>
>> This comparison results in "TypeError: can't compare datetime.date to int".
>>
>> Please could you tell if there is a fix available for this or a
>> parameter that can be adjusted when generating the code?
>>
>> Thank you and best regards,
>> Andrii
>>
>> ------------------------------------------------------------------------------
>> Find and fix application performance issues faster with Applications Manager
>> Applications Manager provides deep performance insights into multiple tiers 
>> of
>> your business applications. It resolves application problems quickly and
>> reduces your MTTR. Get your free trial!
>> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>> _______________________________________________
>> generateds-users mailing list
>> generateds-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/generateds-users


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to