Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: CMF

[dev] GenericSetup: profile version and metadata.xml

 

 

Zope cmf RSS feed   Index | Next | Previous | View Threaded


y.2007- at wcm-solutions

Dec 5, 2007, 10:23 AM

Post #1 of 9 (1588 views)
Permalink
[dev] GenericSetup: profile version and metadata.xml

Hi!


Running the trunk unit tests triggers warnings like this one:
"UserWarning: Version for profile Products.GenericSetup:default taken
from version.txt. This is deprecated behaviour: please specify the
version in metadata.xml."

I like the fact that using version.txt for the profile version is
deprecated. But you now get always a deprecation warning if no
metadata.xml exists in the profile. Is that intended? Is specifying a
version now required?


Cheers,

Yuppie


_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


wichert at wiggy

Dec 5, 2007, 1:10 PM

Post #2 of 9 (1505 views)
Permalink
Re: [dev] GenericSetup: profile version and metadata.xml [In reply to]

Previously yuppie wrote:
> Hi!
>
>
> Running the trunk unit tests triggers warnings like this one:
> "UserWarning: Version for profile Products.GenericSetup:default taken
> from version.txt. This is deprecated behaviour: please specify the
> version in metadata.xml."
>
> I like the fact that using version.txt for the profile version is
> deprecated. But you now get always a deprecation warning if no
> metadata.xml exists in the profile. Is that intended? Is specifying a
> version now required?

It isn't required - it is fine if a profile has no version. What I did
is add a deprecation warning when the profile metadata did not specify
a version and the version was read from a version.txt file. If you have
no version.txt you will not see the deprecation warning.

I agree the deprecation warnings are annoying in the tests, but I could
not come up with a proper alternative.

Wichert.

--
Wichert Akkerman <wichert [at] wiggy> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


y.2007- at wcm-solutions

Dec 5, 2007, 1:33 PM

Post #3 of 9 (1501 views)
Permalink
Re: [dev] GenericSetup: profile version and metadata.xml [In reply to]

Hi!


Wichert Akkerman wrote:
> Previously yuppie wrote:
>> Running the trunk unit tests triggers warnings like this one:
>> "UserWarning: Version for profile Products.GenericSetup:default taken
>> from version.txt. This is deprecated behaviour: please specify the
>> version in metadata.xml."
>>
>> I like the fact that using version.txt for the profile version is
>> deprecated. But you now get always a deprecation warning if no
>> metadata.xml exists in the profile. Is that intended? Is specifying a
>> version now required?
>
> It isn't required - it is fine if a profile has no version. What I did
> is add a deprecation warning when the profile metadata did not specify
> a version and the version was read from a version.txt file. If you have
> no version.txt you will not see the deprecation warning.

But if you *have* a version.txt file the only way to get rid of the
deprecation warnings is to add a version in metadata.xml. Right? That's
annoying because there is nothing wrong about having a version.txt file
and no metadata.xml file.

> I agree the deprecation warnings are annoying in the tests, but I could
> not come up with a proper alternative.

As long as you don't want to test the deprecation warnings or the
deprecated behavior the tests should be modified using the recommended
pattern. No?


Cheers,

Yuppie

_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


wichert at wiggy

Dec 5, 2007, 1:46 PM

Post #4 of 9 (1509 views)
Permalink
Re: Re: [dev] GenericSetup: profile version and metadata.xml [In reply to]

Previously yuppie wrote:
> Hi!
>
>
> Wichert Akkerman wrote:
> >Previously yuppie wrote:
> >>Running the trunk unit tests triggers warnings like this one:
> >>"UserWarning: Version for profile Products.GenericSetup:default taken
> >>from version.txt. This is deprecated behaviour: please specify the
> >>version in metadata.xml."
> >>
> >>I like the fact that using version.txt for the profile version is
> >>deprecated. But you now get always a deprecation warning if no
> >>metadata.xml exists in the profile. Is that intended? Is specifying a
> >>version now required?
> >
> >It isn't required - it is fine if a profile has no version. What I did
> >is add a deprecation warning when the profile metadata did not specify
> >a version and the version was read from a version.txt file. If you have
> >no version.txt you will not see the deprecation warning.
>
> But if you *have* a version.txt file the only way to get rid of the
> deprecation warnings is to add a version in metadata.xml. Right? That's
> annoying because there is nothing wrong about having a version.txt file
> and no metadata.xml file.

Indeed, and I agree it is annoying. We should make a decision on when we
will remove that version.txt fallback logic and add that to the
deprecation warning.
>
> >I agree the deprecation warnings are annoying in the tests, but I could
> >not come up with a proper alternative.
>
> As long as you don't want to test the deprecation warnings or the
> deprecated behavior the tests should be modified using the recommended
> pattern. No?

It might complicate the tests a bit though.

Wichert.

--
Wichert Akkerman <wichert [at] wiggy> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


y.2007- at wcm-solutions

Dec 5, 2007, 2:07 PM

Post #5 of 9 (1507 views)
Permalink
Re: [dev] GenericSetup: profile version and metadata.xml [In reply to]

Wichert Akkerman wrote:
> Previously yuppie wrote:
>> Wichert Akkerman wrote:
>>> Previously yuppie wrote:
>>>> Running the trunk unit tests triggers warnings like this one:
>>>> "UserWarning: Version for profile Products.GenericSetup:default taken
>>> >from version.txt. This is deprecated behaviour: please specify the
>>>> version in metadata.xml."
>>>>
>>>> I like the fact that using version.txt for the profile version is
>>>> deprecated. But you now get always a deprecation warning if no
>>>> metadata.xml exists in the profile. Is that intended? Is specifying a
>>>> version now required?
>>> It isn't required - it is fine if a profile has no version. What I did
>>> is add a deprecation warning when the profile metadata did not specify
>>> a version and the version was read from a version.txt file. If you have
>>> no version.txt you will not see the deprecation warning.
>> But if you *have* a version.txt file the only way to get rid of the
>> deprecation warnings is to add a version in metadata.xml. Right? That's
>> annoying because there is nothing wrong about having a version.txt file
>> and no metadata.xml file.
>
> Indeed, and I agree it is annoying. We should make a decision on when we
> will remove that version.txt fallback logic and add that to the
> deprecation warning.

In most cases this deprecation warning is false alarm because the
deprecated behavior is not really used. A note in CHANGES.txt might be
more useful than this deprecation warning.

Cheers, Yuppie

_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


tseaver at palladion

Dec 8, 2007, 11:25 AM

Post #6 of 9 (1503 views)
Permalink
Re: [dev] GenericSetup: profile version and metadata.xml [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

yuppie wrote:
> Wichert Akkerman wrote:
>> Previously yuppie wrote:
>>> Wichert Akkerman wrote:
>>>> Previously yuppie wrote:
>>>>> Running the trunk unit tests triggers warnings like this one:
>>>>> "UserWarning: Version for profile Products.GenericSetup:default taken
>>>> >from version.txt. This is deprecated behaviour: please specify the
>>>>> version in metadata.xml."
>>>>>
>>>>> I like the fact that using version.txt for the profile version is
>>>>> deprecated. But you now get always a deprecation warning if no
>>>>> metadata.xml exists in the profile. Is that intended? Is specifying a
>>>>> version now required?
>>>> It isn't required - it is fine if a profile has no version. What I did
>>>> is add a deprecation warning when the profile metadata did not specify
>>>> a version and the version was read from a version.txt file. If you have
>>>> no version.txt you will not see the deprecation warning.
>>> But if you *have* a version.txt file the only way to get rid of the
>>> deprecation warnings is to add a version in metadata.xml. Right? That's
>>> annoying because there is nothing wrong about having a version.txt file
>>> and no metadata.xml file.
>> Indeed, and I agree it is annoying. We should make a decision on when we
>> will remove that version.txt fallback logic and add that to the
>> deprecation warning.
>
> In most cases this deprecation warning is false alarm because the
> deprecated behavior is not really used. A note in CHANGES.txt might be
> more useful than this deprecation warning.

I've checked in changes which make this warning go away when running
tests, through a combination of 'warnings.fiterwarnings' and adding a
version to a metwadata.xml file.

There is another warning which shows up, due to the presence of the
'version' parameter when invoking import step registry. I believe that
this deprecation is done in error, because removing all the 'version'
arguments causes tests to fail: if the version argument matters, in
which case we can't deprecate it.



Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver [at] palladion
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHWu+7+gerLs4ltQ4RAo28AKDLg9EkusjNWfePkjASQwAXx93QkQCfbPt6
L6IIWhXj3V+2CVwuivHQ2fU=
=c3OH
-----END PGP SIGNATURE-----

_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


y.2007- at wcm-solutions

Dec 18, 2007, 9:59 AM

Post #7 of 9 (1480 views)
Permalink
Re: [dev] GenericSetup: profile version and metadata.xml [In reply to]

Hi!


Tres Seaver wrote:
> yuppie wrote:
>>>>> Previously yuppie wrote:
>>>>>> Running the trunk unit tests triggers warnings like this one:
>>>>>> "UserWarning: Version for profile Products.GenericSetup:default taken
>>>>>> from version.txt. This is deprecated behaviour: please specify the
>>>>>> version in metadata.xml."
[...]
>> In most cases this deprecation warning is false alarm because the
>> deprecated behavior is not really used. A note in CHANGES.txt might be
>> more useful than this deprecation warning.
>
> I've checked in changes which make this warning go away when running
> tests, through a combination of 'warnings.fiterwarnings' and adding a
> version to a metwadata.xml file.

Thanks! But unfortunately this isn't just a GenericSetup testing issue.
The same warnings show up on Zope startup and in CMF tests:
http://mail.zope.org/pipermail/cmf-tests/2007-December/007342.html

The only way to get rid of these warnings is a) adding a metadata.xml
file with specified version to *each* profile or b) removing the
warnings completely.

Since metadata.xml files are not required I vote for b).


Cheers,

Yuppie

_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


tseaver at palladion

Dec 18, 2007, 10:44 AM

Post #8 of 9 (1478 views)
Permalink
Re: [dev] GenericSetup: profile version and metadata.xml [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

yuppie wrote:
> Hi!
>
>
> Tres Seaver wrote:
>> yuppie wrote:
>>>>>> Previously yuppie wrote:
>>>>>>> Running the trunk unit tests triggers warnings like this one:
>>>>>>> "UserWarning: Version for profile Products.GenericSetup:default taken
>>>>>>> from version.txt. This is deprecated behaviour: please specify the
>>>>>>> version in metadata.xml."
> [...]
>>> In most cases this deprecation warning is false alarm because the
>>> deprecated behavior is not really used. A note in CHANGES.txt might be
>>> more useful than this deprecation warning.
>> I've checked in changes which make this warning go away when running
>> tests, through a combination of 'warnings.fiterwarnings' and adding a
>> version to a metwadata.xml file.
>
> Thanks! But unfortunately this isn't just a GenericSetup testing issue.
> The same warnings show up on Zope startup and in CMF tests:
> http://mail.zope.org/pipermail/cmf-tests/2007-December/007342.html
>
> The only way to get rid of these warnings is a) adding a metadata.xml
> file with specified version to *each* profile or b) removing the
> warnings completely.
>
> Since metadata.xml files are not required I vote for b).

+1. As an alternative, we could log the warning at "blather" level,
which should be suppressed during "normal" startup / testing.


Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver [at] palladion
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHaBUN+gerLs4ltQ4RAjSZAKCjMIB0RKzHXbzrj6ESFvDGjdYUWQCgsovC
spzt2V+2waPZr57cwSBfeqA=
=AWKB
-----END PGP SIGNATURE-----

_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


tseaver at palladion

Dec 18, 2007, 10:44 AM

Post #9 of 9 (1477 views)
Permalink
Re: [dev] GenericSetup: profile version and metadata.xml [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

yuppie wrote:
> Hi!
>
>
> Tres Seaver wrote:
>> yuppie wrote:
>>>>>> Previously yuppie wrote:
>>>>>>> Running the trunk unit tests triggers warnings like this one:
>>>>>>> "UserWarning: Version for profile Products.GenericSetup:default taken
>>>>>>> from version.txt. This is deprecated behaviour: please specify the
>>>>>>> version in metadata.xml."
> [...]
>>> In most cases this deprecation warning is false alarm because the
>>> deprecated behavior is not really used. A note in CHANGES.txt might be
>>> more useful than this deprecation warning.
>> I've checked in changes which make this warning go away when running
>> tests, through a combination of 'warnings.fiterwarnings' and adding a
>> version to a metwadata.xml file.
>
> Thanks! But unfortunately this isn't just a GenericSetup testing issue.
> The same warnings show up on Zope startup and in CMF tests:
> http://mail.zope.org/pipermail/cmf-tests/2007-December/007342.html
>
> The only way to get rid of these warnings is a) adding a metadata.xml
> file with specified version to *each* profile or b) removing the
> warnings completely.
>
> Since metadata.xml files are not required I vote for b).

+1. As an alternative, we could log the warning at "blather" level,
which should be suppressed during "normal" startup / testing.


Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver [at] palladion
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHaBUN+gerLs4ltQ4RAjSZAKCjMIB0RKzHXbzrj6ESFvDGjdYUWQCgsovC
spzt2V+2waPZr57cwSBfeqA=
=AWKB
-----END PGP SIGNATURE-----

_______________________________________________
Zope-CMF maillist - Zope-CMF [at] lists
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests

Zope cmf RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.