Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Release of bpython 0.14

45 views
Skip to first unread message

Sebastian Ramacher

unread,
Feb 17, 2015, 5:10:13 PM2/17/15
to bpy...@googlegroups.com
Hi all,

I'm very happy to announce the first release of the 0.14 series. After
putting a lot of work into the curtsies frontend, we have decided to
switch the default to point to curtsies. The old frontend is still
available, but it won't see any new feature development. For the full
list of changes, please see the changelog at the end of the mail.


You can fetch the new release from our releases index as usual at:

http://bpython-interpreter.org/releases/

or you can use the PyPI where the package has been uploaded.

If there are any bugs do not hesitate to come tell us on IRC at #bpython
on the Freenode network or through our bugtracker at:

https://github.com/bpython/bpython/issues


0.14
----

This release contains major changes to the frontends:

* curtsies is the new default frontend.
* The old curses frontend is available as bpython-curses.
* The GTK+ frontend has been removed.

New features:

* #194: Syntax-highlighted tracebacks. Thanks to Miriam Lauter.
* #234: Copy to system clipboard.
* #285: Re-evaluate session and reimport modules.
* #313: Warn when undo may take cause extended delay, and prompt to undo
  multiple lines.
* #322: Watch imported modules for changes and re-evaluate on changes.
* #328: bpython history not re-evaluated to edit a previous line of a multiline
  statement.
* #334: readline command Meta-. for yank last argument. Thanks to Susan
  Steinman and Steph Samson.
* #338: bpython help with F1.
* #354: Edit config file from within bpython.
* #382: Partial support for pasting in text with blank lines.
* #410: Startup banner that shows Python and bpython version
* #426: Experimental mutliline autocompletion.
* fish style last history completion with Arrow Right. Thanks to Nicholas
  Sweeting.
* fish style automatic reverse history search with Arrow Up.
  Thanks to Nicholas Sweeting.
* Incremental forward and reverse search.
* All readline keys which kill/cut text correctly copy text for paste
  with Ctrl-y or Meta-y.
* French translation.
* Removal links for bpaste pastebins are now displayed.
* More informative error messages when source cannot be found for an object.
  Thanks to Liudmila Nikolaeva and Miriam Lauter.
* Message displayed if history in scrollback buffer is inconsistent with
  output from last re-evaluation of bpython session. Thanks to Susan Steinman.
* Adjust logging level with -L or -LL.
* String literal attribute completion.

Fixes:

* #254: Use ASCII characters if Unicode box characters are not supported by the
  terminal.
* #284: __file__ is in scope after module run with bpython -i. Thanks to
  Lindsey Raymond.
* #347: Fixed crash on unsafe autocompletion.
* #349: Fixed writing newlines to stderr.
* #363: Fixed banner crashing bpython-urwid. Thanks to Luca Barbato.
* #366, #367: Fixed help() support in curtsies.
* #369: Interactive sessions inherit compiler directives from files run with -i
  interactive flag.
* #370, #401, #440, #448, #468, #472: Fixed various display issues in curtsies.
* #391: Fixed crash when using Meta-backspace. Thanks to Tony Wang.
* #438, #450: bpython-curtsies startup behavior fixed. Errors
  during startup are reported instead of crashing.
* #447: Fixed behavior of duplicate keybindings. Thanks to Keyan Pishdadian.
* #458: Fixed dictionary key completion crash in Python 2.6. Thanks to Mary
  Mokuolu.
* Documentation fixes from Lindsey Raymond.
* Fixed filename completion.
* Fixed various Unicode issues in curtsies.
* Fixed and re-enabled dictionary key completion in curtsies.

The commandline option --type / -t has been renamed to --paste / -p.

Python 2.6, 2.7, 3.3 and newer are supported. Support for 2.5 has been dropped.
Furthermore, it is no longer necessary to run 2to3 on the source code.

This release brings a lot more code coverage, a new contributing guide,
and most of the code now conforms to PEP-8.

Changes to dependencies:

* greenlet and curtsies are no longer optional.
* six is a new dependency.
* jedi is a new optional dependency required for multiline completion.
* watchdog is a new optional dependency required for watching changes in
  imported modules.


Cheers

Andrey G. Grozin

unread,
Feb 18, 2015, 11:23:45 AM2/18/15
to bpy...@googlegroups.com
Hello,

after upgrading to 0.14 I get

grozin@dns ~ $ bpython
bpython version 0.14 on top of Python 3.3.5 /usr/bin/python3.3

Traceback (most recent call last):
File "/usr/lib64/python3.3/code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File
"/usr/lib64/python3.3/site-packages/bpython/curtsiesfrontend/repl.py",
line 427, in new_import
fromlist=fromlist, level=level)
File
"/usr/lib64/python3.3/site-packages/bpython/curtsiesfrontend/_internal.py",
line 25, in <module>
import bpython._internal
File
"/usr/lib64/python3.3/site-packages/bpython/curtsiesfrontend/repl.py",
line 427, in new_import
fromlist=fromlist, level=level)
File
"/usr/lib64/python3.3/site-packages/bpython/curtsiesfrontend/repl.py",
line 427, in new_import
fromlist=fromlist, level=level)
ValueError: level must be >= 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python-exec/python3.3/bpython", line 9, in <module>
load_entry_point('bpython==0.14', 'console_scripts', 'bpython')()
File "/usr/lib64/python3.3/site-packages/bpython/curtsies.py", line 79,
in main
interactive=(not exec_args))
File "/usr/lib64/python3.3/site-packages/bpython/curtsies.py", line 155,
in mainloop
'from bpython.curtsiesfrontend._internal '
File "/usr/lib64/python3.3/site-packages/bpython/repl.py", line 114, in
runsource
filename, symbol)
File "/usr/lib64/python3.3/code.py", line 74, in runsource
self.runcode(code)
File "/usr/lib64/python3.3/code.py", line 94, in runcode
self.showtraceback()
File "/usr/lib64/python3.3/site-packages/bpython/repl.py", line 166, in
showtraceback
self.writetb(l)
File
"/usr/lib64/python3.3/site-packages/bpython/curtsiesfrontend/interpreter.py",
line 94, in writetb
self.format(tbtext, lexer)
File
"/usr/lib64/python3.3/site-packages/bpython/curtsiesfrontend/interpreter.py",
line 98, in format
traceback_informative_formatter = BPythonFormatter(default_colors)
File
"/usr/lib64/python3.3/site-packages/bpython/curtsiesfrontend/interpreter.py",
line 54, in __init__
Formatter.__init__(self, **options)
File "/usr/lib64/python3.3/site-packages/pygments/formatter.py", line
67, in __init__
self.style = _lookup_style(options.get('style', 'default'))
File "/usr/lib64/python3.3/site-packages/pygments/formatter.py", line
22, in _lookup_style
return get_style_by_name(style)
File "/usr/lib64/python3.3/site-packages/pygments/styles/__init__.py",
line 58, in get_style_by_name
mod = __import__('pygments.styles.' + mod, None, None, [cls])
File
"/usr/lib64/python3.3/site-packages/bpython/curtsiesfrontend/repl.py",
line 427, in new_import
fromlist=fromlist, level=level)
ValueError: level must be >= 0
grozin@dns ~ $

Any ideas?

Andrey

Sebastian Ramacher

unread,
Feb 18, 2015, 12:11:23 PM2/18/15
to bpy...@googlegroups.com

Andrey G. Grozin

unread,
Feb 18, 2015, 1:24:41 PM2/18/15
to bpy...@googlegroups.com
On Wed, 18 Feb 2015, Sebastian Ramacher wrote:
> Could you test if https://github.com/bpython/bpython/commit/43e70389badc48be2986a606f8f7b3f2aa29d59b fixes the problem?
Yes, thank you very much

Andrey

Sebastian Ramacher

unread,
Feb 18, 2015, 1:30:33 PM2/18/15
to bpy...@googlegroups.com
Great. The fix is staged for 0.14-bugfix: https://github.com/bpython/bpython/commits/0.14-bugfix.

Cheers

Mike

unread,
Feb 18, 2015, 1:45:50 PM2/18/15
to bpy...@googlegroups.com
Nice work, congrats.

I had a minor problem.  When I upgraded my bpython with pip on ubuntu trusty, it did not install the necessary package "blessings."  This resulted in a stack trace on run of bpython, "blessings not found".

This might be a missing dependency of curtsies, not sure, but it needs to be added  somewhere to the list.

I installed the package and it looks to be working well.  Thanks again.

Cheers,

Sebastian Ramacher

unread,
Feb 20, 2015, 4:06:09 AM2/20/15
to bpy...@googlegroups.com
--
Sebastian Ramacher
signature.asc

Sebastian Ramacher

unread,
Mar 2, 2015, 1:55:24 PM3/2/15
to bpy...@googlegroups.com
On Wednesday, February 18, 2015 at 7:45:50 PM UTC+1, Mike wrote:
> I had a minor problem. When I upgraded my bpython with pip on ubuntu trusty, it did not install the necessary package "blessings." This resulted in a stack trace on run of bpython, "blessings not found".

That's weird. curtsies has a dependency on blessings. Do you happen to have the log available?

Cheers

Mike

unread,
Mar 3, 2015, 1:14:47 PM3/3/15
to bpy...@googlegroups.com
Yeah it is weird.  But thanks for the idea of looking to the log.  I found an intermittent network problem in it:

  * https://pypi.python.org/simple/blessings/
  Getting page https://pypi.python.org/simple/blessings/
  Could not fetch URL https://pypi.python.org/simple/blessings/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/blessings/ (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)
  Will skip URL https://pypi.python.org/simple/blessings/ when looking for download links for blessings
  Could not find any downloads that satisfy the requirement blessings
  ...
  DistributionNotFound: No distributions at all found for blessings

Weird that the other packages worked. 

Thanks,
Mike


On Monday, March 2, 2015 at 10:55:24 AM UTC-8, Sebastian Ramacher wrote:
Reply all
Reply to author
Forward
0 new messages