Skip to content

only trigger deprecated warnings on using functionality which is actually deprecated#1107

Merged
boegel merged 37 commits intoeasybuilders:developfrom
boegel:stop_triggering_legacy
Dec 16, 2014
Merged

only trigger deprecated warnings on using functionality which is actually deprecated#1107
boegel merged 37 commits intoeasybuilders:developfrom
boegel:stop_triggering_legacy

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Dec 10, 2014

This contains changes required such that deprecation log messages are only hit when actual deprecated functionality is being relied upon.

This is necessary to make --deprecated useful, with the upcoming EasyBuild v2.0 release in mind.

depends on hpcugent/vsc-base#149

@hpcugentbot
Copy link
Copy Markdown

Test FAILed.

@hpcugentbot
Copy link
Copy Markdown

Test FAILed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the if ...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it's there on purpose...

the default implementation of extra_options in EasyBlock must still return a list (of tuples) for now, until we switch to making it return a dict in EasyBuild v2.0

the list will be empty by default though, so I've added the check here to only complain in case the list is non-empty...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then you are not deprecating anything yet. the new format should work, any old behaviour should be converted in new style.

@hpcugentbot
Copy link
Copy Markdown

Test PASSed.

Comment thread easybuild/tools/config.py
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes no sense. either deprecate the oldstyle or not.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't get rid of the old-style config file yet, since it still handles old-style configuring... The deprecation of the old-style variables etc. is handled in different places.

Without the if, using --deprecated triggers a deprecation error straight away, since easybuild_config.py is still there (and must be).

We can trigger a deprecation (error) if a non-default old-style config file was specified via -C.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same remark as above: then you are not deprecating anything. the actual move to 2.0 should be no more then removing code blocks that convert oldstyle in new style.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could reimplement what the old-style default config file easybuild_config.py does in config.py, but that would be wasted effort since we actually want to get rid of it

the deprecation of what is being defined via easybuild_config.py is handled in other places, in code blocks that can simply be dropped once we clean things up (EasyBuild v2.1?)

note that this whole block will disappear too (anything under the if SUPPORT_OLDSTYLE), so with EasyBuild v2.1 we will be able to just delete all of this, no need to convert code at all...

@hpcugentbot
Copy link
Copy Markdown

Test FAILed.

@hpcugentbot
Copy link
Copy Markdown

Test FAILed.

@hpcugentbot
Copy link
Copy Markdown

Test PASSed.

1 similar comment
@hpcugentbot
Copy link
Copy Markdown

Test PASSed.

@hpcugentbot
Copy link
Copy Markdown

Test PASSed.

1 similar comment
@hpcugentbot
Copy link
Copy Markdown

Test PASSed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the elif? also for HybridListDict .items() should work? make the above

if isinstance(opts, (dict, HybridListDict)):

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true that, will fix

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, I do have a reason actually... keeping this separate makes it easy to remove this again in a future version, instead of having to refactor code to flesh out the HybridListDict...

@hpcugentbot
Copy link
Copy Markdown

Test PASSed.

@hpcugentbot
Copy link
Copy Markdown

Test PASSed.

@hpcugentbot
Copy link
Copy Markdown

Test FAILed.

@hpcugentbot
Copy link
Copy Markdown

Test FAILed.

@hpcugentbot
Copy link
Copy Markdown

Test PASSed.

@hpcugentbot
Copy link
Copy Markdown

Test FAILed.

@hpcugentbot
Copy link
Copy Markdown

Test PASSed.

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Dec 16, 2014

remarks have been fixed, Jenkins is happy with this and further testing didn't reveal any other issues, so merging this in

Thanks @wpoely86 and @stdweird for reviewing this!

boegel added a commit that referenced this pull request Dec 16, 2014
only trigger deprecated warnings on using functionality which is actually deprecated
@boegel boegel merged commit ae05cff into easybuilders:develop Dec 16, 2014
@boegel boegel deleted the stop_triggering_legacy branch December 16, 2014 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants