<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/formencode/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/formencode/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 09 Aug 2012 14:03:28 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/formencode/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>Mandatory checkbox</title><link>https://sourceforge.net/p/formencode/bugs/121/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;At the moment, Bool and StringBool are always valid and not_empty=True has no effect. This is unfortunate because it is not possible to have a simple checkbox on a form that the user must check to comply.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Matthieu Pepin</dc:creator><pubDate>Thu, 09 Aug 2012 14:03:28 -0000</pubDate><guid>https://sourceforge.net17b746fe7b7f04871ae7eaee4a9e6f652453e910</guid></item><item><title>url that includes ip address not working</title><link>https://sourceforge.net/p/formencode/bugs/120/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;URL validator fails with url "http://65.18.195.155/cgi-ordoro/bo/start.cgi"&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">drmaples</dc:creator><pubDate>Tue, 07 Feb 2012 16:56:00 -0000</pubDate><guid>https://sourceforge.nete501ee9b6e447cd757e952ebec576bcce66c9b2f</guid></item><item><title>Current All compound validator behaves like Pipe</title><link>https://sourceforge.net/p/formencode/bugs/119/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;This leads to various issues like:&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt;&amp;gt; All(validators=[Int, Bool]).to_python('yes')&lt;br /&gt;
1&lt;/p&gt;
&lt;p&gt;even though it should fail as yes is 'yes' not an Int.&lt;/p&gt;
&lt;p&gt;Also the fact that FormEncode mixes validation and conversion is an issue in All.&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt;&amp;gt; All(validators=[Int, Bool]).to_python('1')&lt;br /&gt;
1&lt;/p&gt;
&lt;p&gt;I get 1 even though I probably wanted a True. &lt;br /&gt;
Currently All is an inverse Pipe with an odd name.&lt;/p&gt;
&lt;p&gt;A proposed solution is to add a "converter" parameter to All, in the case this parameter is available the validators are applied on the original value instead of being used on the output of the previous validator and only converter is used to provide the requested output.&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt;&amp;gt; All(validators=[Int, Bool], converter=Bool).to_python('yes')&lt;br /&gt;
Invalid&lt;/p&gt;
&lt;p&gt;&amp;gt;&amp;gt;&amp;gt; All(validators=[Int, Bool], converter=Bool).to_python('1')&lt;br /&gt;
True&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alessandro Molina</dc:creator><pubDate>Sat, 24 Sep 2011 17:51:18 -0000</pubDate><guid>https://sourceforge.net04aa0e1baafe1bb9167c280df15eaed54fb2c2a4</guid></item><item><title>Compound validators are inconsistent</title><link>https://sourceforge.net/p/formencode/bugs/118/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The three compound validators—Any, All, and Pipe—process their subvalidators in reverse order depending on the direction of conversion. But Pipe reverses them for from_python, while Any and All reverse them for to_python.&lt;/p&gt;
&lt;p&gt;Moreover, the documentation for Any claims that the “first validator/converter that validates the value will be used”, whereas (from the user’s point of view) it’s the last one.&lt;/p&gt;
&lt;p&gt;For consistency, all compound validators should process self.vaidators in direct order for to_python.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 14 Sep 2011 17:43:18 -0000</pubDate><guid>https://sourceforge.net160d739b256afac660282f7263cea63488d4faf8</guid></item><item><title>test suite fails with python 2.7</title><link>https://sourceforge.net/p/formencode/bugs/117/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;python 2.7.1&lt;br /&gt;
formencode head (or whatever is the name of the top of the hg tree)&lt;br /&gt;
nose 1.0.0&lt;/p&gt;
&lt;p&gt;[fetchinson@fetch formencode]$ python2.7 -c "import nose; nose.run_exit( )"&lt;br /&gt;
......EEEE.EE.....................................F...................................................................................&lt;br /&gt;
======================================================================&lt;br /&gt;
ERROR: tests.test_htmlfill.test_inputoutput('/home/nogradi/files/python/svn/formencode-py3k.hg/tests/htmlfill_data/data-fill1.txt',)&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
File "/usr/local/lib/python2.7/site-packages/nose-1.0.0-py2.7.egg/nose/case.py", line 187, in runTest&lt;br /&gt;
self.test(*self.arg)&lt;br /&gt;
File "/home/nogradi/files/python/svn/formencode-py3k.hg/tests/test_htmlfill.py", line 68, in run_filename&lt;br /&gt;
output_xml = ET.XML(output)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1282, in XML&lt;br /&gt;
parser.feed(text)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1624, in feed&lt;br /&gt;
self._raiseerror(v)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1488, in _raiseerror&lt;br /&gt;
raise err&lt;br /&gt;
ParseError: not well-formed (invalid token): line 1, column 9&lt;/p&gt;
&lt;p&gt;======================================================================&lt;br /&gt;
ERROR: tests.test_htmlfill.test_inputoutput('/home/nogradi/files/python/svn/formencode-py3k.hg/tests/htmlfill_data/data-error1.txt',)&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
File "/usr/local/lib/python2.7/site-packages/nose-1.0.0-py2.7.egg/nose/case.py", line 187, in runTest&lt;br /&gt;
self.test(*self.arg)&lt;br /&gt;
File "/home/nogradi/files/python/svn/formencode-py3k.hg/tests/test_htmlfill.py", line 68, in run_filename&lt;br /&gt;
output_xml = ET.XML(output)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1282, in XML&lt;br /&gt;
parser.feed(text)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1624, in feed&lt;br /&gt;
self._raiseerror(v)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1488, in _raiseerror&lt;br /&gt;
raise err&lt;br /&gt;
ParseError: not well-formed (invalid token): line 2, column 5&lt;/p&gt;
&lt;p&gt;======================================================================&lt;br /&gt;
ERROR: tests.test_htmlfill.test_inputoutput('/home/nogradi/files/python/svn/formencode-py3k.hg/tests/htmlfill_data/data-schema1.txt',)&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
File "/usr/local/lib/python2.7/site-packages/nose-1.0.0-py2.7.egg/nose/case.py", line 187, in runTest&lt;br /&gt;
self.test(*self.arg)&lt;br /&gt;
File "/home/nogradi/files/python/svn/formencode-py3k.hg/tests/test_htmlfill.py", line 68, in run_filename&lt;br /&gt;
output_xml = ET.XML(output)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1282, in XML&lt;br /&gt;
parser.feed(text)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1624, in feed&lt;br /&gt;
self._raiseerror(v)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1488, in _raiseerror&lt;br /&gt;
raise err&lt;br /&gt;
ParseError: mismatched tag: line 8, column 2&lt;/p&gt;
&lt;p&gt;======================================================================&lt;br /&gt;
ERROR: tests.test_htmlfill.test_inputoutput('/home/nogradi/files/python/svn/formencode-py3k.hg/tests/htmlfill_data/data-fill4.txt',)&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
File "/usr/local/lib/python2.7/site-packages/nose-1.0.0-py2.7.egg/nose/case.py", line 187, in runTest&lt;br /&gt;
self.test(*self.arg)&lt;br /&gt;
File "/home/nogradi/files/python/svn/formencode-py3k.hg/tests/test_htmlfill.py", line 68, in run_filename&lt;br /&gt;
output_xml = ET.XML(output)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1283, in XML&lt;br /&gt;
return parser.close()&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1636, in close&lt;br /&gt;
self._raiseerror(v)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1488, in _raiseerror&lt;br /&gt;
raise err&lt;br /&gt;
ParseError: no element found: line 13, column 0&lt;/p&gt;
&lt;p&gt;======================================================================&lt;br /&gt;
ERROR: tests.test_htmlfill.test_inputoutput('/home/nogradi/files/python/svn/formencode-py3k.hg/tests/htmlfill_data/data-fill3.txt',)&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
File "/usr/local/lib/python2.7/site-packages/nose-1.0.0-py2.7.egg/nose/case.py", line 187, in runTest&lt;br /&gt;
self.test(*self.arg)&lt;br /&gt;
File "/home/nogradi/files/python/svn/formencode-py3k.hg/tests/test_htmlfill.py", line 68, in run_filename&lt;br /&gt;
output_xml = ET.XML(output)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1282, in XML&lt;br /&gt;
parser.feed(text)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1624, in feed&lt;br /&gt;
self._raiseerror(v)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1488, in _raiseerror&lt;br /&gt;
raise err&lt;br /&gt;
ParseError: mismatched tag: line 5, column 2&lt;/p&gt;
&lt;p&gt;======================================================================&lt;br /&gt;
ERROR: tests.test_htmlfill.test_inputoutput('/home/nogradi/files/python/svn/formencode-py3k.hg/tests/htmlfill_data/data-fill2.txt',)&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
File "/usr/local/lib/python2.7/site-packages/nose-1.0.0-py2.7.egg/nose/case.py", line 187, in runTest&lt;br /&gt;
self.test(*self.arg)&lt;br /&gt;
File "/home/nogradi/files/python/svn/formencode-py3k.hg/tests/test_htmlfill.py", line 68, in run_filename&lt;br /&gt;
output_xml = ET.XML(output)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1282, in XML&lt;br /&gt;
parser.feed(text)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1624, in feed&lt;br /&gt;
self._raiseerror(v)&lt;br /&gt;
File "/usr/local/lib/python2.7/xml/etree/ElementTree.py", line 1488, in _raiseerror&lt;br /&gt;
raise err&lt;br /&gt;
ParseError: syntax error: line 1, column 54&lt;/p&gt;
&lt;p&gt;======================================================================&lt;br /&gt;
FAIL: tests.test_htmlgen.test_comment&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
File "/usr/local/lib/python2.7/site-packages/nose-1.0.0-py2.7.egg/nose/case.py", line 187, in runTest&lt;br /&gt;
self.test(*self.arg)&lt;br /&gt;
File "/home/nogradi/files/python/svn/formencode-py3k.hg/tests/test_htmlgen.py", line 52, in test_comment&lt;br /&gt;
assert str(html.comment('test')) == '&amp;lt;!-- test --&amp;gt;'&lt;br /&gt;
AssertionError: &lt;/p&gt;
&lt;p&gt;----------------------------------------------------------------------&lt;br /&gt;
Ran 134 tests in 0.216s&lt;/p&gt;
&lt;p&gt;FAILED (errors=6, failures=1)&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel</dc:creator><pubDate>Sat, 28 May 2011 14:31:44 -0000</pubDate><guid>https://sourceforge.net7fa1e393ab67fe4bd846c82ecec129b22f564405</guid></item><item><title>IPAddress allowing bad octets</title><link>https://sourceforge.net/p/formencode/bugs/116/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The IPAddress validator is allowing IP addresses of this form: "219.080.004.150" &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Thu, 12 May 2011 17:57:37 -0000</pubDate><guid>https://sourceforge.net137de21ac7e70af3ddb1d85fb628a7589002da85</guid></item><item><title>Schema with UnicodeString item behaves unclearly</title><link>https://sourceforge.net/p/formencode/bugs/115/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Here's an example.&lt;/p&gt;
&lt;p&gt;# =====================&lt;br /&gt;
from formencode import Schema, Invalid&lt;br /&gt;
from formencode.validators import UnicodeString, Int&lt;br /&gt;
from webob import Request&lt;/p&gt;
&lt;p&gt;class StrictSchema(Schema):&lt;br /&gt;
allow_extra_fields = False&lt;/p&gt;
&lt;p&gt;class IntegerTestSchema(StrictSchema):&lt;br /&gt;
testfield = Int(not_empty=True)&lt;/p&gt;
&lt;p&gt;class StringTestSchema(StrictSchema):&lt;br /&gt;
testfield = UnicodeString(not_empty=True)&lt;/p&gt;
&lt;p&gt;# Testing.&lt;br /&gt;
# =====================&lt;br /&gt;
req = Request.blank('/?testfield=111')&lt;br /&gt;
print IntegerTestSchema.to_python(req.params)&lt;/p&gt;
&lt;p&gt;# This raises an exception&lt;br /&gt;
req = Request.blank('/?testfield=111&amp;amp;testfield=222')&lt;br /&gt;
try:&lt;br /&gt;
IntegerTestSchema.to_python(req.params)&lt;br /&gt;
except Invalid as e:&lt;br /&gt;
print "Caught Exception: {0}".format(e)&lt;/p&gt;
&lt;p&gt;req = Request.blank('/?testfield=aaa')&lt;br /&gt;
print StringTestSchema.to_python(req.params)&lt;/p&gt;
&lt;p&gt;# This will be passed successfully (!)&lt;br /&gt;
# The output will be {'testfield': u"[u'aaa', u'bbb']"}&lt;br /&gt;
req = Request.blank('/?testfield=aaa&amp;amp;testfield=bbb')&lt;br /&gt;
print StringTestSchema.to_python(req.params)&lt;/p&gt;
&lt;p&gt;# ========================&lt;/p&gt;
&lt;p&gt;Please note we do not use formencode.ForEach() or formencode.Set()&lt;br /&gt;
here. I think this is very unclear behaviour. &lt;/p&gt;
&lt;p&gt;This behavior happens because mixed is used here - &lt;a href="https://bitbucket.org/ianb/formencode/src/d95237b33f3c/formencode/api.py#cl-403" rel="nofollow"&gt;https://bitbucket.org/ianb/formencode/src/d95237b33f3c/formencode/api.py#cl-403&lt;/a&gt;&lt;br /&gt;
For example, if we'd have an unified behaviour for all single-value validators (Int, UnicodeString, Bool etc.) we could get "[u'John', u'Mike']" result only for "/?username=[u'John', u'Mike']" request. But now, we can get the same result by the two different requests - by "/?username=[u'John', u'Mike']" and by "/? username=John&amp;amp;username=Mike". This shouldn't be allowed.&lt;/p&gt;
&lt;p&gt;Original discussion has been started here - &lt;a href="http://groups.google.com/group/pylons-discuss/browse_thread/thread/ccbfeac4c12d3a9b" rel="nofollow"&gt;http://groups.google.com/group/pylons-discuss/browse_thread/thread/ccbfeac4c12d3a9b&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Max </dc:creator><pubDate>Sun, 13 Feb 2011 13:25:46 -0000</pubDate><guid>https://sourceforge.netf615ad17f0651db336dec4821f9e9cc15901d6f4</guid></item><item><title>requireifpresent with timeconverter</title><link>https://sourceforge.net/p/formencode/bugs/114/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;if a TimeConverter field is used with RequireIfPresent and a time in format '0:0' is given the form give a missing error&lt;/p&gt;
&lt;p&gt;hch = fe.validators.TimeConverter(use_datetime=True, use_seconds=False)&lt;br /&gt;
chained_validators = [&lt;br /&gt;
fe.validators.RequireIfPresent(present='mane_id', required='hin')&lt;br /&gt;
]&lt;/p&gt;
&lt;p&gt;the problem is at row 2648 of the validator.py module&lt;/p&gt;
&lt;p&gt;if is_required and not value_dict.get(self.required):&lt;/p&gt;
&lt;p&gt;this row I think must be:&lt;/p&gt;
&lt;p&gt;if is_required and value_dict.get(self.required) is None:&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 10 Jan 2011 10:22:08 -0000</pubDate><guid>https://sourceforge.net7f7860cbca1176f628ee9bfda3f9910e937f12c9</guid></item><item><title>formencode.api.set_stdtranslation stopped working in 1.2.3</title><link>https://sourceforge.net/p/formencode/bugs/113/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I use Pylons 1.0 and in environment.py I put:&lt;br /&gt;
formencode.api.set_stdtranslation(domain='FormEncode', languages=['pl'])&lt;br /&gt;
to get Polish messages.&lt;/p&gt;
&lt;p&gt;It worked in 1.2.2 but stopped working in 1.2.3dev and I always get English messages.&lt;br /&gt;
I use uwsgi for deployment if that matters.&lt;/p&gt;
&lt;p&gt;Sorry for the duplicate, please remove the one submitted by "nobody."&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Juliusz Gonera</dc:creator><pubDate>Sat, 08 Jan 2011 23:42:35 -0000</pubDate><guid>https://sourceforge.net38a9e3a06e88d2f563a57048863c892a90b53fb1</guid></item><item><title>formencode.api.set_stdtranslation stopped working in 1.2.3</title><link>https://sourceforge.net/p/formencode/bugs/112/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I use Pylons 1.0 and in environment.py I put:&lt;br /&gt;
formencode.api.set_stdtranslation(domain='FormEncode', languages=['pl'])&lt;br /&gt;
to get Polish messages.&lt;/p&gt;
&lt;p&gt;It worked in 1.2.2 but stopped working in 1.2.3dev and I always get English messages.&lt;br /&gt;
I use uwsgi for deployment if that matters.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sat, 08 Jan 2011 23:40:29 -0000</pubDate><guid>https://sourceforge.net3eef53344568f9d2c164a22bce6ab608f6884f01</guid></item></channel></rss>