BUG?: "bpython3 -i /pathTo/file.py" (v0.12 & v0.13): Hundreds of deprecation warnings emitted as soon a anything is typed at the ">>>" prompt ...

16 views
Skip to first unread message

Noelle Milton Vega

unread,
Jul 1, 2014, 1:56:50 PM7/1/14
to bpy...@googlegroups.com
Hello Friends:

On bpython3 version 0.12 and 0.13, when I launch it with the "-i" option to import modules first, there is a problem.
Here is a running, annotated dialogue of the issue.

prompt$ cat /path/to/bpython-PythonStartup.py
import sklearn.<anyModule>  # Any module from the SciKit-Learn package triggers this issue. Maybe other packages, too.
prompt$


prompt$ # No issue with python2
prompt$ bpython -i /path/to/bpython-PythonStartup.py
>>> <cr>
>>> <cr>
>>> quit()
prompt$


prompt$ # Issue with python3: As soon as I press anything at the ">>>" prompt, I get hundreds of the following two warnings repeated.
prompt$ bpython3 -i /path/to/bpython-PythonStartup.py
>>> <cr>
/home/user/.local/lib/python3.3/site-packages/bpython/importcompletion.py:122:
  DeprecationWarning: imp.get_suffixes() is deprecated; use the constants defined on importlib.machinery instead
  if not any(name.endswith(suffix[0]) for suffix in imp.get_suffixes()):

/home/user/.local/lib/python3.3/site-packages/bpython/importcompletion.py:130:
  DeprecationWarning: imp.get_suffixes() is deprecated; use the constants defined on importlib.machinery instead
  for suffix in imp.get_suffixes():


[ ... both lines are repeated hundreds of times, then stops ... ]
>>>
>>> quit()
[ ... And again here: Upon exit, as the error buffer is emptied, both lines are repeated hundreds of times, then stops ... ]
prompt$


This may not be exclusive to the scikit learn (sklearn) package modules. I just happened be using them when I ran into this.

Any ideas?
Thank you in advance! =:)

NMV

Bob Farrell

unread,
Jul 2, 2014, 4:41:27 AM7/2/14
to bpy...@googlegroups.com
Oh dear. :-(

Looks like we need to write some python3-specific code.

Thanks for the report !


--
You received this message because you are subscribed to the Google Groups "bpython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bpython+u...@googlegroups.com.
To post to this group, send email to bpy...@googlegroups.com.
Visit this group at http://groups.google.com/group/bpython.
For more options, visit https://groups.google.com/d/optout.

Thomas Ballinger

unread,
Jul 3, 2014, 11:09:39 AM7/3/14
to bpy...@googlegroups.com
I've just created a bug - hopefully we can get this out in a bugfix release soon.

Noelle Milton Vega

unread,
Jul 6, 2014, 1:47:09 PM7/6/14
to bpy...@googlegroups.com
Thank you Bob & Thomas for your work and for the the replies (here and by email).

Thomas, I tried the interim version you referred me to by email and, indeed, it appears to resolve
the issue. :)

Side fun fact: Despite having complete IDEs, I always find learning and doing in bpython2/3
super productive, and so I always have both open. Thanks again for your work!

NMV
Reply all
Reply to author
Forward
0 new messages