flask-diamond icon indicating copy to clipboard operation
flask-diamond copied to clipboard

Werkzeug 0.11.11 not compatible with windows + python 3.6

Open cleemesser opened this issue 8 years ago • 3 comments
trafficstars

It appears that python 3.6 eliminates socketserver.ForkingMixIn on platforms like windows which do not support the forking model. There is a fix for this in version 0.11.15. I am using werkzeug version 0.12.2 and it seems ok with python 3.6.1 on windows 10 pro.

see: https://github.com/pallets/werkzeug/pull/999

cleemesser avatar Jun 07 '17 04:06 cleemesser

Thanks for this report. Can you run make test with werkzeug 0.12.2 on Win 10 and confirm that all tests pass? I would like to update this requirement and push that globally.

iandennismiller avatar Nov 02 '17 21:11 iandennismiller

Unfortunately, I have not succeeded in running these tests. It is tough to get the test harness working on windows (anaconda distribution). mr.bob does not install due to some character encoding problem.

I have tried running each line of the Makefile by hand: I can create skeletons using cygwin + python 2.7 + pip2 install mr.bob. But then I have trouble getting the test app to pick up the correct configuration. :-(

I get::

====================================================================== ERROR: test_create_app (flask_diamond.tests.test_app.BasicTestCase)

Traceback (most recent call last): File "C:\Users\chris\code\flask-diamond\flask_diamond\tests\test_app.py", line 43, in test_create_app app = create_app() File "C:\Users\chris\code\flask-diamond\flask_diamond\tests\test_app.py", line 16, in create_app diamond.facet("configuration") File "C:\Users\chris\code\flask-diamond\flask_diamond_init_.py", line 61, in facet result = method_to_call(self, *args, **kwargs) File "C:\Users\chris\code\flask-diamond\flask_diamond\facets\configuration.py", line 14, in init_configuration self.app.config.from_envvar('SETTINGS') File "c:\users\chris\anaconda3\envs\flaskdia\lib\site-packages\flask\config.py", line 109, in from_envvar return self.from_pyfile(rv, silent=silent) File "c:\users\chris\anaconda3\envs\flaskdia\lib\site-packages\flask\config.py", line 129, in from_pyfile with open(filename) as config_file: FileNotFoundError: [Errno 2] Unable to load configuration file (No such file or directory): 'C:\Users\chris\code\flask-diamond\flask_diamond\flask_diamond\tests\testing.conf' -------------------- >> begin captured logging << -------------------- passlib.utils.compat: DEBUG: loaded lazy attr 'SafeConfigParser': <class 'configparser.ConfigParser'> passlib.utils.compat: DEBUG: loaded lazy attr 'NativeStringIO': <class '_io.StringIO'> passlib.utils.compat: DEBUG: loaded lazy attr 'BytesIO': <class '_io.BytesIO'> --------------------- >> end captured logging << ---------------------


Ran 1 test in 0.399s

cleemesser avatar Jan 01 '18 21:01 cleemesser

Thanks for updating this ticket!

I'm looking at the error log you posted and I think we can debug this. Where it says

FileNotFoundError: [Errno 2] Unable to load configuration file (No such file or directory):

'C:\Users\chris\code\flask-diamond\flask_diamond\flask_diamond\tests\testing.conf'

it means somehow, your SETTINGS environment variable isn't pointing to the right config file. It could be that the Makefile is setting this incorrectly. If you look at the test: or test-win Makefile targets, I am curious to know if the configuration file looks correct.

A configuration file is generated for each project by the scaffolding process - and I would expect the test harness to point towards a config file called etc/conf/testing.conf - but I could be misremembering.

iandennismiller avatar Jan 09 '18 19:01 iandennismiller