How do I make Jython un-cache modules?

Jython is incredibly useful. I want to maintain some shared code, basically a few data structures, config items, convenience functions. I try adding a in the jss/jython/workflow directory, and I can then easily "include shared" in my Jython scripts ... until I need to revise ... an old version gets cached in JIRA/Jython somewhere and I don't know how to get the revised version re-interpreted.

I have tried removing shared$py.class as if it were an errant .pyc file, but nothing happens. A new class file is not even re-created.

So, I have to copy all my shared functions manually back into my scripts. Talk about a bad scene!

How can I convince Jython to re-load my updated shared module?

1 answer

1 accepted

So, a colleague got this into my scripts, and it appears to do the trick:

import shared

Can anyone posting bounty here confirm this is valid?

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,307 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot