[Zope-dev] z3c.form 2.0 release

Brian Sutherland brian at vanguardistas.net
Wed Dec 10 05:49:47 EST 2008


On Tue, Dec 09, 2008 at 09:09:26PM +0100, Brian Sutherland wrote:
> On Tue, Dec 09, 2008 at 04:31:33PM +0100, Malthe Borch wrote:
> > 2008/12/9 Roger Ineichen <dev at projekt01.ch>:
> > > I agree
> > > A package should never use another package as it's namespace.
> > > Which means a package can not be both a package and namespace for
> > > other packages.
> > 
> > Seems to work fine for e.g. ``repoze.bfg``.
> 
> It works under most situations, but not the ones that are important to
> me. I've never tried to use repoze.bfg.
> 
> > > Malthe are you aware of this? Can you change it?
> > 
> > I do regret the package name and I would not be opposed to renaming it
> > to z3c.ptcompat.
> 
> Great, then sometime this week I'll:
>     * rename the package

I've done this.

>     * upload a release to pypi

I got caught on this, for 2 reasons:

    * The z3c.pt.compat tests are broken and were broken before I
      started. I don't want to release a package with broken tests. [1]
    * 93339 breaks the z3c.form tests [2]

Below are the failures, Malthe, would you mind having a look at these?

>     * change the imports and dependencies in z3c.form

I've done this on a branch for now. I'll have a look at the other
z3c.* packages once this is all working.

The test failures:

[1]

Running zope.testing.testrunner.layer.UnitTests tests:
  Set up zope.testing.testrunner.layer.UnitTests in 0.000 seconds.


Failure in test /Users/jinty/src/z3c.ptcompat/src/z3c/ptcompat/zcml.txt
Traceback (most recent call last):
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/unittest.py",
line 260, in run
    testMethod()
  File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/doctest.py",
line 2128, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for zcml.txt
  File "/Users/jinty/src/z3c.ptcompat/src/z3c/ptcompat/zcml.txt", line 0

----------------------------------------------------------------------
File "/Users/jinty/src/z3c.ptcompat/src/z3c/ptcompat/zcml.txt", line 27,
in zcml.txt
Failed example:
    factory.index
Expected:
    <z3c.ptcompat.ViewPageTemplateFile object at ...>
Got:
    <z3c.ptcompat.BoundViewPageTemplateFile
'/Users/jinty/src/z3c.ptcompat/src/z3c/ptcompat/tests/test.pt'>
----------------------------------------------------------------------
File "/Users/jinty/src/z3c.ptcompat/src/z3c/ptcompat/zcml.txt", line 45,
in zcml.txt
Failed example:
    factory.index
Expected:
    <z3c.ptcompat.ViewPageTemplateFile object at ...>
Got:
    <z3c.ptcompat.BoundViewPageTemplateFile
'/Users/jinty/src/z3c.ptcompat/src/z3c/ptcompat/tests/test.pt'>
----------------------------------------------------------------------
File "/Users/jinty/src/z3c.ptcompat/src/z3c/ptcompat/zcml.txt", line 70,
in zcml.txt
Failed example:
    factory.template
Expected:
    <z3c.ptcompat.ViewPageTemplateFile object at ...>
Got:
    <z3c.ptcompat.BoundViewPageTemplateFile
'/Users/jinty/src/z3c.ptcompat/src/z3c/ptcompat/tests/test.pt'>
----------------------------------------------------------------------
File "/Users/jinty/src/z3c.ptcompat/src/z3c/ptcompat/zcml.txt", line 90,
in zcml.txt
Failed example:
    factory.template
Expected:
    <z3c.ptcompat.ViewPageTemplateFile object at ...>
Got:
    <z3c.ptcompat.BoundViewPageTemplateFile
'/Users/jinty/src/z3c.ptcompat/src/z3c/ptcompat/tests/test.pt'>
----------------------------------------------------------------------
File "/Users/jinty/src/z3c.ptcompat/src/z3c/ptcompat/zcml.txt", line
111, in zcml.txt
Failed example:
    factory.index
Expected:
    <z3c.ptcompat.ViewPageTemplateFile object at ...>
Got:
    <z3c.ptcompat.BoundViewPageTemplateFile
'/Users/jinty/src/z3c.ptcompat/src/z3c/ptcompat/tests/test.pt'>
----------------------------------------------------------------------
File "/Users/jinty/src/z3c.ptcompat/src/z3c/ptcompat/zcml.txt", line
131, in zcml.txt
Failed example:
    factory.index
Expected:
    <z3c.ptcompat.ViewPageTemplateFile object at ...>
Got:
    <z3c.ptcompat.BoundViewPageTemplateFile
'/Users/jinty/src/z3c.ptcompat/src/z3c/ptcompat/tests/test.pt'>

[2]

Failure in test /Users/jinty/src/z3c.form/src/z3c/form/tests/../form.txt
Failed doctest test for form.txt
  File "/Users/jinty/src/z3c.form/src/z3c/form/tests/../form.txt", line
0

----------------------------------------------------------------------
File "/Users/jinty/src/z3c.form/src/z3c/form/tests/../form.txt", line
478, in form.txt
Failed example:
    print addForm.render() # doctest: +NOPARSE_MARKUP
Expected:
  <html xmlns="http://www.w3.org/1999/xhtml">
    <body>
      <i>There were some errors.</i>
      <ul>
        <li>
          <div class="error">The id and name cannot be the same.</div>
        </li>
      </ul>
      ...
    </body>
  </html>

Got:
  <html xmlns="http://www.w3.org/1999/xhtml">
    <body>
      <i>There were some errors.</i>
      <ul>
        <li>
          <div class="error">The id and name cannot be the same.</div>
        </li>
      </ul>
      <form action=".">
        <div class="row">
          <label for="form-widgets-id">ID</label>
          <input class="text-widget required textline-field"
id="form-widgets-id" name="form.widgets.id" type="text" value="Stephan">
        </div>
        <div class="row">
          <label for="form-widgets-name">Name</label>
          <input class="text-widget required textline-field"
id="form-widgets-name" name="form.widgets.name" type="text"
value="Stephan">
        </div>
        <div class="row">
          <label for="form-widgets-gender">Gender</label>
          <select class="select-widget choice-field"
id="form-widgets-gender" name="form.widgets.gender:list" size="1">
            <option id="form-widgets-gender-novalue"
value="--NOVALUE--">no value</option>
            <option id="form-widgets-gender-0" selected="selected"
value="male">male</option>
            <option id="form-widgets-gender-1"
value="female">female</option>
          </select>
          <input name="form.widgets.gender-empty-marker" type="hidden"
value="1">
        </div>
        <div class="row">
          <label for="form-widgets-age">Age</label>
          <input class="text-widget int-field" id="form-widgets-age"
name="form.widgets.age" type="text" value="23">
        </div>
        <div class="action">
          <input class="submit-widget button-field"
id="form-buttons-add" name="form.buttons.add" type="submit" value="Add">
        </div>
      </form>
    </body>
  </html>

Diff:
  <html xmlns="http://www.w3.org/1999/xhtml">
    <body>
      <i>There were some errors.</i>
      <ul>
        <li>
          <div class="error">The id and name cannot be the same.</div>
        </li>
      </ul>
      
      -<form action=".">
        <div class="row">
          <label for="form-widgets-id">ID</label>
          <input class="text-widget required textline-field"
id="form-widgets-id" name="form.widgets.id" type="text" value="Stephan">
        </div>
        <div class="row">
          <label for="form-widgets-name">Name</label>
          <input class="text-widget required textline-field"
id="form-widgets-name" name="form.widgets.name" type="text"
value="Stephan">
        </div>
        <div class="row">
          <label for="form-widgets-gender">Gender</label>
          <select class="select-widget choice-field"
id="form-widgets-gender" name="form.widgets.gender:list" size="1">
            <option id="form-widgets-gender-novalue"
value="--NOVALUE--">no value</option>
            <option id="form-widgets-gender-0" selected="selected"
value="male">male</option>
            <option id="form-widgets-gender-1"
value="female">female</option>
          </select>
          <input name="form.widgets.gender-empty-marker" type="hidden"
value="1">
        </div>
        <div class="row">
          <label for="form-widgets-age">Age</label>
          <input class="text-widget int-field" id="form-widgets-age"
name="form.widgets.age" type="text" value="23">
        </div>
        <div class="action">
          <input class="submit-widget button-field"
id="form-buttons-add" name="form.buttons.add" type="submit" value="Add">
        </div>
      </form>
    </body>
  </html>




> 
> Please let me know if there's a step I'm missing?
> 
> > 
> > \malthe
> > 
> 
> -- 
> Brian Sutherland
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev at zope.org
> http://mail.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope )

-- 
Brian Sutherland


More information about the Zope-Dev mailing list