Discussion:
[FE-discuss] Testing FormEncode 1.3.0a1
Sebastien Douche
2013-12-05 16:27:19 UTC
Permalink
Hi,
i'm testing the new version (we are porting our 120KSLOC app on Python
3) and I have a question about it, because some tests are broken. Is
the new version strictly compatible with the 1.2.4 version?
--
Sebastien Douche <***@gmail.com>
Twitter: @sdouche / G+: +sdouche
Chris Lambacher
2013-12-05 16:37:31 UTC
Permalink
Hi Sebastien,

1.3 is mostly compatible but there are a few changes that are backward in
compatible. They should all be listed here
http://www.formencode.org/en/latest/whatsnew-1.3.html but I readily admit
that one of the things holding back a full 1.3 release is documentation.
There *may* be something that is inadvertently backwards incompatible and
if you find something like that please submit a bug to
https://github.com/formencode/formencode/issues?state=open . Also the 1.2.5
release had some backwards incompatible changes that might cause a problem
if you have custom validators that expect sequences to be passed to them
from a Schema. Details can be found here:
http://www.formencode.org/en/latest/whatsnew-1.2.5.html.

-Chris
Post by Sebastien Douche
Hi,
i'm testing the new version (we are porting our 120KSLOC app on Python
3) and I have a question about it, because some tests are broken. Is
the new version strictly compatible with the 1.2.4 version?
--
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
FormEncode-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/formencode-discuss
--
Christopher Lambacher
***@kateandchris.net
Sebastien Douche
2013-12-05 16:51:09 UTC
Permalink
Post by Chris Lambacher
Hi Sebastien,
Hi Chris
Post by Chris Lambacher
Also the 1.2.5
release had some backwards incompatible changes that might cause a problem
if you have custom validators that expect sequences to be passed to them
http://www.formencode.org/en/latest/whatsnew-1.2.5.html.
Right, same broken tests with the 1.2.5.
--
Sebastien Douche <***@gmail.com>
Twitter: @sdouche / G+: +sdouche
Chris Lambacher
2013-12-05 17:12:37 UTC
Permalink
Hi Sebastien,
Post by Chris Lambacher
Post by Chris Lambacher
Also the 1.2.5
release had some backwards incompatible changes that might cause a
problem
Post by Chris Lambacher
if you have custom validators that expect sequences to be passed to them
http://www.formencode.org/en/latest/whatsnew-1.2.5.html.
Right, same broken tests with the 1.2.5.
That narrows things down. Do you have a custom validator that expects a
sequence that doesn't derive from a formencode validator that expects as
sequence (list, dict, tuple, etc)? If so you will need to add
an accept_iterator = True property to your validator. You can do a quick
test for that by adding it to the instantiation args somewhere you use the
validator.

-Chris
--
Christopher Lambacher
***@kateandchris.net
Sebastien Douche
2013-12-11 17:04:55 UTC
Permalink
Post by Chris Lambacher
Post by Sebastien Douche
Right, same broken tests with the 1.2.5.
That narrows things down. Do you have a custom validator that expects a
sequence that doesn't derive from a formencode validator that expects as
sequence (list, dict, tuple, etc)? If so you will need to add an
accept_iterator = True property to your validator. You can do a quick test
for that by adding it to the instantiation args somewhere you use the
validator.
Exact, we use iterator. It's work now with FormEncode 1.2.6. I will
try later with 1.3.0a1. Thanks Chris.
--
Sebastien Douche <***@gmail.com>
Twitter: @sdouche / G+: +sdouche
Chris Lambacher
2013-12-11 17:13:24 UTC
Permalink
Post by Sebastien Douche
Exact, we use iterator. It's work now with FormEncode 1.2.6. I will
try later with 1.3.0a1. Thanks Chris.
Was it a custom validator or are we missing a built in one that should
accept an iterator that does not have the flag set?

Thanks,
Chris
--
Christopher Lambacher
***@kateandchris.net
Sebastien Douche
2013-12-11 17:18:26 UTC
Permalink
Post by Chris Lambacher
Post by Sebastien Douche
Exact, we use iterator. It's work now with FormEncode 1.2.6. I will
try later with 1.3.0a1. Thanks Chris.
Was it a custom validator or are we missing a built in one that should
accept an iterator that does not have the flag set?
We use the Constant Validator on an iterator value.
--
Sebastien Douche <***@gmail.com>
Twitter: @sdouche / G+: +sdouche
Chris Lambacher
2013-12-11 18:06:14 UTC
Permalink
Post by Sebastien Douche
Post by Chris Lambacher
Post by Sebastien Douche
Exact, we use iterator. It's work now with FormEncode 1.2.6. I will
try later with 1.3.0a1. Thanks Chris.
Was it a custom validator or are we missing a built in one that should
accept an iterator that does not have the flag set?
We use the Constant Validator on an iterator value.
I think it is reasonable that Constant Validator should accept an iterator
by default. I'll make that change.

-Chris
--
Christopher Lambacher
***@kateandchris.net
Sebastien Douche
2013-12-11 17:31:57 UTC
Permalink
Post by Sebastien Douche
Post by Chris Lambacher
Post by Sebastien Douche
Right, same broken tests with the 1.2.5.
That narrows things down. Do you have a custom validator that expects a
sequence that doesn't derive from a formencode validator that expects as
sequence (list, dict, tuple, etc)? If so you will need to add an
accept_iterator = True property to your validator. You can do a quick test
for that by adding it to the instantiation args somewhere you use the
validator.
Exact, we use iterator. It's work now with FormEncode 1.2.6. I will
try later with 1.3.0a1. Thanks Chris.
Tests pass with 1.3.0a1 :).
--
Sebastien Douche <***@gmail.com>
Twitter: @sdouche / G+: +sdouche
Loading...