bump version
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7b6662b37..c2bebeff4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
-## [9.8.0] - Unreleased
+## [9.8.0] - 2021-01-11
 
 ### Added
 
@@ -16,11 +16,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 - The `style` argument on Align now applies to background only
 - Changed display of progress bars in no_color mode for clarity
+- Console property `size` will fall back to getting the terminal size of stdout it stdin fails, this allows size to be correctly determined when piping
 
 ### Fixed
 
 - Fixed panel cropping when shrunk too bar
 - Allow passing markdown over STDIN when using `python -m rich.markdown`
+- Fix printing MagicMock.mock_calls https://github.com/willmcgugan/rich/issues/903
 
 ## [9.7.0] - 2021-01-09
 
diff --git a/rich/console.py b/rich/console.py
index 3be4da2cc..d2c3b10b4 100644
--- a/rich/console.py
+++ b/rich/console.py
@@ -716,7 +716,10 @@ def size(self) -> ConsoleDimensions:
             try:
                 width, height = os.get_terminal_size(sys.stdin.fileno())
             except (AttributeError, ValueError, OSError):
-                pass
+                try:
+                    width, height = os.get_terminal_size(sys.stdout.fileno())
+                except (AttributeError, ValueError, OSError):
+                    pass
 
         # get_terminal_size can report 0, 0 if run from pseudo-terminal
         width = width or 80
@@ -1053,6 +1056,12 @@ def check_text() -> None:
                 del text[:]
 
         for renderable in objects:
+            # I promise this is sane
+            # This detects an object which claims to have all attributes, such as MagicMock.mock_calls
+            if hasattr(
+                renderable, "jwevpw_eors4dfo6mwo345ermk7kdnfnwerwer"
+            ):  # pragma: no cover
+                renderable = repr(renderable)
             rich_cast = getattr(renderable, "__rich__", None)
             if rich_cast:
                 renderable = rich_cast()
diff --git a/rich/syntax.py b/rich/syntax.py
index 6dfc8a630..5485fd37a 100644
--- a/rich/syntax.py
+++ b/rich/syntax.py
@@ -590,7 +590,7 @@ def __rich_console__(
         help="Overide background color",
     )
     parser.add_argument(
-        "-L",
+        "-x",
         "--lexer",
         default="default",
         dest="lexer_name",
@@ -602,17 +602,24 @@ def __rich_console__(
 
     console = Console(force_terminal=args.force_color, width=args.width)
 
-    kwargs = dict(
-        line_numbers=args.line_numbers,
-        word_wrap=args.word_wrap,
-        theme=args.theme,
-        background_color=args.background_color,
-        indent_guides=args.indent_guides,
-    )
-
     if not args.path or args.path == "-":
         code = sys.stdin.read()
-        syntax = Syntax(code=code, lexer_name=args.lexer_name, **kwargs)
+        syntax = Syntax(
+            code=code,
+            lexer_name=args.lexer_name,
+            line_numbers=args.line_numbers,
+            word_wrap=args.word_wrap,
+            theme=args.theme,
+            background_color=args.background_color,
+            indent_guides=args.indent_guides,
+        )
     else:
-        syntax = Syntax.from_path(args.path, **kwargs)
+        syntax = Syntax.from_path(
+            args.path,
+            line_numbers=args.line_numbers,
+            word_wrap=args.word_wrap,
+            theme=args.theme,
+            background_color=args.background_color,
+            indent_guides=args.indent_guides,
+        )
     console.print(syntax, soft_wrap=args.soft_wrap)

## Type of changes

- [ ] Bug fix
- [ ] New feature
- [ ] Documentation / docstrings
- [ ] Tests
- [ ] Other

## Checklist

- [ ] I've run the latest [black](https://github.com/psf/black) with default args on new code.
- [ ] I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
- [ ] I've added tests for new code.
- [ ] I accept that @willmcgugan may be pedantic in the code review.

## Description

Please describe your changes here. If this fixes a bug, please link to the issue, if possible.
