Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix pserve --reload on Py3 (the simple solution) #1245

Merged
merged 1 commit into from

2 participants

@ztane

This is the simpler fix for pserve --reload (so please pull either #1244 or this).

Basically with some project setups the reloader thread is guaranteed to crash on Python 3 as the main thread is importing modules in the other thread.

@ztane ztane Fix pserve --reload on Py3 (the simple solution)
This is the simpler fix for `pserve --reload` (so please pull either Pylons#1244 or this).

Basically with some project setups the reloader thread is guaranteed to crash on Python 3 as the main thread is importing modules in the other thread.
606a54c
@tseaver tseaver merged commit 8a18d87 into Pylons:master
@tseaver
Owner

Thank you!

@tseaver tseaver referenced this pull request from a commit
@tseaver tseaver Changelog for PR #1245. a0e97ba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 16, 2014
  1. @ztane

    Fix pserve --reload on Py3 (the simple solution)

    ztane authored
    This is the simpler fix for `pserve --reload` (so please pull either Pylons#1244 or this).
    
    Basically with some project setups the reloader thread is guaranteed to crash on Python 3 as the main thread is importing modules in the other thread.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  pyramid/scripts/pserve.py
View
2  pyramid/scripts/pserve.py
@@ -811,7 +811,7 @@ def check_reload(self):
print(
"Error calling reloader callback %r:" % file_callback)
traceback.print_exc()
- for module in sys.modules.values():
+ for module in list(sys.modules.values()):
try:
filename = module.__file__
except (AttributeError, ImportError):
Something went wrong with that request. Please try again.