jnmclarty / pyenvdiff-lib

Python environment comparison tool

Home Page:http://pyenvdiff.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python 3.6 Issues with -m flag

rfoliva opened this issue · comments

  • PyEnvDiff version: 0.1.0
  • Python version: 3.6.0
  • Operating System: Darwin Rick-Laptop-SOHO-LAN 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64

Description

While testing the tool with Python 3.6, I noticed this message popping up, although it seems to work fine after that.

I did some brief search around this last night and it might be related to known issue around the use of -m when executing python modules. Apparently, this was introduced at some point 3.5.x line.

What I Did

(test3.6) Rick-Laptop-SOHO-LAN:test3.6 rfoliva$ python -m pyenvdiff.info test.yaml
/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py:125: RuntimeWarning: 'pyenvdiff.info' found in sys.modules after import of package 'pyenvdiff', but prior to execution of 'pyenvdiff.info'; this may result in unpredictable behaviour
  warn(RuntimeWarning(msg))

Thanks for the bug report.

Turns out, there was a regression in a micro release of python in an edge case that hit this use case.