Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6056421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:22:28+00:00 2026-05-23T08:22:28+00:00

My employer has a dedicated module 1 we use for internal unit / system

  • 0

My employer has a dedicated module1 we use for internal unit / system test; however, the author of this module no longer works here and I have been asked to test some devices with it.

The problem is that pyfoo requires an ancient version of twisted (v8.2.0) and it imports twisted in 33 different files. I tried running pyfoo‘s unit tests under v11.0.0 and I don’t even see TCP SYN packets2. Unfortunately, I have already got twisted v11.0.0 installed on my lab linux server and I have my own code that depends on it.

To solve this problem, I have only come up with the following options:

Option A. Install a new version of python, install virtualenv, and then install an old version of twisted under the virtualenv. Only run the tests requiring pyfoo under this new version of python.

Option B. Edit all 33 of the files with the following: DIR = '../'; sys.path.insert(0, DIR) and install the old version of python in the appropriate directory below the source.

Option C. Attempt to fix pyfoo to use v11.0.03

Are there any options I am missing? Is there a more elegant way to solve this problem, besides Option A, above?


END-NOTES:

  1. Let’s call it pyfoo for sake of argument
  2. The unit tests connect to one of our local lab servers and exercises basic telnet functionality
  3. This option is almost a non-starter… pyfoo is not trivial, and I have a short deadline for this work.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:22:28+00:00Added an answer on May 23, 2026 at 8:22 am

    A better version of option B. would be to replace

    import twisted
    

    by

    import pkg_resources
    pkg_resources.require("Twisted==8.2.0")
    import twisted
    

    which will arrange for the correct version of twisted to be imported, so long as it’s installed, and raises an exception otherwise. This is a more portable solution.

    This won’t work, though (nor would any other variaton of option B), if twisted gets imported before the pkg_resources.require gets called; twisted will already be in sys.modules

    OP Edit: Minor syntax correction, per pkg_resources docs

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm dealing with an issue with my current employer that has seriously made me
I've found an article on this subject by a Microsoft employee, but has anyone
My employer has a database committee and we've been discussing different platforms. Thus far
My employer has developed a utility that will run a stored procedure line by
My employer uses Dotfuscator on all our .Net production software. Because of this, we
My employer has asked me to create some web pages with various charts -
My employer currently has most of its access to the database through C# sqlDataAdapters
How do I tell my new employer that I can’t use the computer they gave me?
I use Visual Studio C++ 97 for a project for my a employer. Yesterday
Background: my employer has a database powered by a really old version of MySQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.