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

  • Home
  • SEARCH
  • 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 8772253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:59:32+00:00 2026-06-13T17:59:32+00:00

Seems like with ever increasing frequency, I am bit by pyc files running outdated

  • 0

Seems like with ever increasing frequency, I am bit by pyc files running outdated code.

This has led to deployment scripts scrubbing *.pyc each time, otherwise deployments don’t seem to take effect.

I am wondering, what benefit (if any) is there to pyc files in a long-running WSGI application? So far as I know, the only benefit is improved startup time, but I can’t imagine it’s that significant–and even if it is, each time new code is deployed you can’t really use the old pyc files anyways.

This makes me think that best practice would be to run a WSGI application with the PYTHONDONTWRITEBYTECODE environment variable set.

Am I mistaken?

  • 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-06-13T17:59:33+00:00Added an answer on June 13, 2026 at 5:59 pm

    The best strategy for doing deployments is to write the deployed files into a new directory, and then use a symlink or similar to swap the codebase over in a single change. This has the side-benefit of also automatically clearing any old .pyc files.

    That way, you get the best of both worlds – clean and atomic deployments, and the caching of .pyc if your webapp needs to restart.

    If you keep the last N deployment directories around (naming them by date/time is useful), you also have an easy way to “roll back” to a previously deployed version of the code. If you have multiple server machines, you can also deploy to all of the machines but wait to switch them over until all of them have gotten the new code.

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

Sidebar

Related Questions

this seems like the opposite problem that anyone ever has. Basically, the videos (html5)
This seems like the dumbest question ever, but I can't seem to figure it
Heres my code: AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle(What's Your name?); alert.setMessage(Seems like you're
Seems like this should be obvious, but how do I send arrow key presses
Seems like this should be simple, but powershell is winning another battle with me.
Aligning things vertically seems like a dark art. This is a section of my
New to ASP.NET MVC 3. This seems like it should be a really simple
I'm getting an odd exception when running my java web project. It seems like
A lot of SQL code I've read, it seems like the developer assumes that
Sorry for what seems like a silly question: But I've never, ever worked with

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.