Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when attempting to use IPython debugger #2064

Closed
abalkin opened this issue Nov 15, 2016 · 11 comments

Comments

Projects
None yet
5 participants
@abalkin
Copy link

commented Nov 15, 2016

Problem description

From py.test help:

  --pdb                 start the interactive Python debugger on errors.
  --pdbcls=modulename:classname
                        start a custom interactive Python debugger on errors. For example:
                        --pdbcls=IPython.terminal.debugger:TerminalPdb

I created a simple test file containing just

def test_pdb():
    assert 0

And ran py.test as follows:

$ py.test  test_pdb.py \
--pdbcls=IPython.terminal.debugger:TerminalPdb \
--pdb

The result was an internal error with the following traceback:

Traceback (most recent call last):
  File ".../_pytest/main.py", line 96, in wrap_session
    session.exitstatus = doit(config, session) or 0
  ...
  File ".../IPython/terminal/debugger.py", line 38, in pt_init
    self.pt_cli = CommandLineInterface(self._pt_app, eventloop=self.shell._eventloop)
AttributeError: 'TerminalInteractiveShell' object has no attribute '_eventloop'

Installed packages

$ pip freeze
appnope==0.1.0
decorator==4.0.10
entrypoints==0.2.2
ipykernel==4.5.0
ipython==5.1.0
ipython-genutils==0.1.0
ipywidgets==5.2.2
Jinja2==2.8
jsonschema==2.5.1
jupyter==1.0.0
jupyter-client==4.4.0
jupyter-console==5.0.0
jupyter-core==4.2.0
MarkupSafe==0.23
mistune==0.7.3
nbconvert==4.2.0
nbformat==4.1.0
notebook==4.2.3
pexpect==4.2.1
pickleshare==0.7.4
pluggy==0.4.0
prompt-toolkit==1.0.9
ptyprocess==0.5.1
py==1.4.31
Pygments==2.1.3
pytest==3.0.4
pyzmq==16.0.1
qtconsole==4.2.1
simplegeneric==0.8.1
six==1.10.0
terminado==0.6
tornado==4.4.2
traitlets==4.3.1
wcwidth==0.1.7
widgetsnbextension==1.2.6

Pytest and operating system versions

I am using pytest 3.0.4 and

$ python
Python 3.5.2+ (3.5:da2ac103d326+, Nov 15 2016, 14:14:18)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin

Issue checklist

  • Include a detailed description of the bug or suggestion
  • pip list of the virtual environment you are using
  • pytest and operating system versions
  • Minimal example if possible
@nicoddemus

This comment has been minimized.

Copy link
Member

commented Nov 15, 2016

Thanks for the report!

@abalkin

This comment has been minimized.

Copy link
Author

commented Nov 16, 2016

A similar issue has been reported for django-nose. See django-nose/django-nose#274. It was resolved there with a recommendation to use the "no capture" mode. This worked for py.test as well:

$ py.test test_pdb.py --pdbcls=IPython.terminal.debugger:TerminalPdb --pdb -s
=================================================== test session starts ====================================================
platform darwin -- Python 3.5.2+, pytest-3.0.5.dev0, py-1.4.31, pluggy-0.4.0
rootdir: /Users/a/Work/abalkin/pytest, inifile: tox.ini
plugins: leaks-0.1.0
collected 1 items

test_pdb.py F
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    def test_pdb():
>       assert 0
E       assert 0

test_pdb.py:2: AssertionError
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> /Users/a/Work/abalkin/pytest/test_pdb.py(2)test_pdb()
      1 def test_pdb():
----> 2     assert 0

ipdb>

While this is a decent work-around, I still believe raising an AttributeError is not acceptable.

@segevfiner

This comment has been minimized.

Copy link
Contributor

commented Jul 29, 2017

Trying this with IPython 5.4.1 and pytest 3.1.3, I'm getting this beauty:

Traceback (most recent call last):
  File "Lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "Lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "Scripts\pytest.exe\__main__.py", line 9, in <module>
  File "lib\site-packages\_pytest\config.py", line 58, in main
    return config.hook.pytest_cmdline_main(config=config)
  File "lib\site-packages\_pytest\vendored_packages\pluggy.py", line 745, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "lib\site-packages\_pytest\vendored_packages\pluggy.py", line 339, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "lib\site-packages\_pytest\vendored_packages\pluggy.py", line 334, in <lambda>
    _MultiCall(methods, kwargs, hook.spec_opts).execute()
  File "lib\site-packages\_pytest\vendored_packages\pluggy.py", line 614, in execute
    res = hook_impl.function(*args)
  File "lib\site-packages\_pytest\main.py", line 134, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "lib\site-packages\_pytest\main.py", line 117, in wrap_session
    config.notify_exception(excinfo, config.option)
  File "lib\site-packages\_pytest\config.py", line 947, in notify_exception
    excinfo=excinfo)
  File "lib\site-packages\_pytest\vendored_packages\pluggy.py", line 745, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "lib\site-packages\_pytest\vendored_packages\pluggy.py", line 339, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "lib\site-packages\_pytest\vendored_packages\pluggy.py", line 334, in <lambda>
    _MultiCall(methods, kwargs, hook.spec_opts).execute()
  File "lib\site-packages\_pytest\vendored_packages\pluggy.py", line 614, in execute
    res = hook_impl.function(*args)
  File "lib\site-packages\_pytest\debugging.py", line 79, in pytest_internalerror
    post_mortem(tb)
  File "lib\site-packages\_pytest\debugging.py", line 121, in post_mortem
    p = Pdb()
  File "lib\site-packages\IPython\terminal\debugger.py", line 26, in __init__
    self.pt_init()
  File "lib\site-packages\IPython\terminal\debugger.py", line 67, in pt_init
    style=self.shell.style
AttributeError: 'TerminalInteractiveShell' object has no attribute 'style'

This is caused by using TerminalPdb with simple_prompt which is auto detected here: IPython/terminal/interactiveshell.py:76-86 and here IPython/terminal/interactiveshell.py:113-115.

Obviously IPython's debuggers "API" is quite poor in this regard... ipdb handled this like this ipdb/__main__.py:25-35. Using simple_prompt is not desirable anyhow, it's really only meant for testing or for programs that wrap IPython.

From pytest's perspective we probably want to perform the import of the debugger class without IO redirection so that IPython correctly detects the tty (That assumes that the relevant internal IPython module gets imported when doing the import of the debugger class which smells like it can break really easily). We can also submit a patch to IPython to move that check to the class itself so it doesn't happen at import time, might be possible using this Traitlets - Dynamic default values. That way the check can happen when we first create the Pdb class with IO redirection off.

P.S. I guess there is no way to set a default pdbcls user-wide/system-wide... There is also no handling of calls to ipdb.set_trace (ipdb). All this nonsense can be handled by a plugin obviously, but the existing plugin is unmaintained and I don't think it supports IPython 5+ properly.

@jacebrowning

This comment has been minimized.

Copy link

commented Sep 16, 2018

I am also getting AttributeError: 'TerminalInteractiveShell' object has no attribute 'style'.

My workaround is to add --capture=no to my pytest.ini configuration file:

[pytest]

addopts =
    --pdbcls=IPython.terminal.debugger:TerminalPdb
    --capture=no
@blueyed

This comment has been minimized.

Copy link
Contributor

commented May 15, 2019

Please post full stack traces..
In #2064 (comment) it goes through post_mortem which might be not working correctly, as with e.g. using pdb.set_trace() directly.

There have been some fixes (e.g. for --trace), so is this still an issue?

@blueyed

This comment has been minimized.

Copy link
Contributor

commented May 15, 2019

520af9d might be related.

@blueyed

This comment has been minimized.

Copy link
Contributor

commented May 15, 2019

--pdbcls ipdb:__main__.debugger_cls works (see #5039 (comment)).

--pdbcls=IPython.terminal.debugger:TerminalPdb crashes:

    def test_foo():
        print(1)
>       __import__('pdb').set_trace()


t-pdb.py:7: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class '_pytest.debugging.pytestPDB'>, args = (), kwargs = {}
frame = <frame at 0x7f9209c6cb70, file '…/Vcs/pytest/t-pdb.py', line 7, code test_foo>

    @classmethod
    def set_trace(cls, *args, **kwargs):
        """Invoke debugging via ``Pdb.set_trace``, dropping any IO capturing."""
        frame = sys._getframe().f_back
>       _pdb = cls._init_pdb(*args, **kwargs)

args       = ()
cls        = <class '_pytest.debugging.pytestPDB'>
frame      = <frame at 0x7f9209c6cb70, file '…/Vcs/pytest/t-pdb.py', line 7, code test_foo>
kwargs     = {}

src/_pytest/debugging.py:225: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = <class '_pytest.debugging.pytestPDB'>, args = (), kwargs = {}
tw = <py._io.terminalwriter.TerminalWriter object at 0x7f9209bf8710>, header = None
capturing = 'global'

    @classmethod
    def _init_pdb(cls, *args, **kwargs):
        """ Initialize PDB debugging, dropping any IO capturing. """
        import _pytest.config
    
        if cls._pluginmanager is not None:
            …
    
>           _pdb = PytestPdbWrapper(**kwargs)

PytestPdbWrapper = <class '_pytest.debugging.pytestPDB._init_pdb.<locals>.PytestPdbWrapper'>
_pytest    = <module '_pytest' from '…/Vcs/pytest/src/_pytest/__init__.py'>
args       = ()
capman     = <CaptureManager _method='fd' _global_capturing=<MultiCapture out=<FDCapture 1 oldfd=5 _state='suspended'> err=<FDCaptu... in_=<FDCapture 0 oldfd=3 _state='suspended'> _state='suspended' _in_suspended=True> _current_item=<Function test_foo>>
capturing  = 'global'
cls        = <class '_pytest.debugging.pytestPDB'>
header     = None
kwargs     = {}
tw         = <py._io.terminalwriter.TerminalWriter object at 0x7f9209bf8710>

src/_pytest/debugging.py:215: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.debugging.pytestPDB._init_pdb.<locals>.PytestPdbWrapper object at 0x7f9209bf8860>
args = (), kwargs = {}

    def __init__(self, *args, **kwargs):
        Pdb.__init__(self, *args, **kwargs)
        self._ptcomp = None
>       self.pt_init()

args       = ()
kwargs     = {}
self       = <_pytest.debugging.pytestPDB._init_pdb.<locals>.PytestPdbWrapper object at 0x7f9209bf8860>

.venv/lib/python3.7/site-packages/IPython/terminal/debugger.py:25: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.debugging.pytestPDB._init_pdb.<locals>.PytestPdbWrapper object at 0x7f9209bf8860>

    def pt_init(self):
        def get_prompt_tokens():
            return [(Token.Prompt, self.prompt)]
    
        if self._ptcomp is None:
            compl = IPCompleter(shell=self.shell,
                                        namespace={},
                                        global_namespace={},
                                        parent=self.shell,
                                       )
            self._ptcomp = IPythonPTCompleter(compl)
    
        kb = KeyBindings()
        supports_suspend = Condition(lambda: hasattr(signal, 'SIGTSTP'))
        kb.add('c-z', filter=supports_suspend)(suspend_to_bg)
    
        if self.shell.display_completions == 'readlinelike':
            kb.add('tab', filter=(has_focus(DEFAULT_BUFFER)
                                  & ~has_selection
                                  & vi_insert_mode | emacs_insert_mode
                                  & ~cursor_in_leading_ws
                              ))(display_completions_like_readline)
    
        self.pt_app = PromptSession(
                            message=(lambda: PygmentsTokens(get_prompt_tokens())),
                            editing_mode=getattr(EditingMode, self.shell.editing_mode.upper()),
                            key_bindings=kb,
                            history=self.shell.debugger_history,
                            completer=self._ptcomp,
                            enable_history_search=True,
                            mouse_support=self.shell.mouse_support,
                            complete_style=self.shell.pt_complete_style,
>                           style=self.shell.style,
                            inputhook=self.shell.inputhook,
                            color_depth=self.shell.color_depth,
        )
E       AttributeError: 'TerminalInteractiveShell' object has no attribute 'style'

compl      = <IPython.core.completer.IPCompleter object at 0x7f9209396e10>
get_prompt_tokens = <function TerminalPdb.pt_init.<locals>.get_prompt_tokens at 0x7f920938f378>
kb         = <prompt_toolkit.key_binding.key_bindings.KeyBindings object at 0x7f9209396ef0>
self       = <_pytest.debugging.pytestPDB._init_pdb.<locals>.PytestPdbWrapper object at 0x7f9209bf8860>
supports_suspend = Condition(<function TerminalPdb.pt_init.<locals>.<lambda> at 0x7f920938f2f0>)

.venv/lib/python3.7/site-packages/IPython/terminal/debugger.py:59: AttributeError

Just use the former I guess.. :)

@blueyed blueyed closed this May 15, 2019

@blueyed

This comment has been minimized.

Copy link
Contributor

commented May 15, 2019

Actually at least the help should be fixed then - wasn't aware that it's from there.
And then also investigate if it worked before, what broke it, and have a test for it.

@blueyed

This comment has been minimized.

Copy link
Contributor

commented May 23, 2019

Created ipython/ipython#11745.

@segevfiner
Also thought about disabling capturing temporarily, or importing it only later altogether.

@blueyed

This comment has been minimized.

Copy link
Contributor

commented May 23, 2019

I have a plan for this, but it requires #4908 to get merged first.

blueyed added a commit to blueyed/pytest that referenced this issue May 24, 2019

blueyed added a commit to blueyed/pytest that referenced this issue May 24, 2019

@blueyed

This comment has been minimized.

Copy link
Contributor

commented May 24, 2019

#5307 should fix this, if you want to give it a try / review it.

blueyed added a commit to blueyed/pytest that referenced this issue May 26, 2019

Sup3rGeo added a commit to Sup3rGeo/pytest that referenced this issue May 30, 2019

bors bot added a commit to rehandalal/therapist that referenced this issue Jun 2, 2019

Merge #81
81: Update pytest to 4.6.1 r=rehandalal a=pyup-bot


This PR updates [pytest](https://pypi.org/project/pytest) from **4.5.0** to **4.6.1**.



<details>
  <summary>Changelog</summary>
  
  
   ### 4.6.0
   ```
   =========================

Important
---------

The ``4.6.X`` series will be the last series to support **Python 2 and Python 3.4**.

For more details, see our `Python 2.7 and 3.4 support plan &lt;https://docs.pytest.org/en/latest/py27-py34-deprecation.html&gt;`__.


Features
--------

- `4559 &lt;https://github.com/pytest-dev/pytest/issues/4559&gt;`_: Added the ``junit_log_passing_tests`` ini value which can be used to enable or disable logging of passing test output in the Junit XML file.


- `4956 &lt;https://github.com/pytest-dev/pytest/issues/4956&gt;`_: pytester&#39;s ``testdir.spawn`` uses ``tmpdir`` as HOME/USERPROFILE directory.


- `5062 &lt;https://github.com/pytest-dev/pytest/issues/5062&gt;`_: Unroll calls to ``all`` to full for-loops with assertion rewriting for better failure messages, especially when using Generator Expressions.


- `5063 &lt;https://github.com/pytest-dev/pytest/issues/5063&gt;`_: Switch from ``pkg_resources`` to ``importlib-metadata`` for entrypoint detection for improved performance and import time.


- `5091 &lt;https://github.com/pytest-dev/pytest/issues/5091&gt;`_: The output for ini options in ``--help`` has been improved.


- `5269 &lt;https://github.com/pytest-dev/pytest/issues/5269&gt;`_: ``pytest.importorskip`` includes the ``ImportError`` now in the default ``reason``.


- `5311 &lt;https://github.com/pytest-dev/pytest/issues/5311&gt;`_: Captured logs that are output for each failing test are formatted using the
  ColoredLevelFormatter.


- `5312 &lt;https://github.com/pytest-dev/pytest/issues/5312&gt;`_: Improved formatting of multiline log messages in Python 3.



Bug Fixes
---------

- `2064 &lt;https://github.com/pytest-dev/pytest/issues/2064&gt;`_: The debugging plugin imports the wrapped ``Pdb`` class (``--pdbcls``) on-demand now.


- `4908 &lt;https://github.com/pytest-dev/pytest/issues/4908&gt;`_: The ``pytest_enter_pdb`` hook gets called with post-mortem (``--pdb``).


- `5036 &lt;https://github.com/pytest-dev/pytest/issues/5036&gt;`_: Fix issue where fixtures dependent on other parametrized fixtures would be erroneously parametrized.


- `5256 &lt;https://github.com/pytest-dev/pytest/issues/5256&gt;`_: Handle internal error due to a lone surrogate unicode character not being representable in Jython.


- `5257 &lt;https://github.com/pytest-dev/pytest/issues/5257&gt;`_: Ensure that ``sys.stdout.mode`` does not include ``&#39;b&#39;`` as it is a text stream.


- `5278 &lt;https://github.com/pytest-dev/pytest/issues/5278&gt;`_: Pytest&#39;s internal python plugin can be disabled using ``-p no:python`` again.


- `5286 &lt;https://github.com/pytest-dev/pytest/issues/5286&gt;`_: Fix issue with ``disable_test_id_escaping_and_forfeit_all_rights_to_community_support`` option not working when using a list of test IDs in parametrized tests.


- `5330 &lt;https://github.com/pytest-dev/pytest/issues/5330&gt;`_: Show the test module being collected when emitting ``PytestCollectionWarning`` messages for
  test classes with ``__init__`` and ``__new__`` methods to make it easier to pin down the problem.


- `5333 &lt;https://github.com/pytest-dev/pytest/issues/5333&gt;`_: Fix regression in 4.5.0 with ``--lf`` not re-running all tests with known failures from non-selected tests.



Improved Documentation
----------------------

- `5250 &lt;https://github.com/pytest-dev/pytest/issues/5250&gt;`_: Expand docs on use of ``setenv`` and ``delenv`` with ``monkeypatch``.
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/pytest
  - Changelog: https://pyup.io/changelogs/pytest/
  - Homepage: https://docs.pytest.org/en/latest/
</details>



Co-authored-by: pyup-bot <github-bot@pyup.io>
Co-authored-by: R&D <rehandalal@users.noreply.github.com>

bors bot added a commit to mozilla/normandy that referenced this issue Jun 3, 2019

Merge #1896
1896: Scheduled weekly dependency update for week 22 r=rehandalal a=pyup-bot






### Update [botocore](https://pypi.org/project/botocore) from **1.12.156** to **1.12.159**.


<details>
  <summary>Changelog</summary>
  
  
   ### 1.12.159
   ```
   ========

* api-change:``iotevents-data``: Update iotevents-data client to latest version
* api-change:``iotevents``: Update iotevents client to latest version
* api-change:``pinpoint-email``: Update pinpoint-email client to latest version
* api-change:``iotanalytics``: Update iotanalytics client to latest version
* api-change:``codecommit``: Update codecommit client to latest version
* api-change:``rds-data``: Update rds-data client to latest version
* api-change:``rds``: Update rds client to latest version
* api-change:``servicecatalog``: Update servicecatalog client to latest version
* api-change:``kafka``: Update kafka client to latest version
   ```
   
  
  
   ### 1.12.158
   ```
   ========

* api-change:``ssm``: Update ssm client to latest version
* api-change:``securityhub``: Update securityhub client to latest version
* api-change:``iotthingsgraph``: Update iotthingsgraph client to latest version
* api-change:``dlm``: Update dlm client to latest version
* api-change:``rds``: Update rds client to latest version
* api-change:``ec2``: Update ec2 client to latest version
   ```
   
  
  
   ### 1.12.157
   ```
   ========

* api-change:``groundstation``: Update groundstation client to latest version
* api-change:``transcribe``: Update transcribe client to latest version
* api-change:``chime``: Update chime client to latest version
* api-change:``rds``: Update rds client to latest version
* api-change:``waf``: Update waf client to latest version
* api-change:``pinpoint-email``: Update pinpoint-email client to latest version
* api-change:``robomaker``: Update robomaker client to latest version
* api-change:``sts``: Update sts client to latest version
* api-change:``storagegateway``: Update storagegateway client to latest version
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/botocore
  - Changelog: https://pyup.io/changelogs/botocore/
  - Repo: https://github.com/boto/botocore
</details>





### Update [cryptography](https://pypi.org/project/cryptography) from **2.6.1** to **2.7**.


<details>
  <summary>Changelog</summary>
  
  
   ### 2.7
   ```
   ~~~~~~~~~~~~~~~~

* **BACKWARDS INCOMPATIBLE:** We no longer distribute 32-bit ``manylinux1``
  wheels. Continuing to produce them was a maintenance burden.
* **BACKWARDS INCOMPATIBLE:** Removed the
  ``cryptography.hazmat.primitives.mac.MACContext`` interface. The ``CMAC`` and
  ``HMAC`` APIs have not changed, but they are no longer registered as
  ``MACContext`` instances.
* Removed support for running our tests with ``setup.py test``. Users
  interested in running our tests can continue to follow the directions in our
  :doc:`development documentation&lt;/development/getting-started&gt;`.
* Add support for :class:`~cryptography.hazmat.primitives.poly1305.Poly1305`
  when using OpenSSL 1.1.1 or newer.
* Support serialization with ``Encoding.OpenSSH`` and ``PublicFormat.OpenSSH``
  in
  :meth:`Ed25519PublicKey.public_bytes
  &lt;cryptography.hazmat.primitives.asymmetric.ed25519.Ed25519PublicKey.public_bytes&gt;`
  .
* Correctly allow passing a ``SubjectKeyIdentifier`` to
  :meth:`~cryptography.x509.AuthorityKeyIdentifier.from_issuer_subject_key_identifier`
  and deprecate passing an ``Extension`` object. The documentation always
  required ``SubjectKeyIdentifier`` but the implementation previously
  required an ``Extension``.

.. _v2-6-1:
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/cryptography
  - Changelog: https://pyup.io/changelogs/cryptography/
  - Repo: https://github.com/pyca/cryptography
</details>





### Update [google-api-core](https://pypi.org/project/google-api-core) from **1.11.0** to **1.11.1**.


*The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)*

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/google-api-core
  - Repo: https://github.com/GoogleCloudPlatform/google-cloud-python
</details>





### Update [google-cloud-core](https://pypi.org/project/google-cloud-core) from **1.0.0** to **1.0.1**.


*The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)*

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/google-cloud-core
  - Repo: https://github.com/GoogleCloudPlatform/google-cloud-python
</details>





### Update [pluggy](https://pypi.org/project/pluggy) from **0.11.0** to **0.12.0**.


<details>
  <summary>Changelog</summary>
  
  
   ### 0.12.0
   ```
   ==========================

Features
--------

- `215 &lt;https://github.com/pytest-dev/pluggy/issues/215&gt;`_: Switch from ``pkg_resources`` to ``importlib-metadata`` for entrypoint detection for improved performance and import time.  This time with ``.egg`` support.
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/pluggy
  - Changelog: https://pyup.io/changelogs/pluggy/
  - Repo: https://github.com/pytest-dev/pluggy
</details>





### Update [protobuf](https://pypi.org/project/protobuf) from **3.7.1** to **3.8.0**.


*The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)*

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/protobuf
  - Changelog: https://pyup.io/changelogs/protobuf/
  - Repo: https://github.com/protocolbuffers/protobuf/releases
  - Homepage: https://developers.google.com/protocol-buffers/
</details>





### Update [Pygments](https://pypi.org/project/Pygments) from **2.4.1** to **2.4.2**.


*The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)*

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/pygments
  - Homepage: http://pygments.org/
</details>





### Update [boto3](https://pypi.org/project/boto3) from **1.9.156** to **1.9.159**.


<details>
  <summary>Changelog</summary>
  
  
   ### 1.9.159
   ```
   =======

* api-change:``iotevents-data``: [``botocore``] Update iotevents-data client to latest version
* api-change:``iotevents``: [``botocore``] Update iotevents client to latest version
* api-change:``pinpoint-email``: [``botocore``] Update pinpoint-email client to latest version
* api-change:``iotanalytics``: [``botocore``] Update iotanalytics client to latest version
* api-change:``codecommit``: [``botocore``] Update codecommit client to latest version
* api-change:``rds-data``: [``botocore``] Update rds-data client to latest version
* api-change:``rds``: [``botocore``] Update rds client to latest version
* api-change:``servicecatalog``: [``botocore``] Update servicecatalog client to latest version
* api-change:``kafka``: [``botocore``] Update kafka client to latest version
   ```
   
  
  
   ### 1.9.158
   ```
   =======

* api-change:``ssm``: [``botocore``] Update ssm client to latest version
* api-change:``securityhub``: [``botocore``] Update securityhub client to latest version
* api-change:``iotthingsgraph``: [``botocore``] Update iotthingsgraph client to latest version
* api-change:``dlm``: [``botocore``] Update dlm client to latest version
* api-change:``rds``: [``botocore``] Update rds client to latest version
* api-change:``ec2``: [``botocore``] Update ec2 client to latest version
   ```
   
  
  
   ### 1.9.157
   ```
   =======

* api-change:``groundstation``: [``botocore``] Update groundstation client to latest version
* api-change:``transcribe``: [``botocore``] Update transcribe client to latest version
* api-change:``chime``: [``botocore``] Update chime client to latest version
* api-change:``rds``: [``botocore``] Update rds client to latest version
* api-change:``waf``: [``botocore``] Update waf client to latest version
* api-change:``pinpoint-email``: [``botocore``] Update pinpoint-email client to latest version
* api-change:``robomaker``: [``botocore``] Update robomaker client to latest version
* api-change:``sts``: [``botocore``] Update sts client to latest version
* api-change:``storagegateway``: [``botocore``] Update storagegateway client to latest version
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/boto3
  - Changelog: https://pyup.io/changelogs/boto3/
  - Repo: https://github.com/boto/boto3
</details>





### Update [Django](https://pypi.org/project/Django) from **2.1.8** to **2.1.9**.


<details>
  <summary>Changelog</summary>
  
  
   ### 2.1.9
   ```
   ============================

*June 3, 2019*

Django 2.1.9 fixes security issues in 2.1.8.

CVE-2019-12308: AdminURLFieldWidget XSS
---------------------------------------

The clickable &quot;Current URL&quot; link generated by ``AdminURLFieldWidget`` displayed
the provided value without validating it as a safe URL. Thus, an unvalidated
value stored in the database, or a value provided as a URL query parameter
payload, could result in an clickable JavaScript link.

``AdminURLFieldWidget`` now validates the provided value using
:class:`~django.core.validators.URLValidator` before displaying the clickable
link. You may customise the validator by passing a ``validator_class`` kwarg to
``AdminURLFieldWidget.__init__()``, e.g. when using
:attr:`~django.contrib.admin.ModelAdmin.formfield_overrides`.

Patched bundled jQuery for CVE-2019-11358: Prototype pollution
--------------------------------------------------------------

jQuery before 3.4.0, mishandles ``jQuery.extend(true, {}, ...)`` because of
``Object.prototype`` pollution. If an unsanitized source object contained an
enumerable ``__proto__`` property, it could extend the native
``Object.prototype``.

The bundled version of jQuery used by the Django admin has been patched to
allow for the ``select2`` library&#39;s use of ``jQuery.extend()``.


==========================
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/django
  - Changelog: https://pyup.io/changelogs/django/
  - Homepage: https://www.djangoproject.com/
</details>





### Update [django-cors-headers](https://pypi.org/project/django-cors-headers) from **3.0.1** to **3.0.2**.


*The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)*

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/django-cors-headers
  - Changelog: https://pyup.io/changelogs/django-cors-headers/
  - Repo: https://github.com/ottoyiu/django-cors-headers
</details>





### Update [django-mozilla-product-details](https://pypi.org/project/django-mozilla-product-details) from **0.13.1** to **0.14.1**.


*The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)*

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/django-mozilla-product-details
  - Repo: https://github.com/mozilla/django-product-details/
</details>





### Update [pytest](https://pypi.org/project/pytest) from **4.5.0** to **4.6.1**.


<details>
  <summary>Changelog</summary>
  
  
   ### 4.6.0
   ```
   =========================

Important
---------

The ``4.6.X`` series will be the last series to support **Python 2 and Python 3.4**.

For more details, see our `Python 2.7 and 3.4 support plan &lt;https://docs.pytest.org/en/latest/py27-py34-deprecation.html&gt;`__.


Features
--------

- `4559 &lt;https://github.com/pytest-dev/pytest/issues/4559&gt;`_: Added the ``junit_log_passing_tests`` ini value which can be used to enable or disable logging of passing test output in the Junit XML file.


- `4956 &lt;https://github.com/pytest-dev/pytest/issues/4956&gt;`_: pytester&#39;s ``testdir.spawn`` uses ``tmpdir`` as HOME/USERPROFILE directory.


- `5062 &lt;https://github.com/pytest-dev/pytest/issues/5062&gt;`_: Unroll calls to ``all`` to full for-loops with assertion rewriting for better failure messages, especially when using Generator Expressions.


- `5063 &lt;https://github.com/pytest-dev/pytest/issues/5063&gt;`_: Switch from ``pkg_resources`` to ``importlib-metadata`` for entrypoint detection for improved performance and import time.


- `5091 &lt;https://github.com/pytest-dev/pytest/issues/5091&gt;`_: The output for ini options in ``--help`` has been improved.


- `5269 &lt;https://github.com/pytest-dev/pytest/issues/5269&gt;`_: ``pytest.importorskip`` includes the ``ImportError`` now in the default ``reason``.


- `5311 &lt;https://github.com/pytest-dev/pytest/issues/5311&gt;`_: Captured logs that are output for each failing test are formatted using the
  ColoredLevelFormatter.


- `5312 &lt;https://github.com/pytest-dev/pytest/issues/5312&gt;`_: Improved formatting of multiline log messages in Python 3.



Bug Fixes
---------

- `2064 &lt;https://github.com/pytest-dev/pytest/issues/2064&gt;`_: The debugging plugin imports the wrapped ``Pdb`` class (``--pdbcls``) on-demand now.


- `4908 &lt;https://github.com/pytest-dev/pytest/issues/4908&gt;`_: The ``pytest_enter_pdb`` hook gets called with post-mortem (``--pdb``).


- `5036 &lt;https://github.com/pytest-dev/pytest/issues/5036&gt;`_: Fix issue where fixtures dependent on other parametrized fixtures would be erroneously parametrized.


- `5256 &lt;https://github.com/pytest-dev/pytest/issues/5256&gt;`_: Handle internal error due to a lone surrogate unicode character not being representable in Jython.


- `5257 &lt;https://github.com/pytest-dev/pytest/issues/5257&gt;`_: Ensure that ``sys.stdout.mode`` does not include ``&#39;b&#39;`` as it is a text stream.


- `5278 &lt;https://github.com/pytest-dev/pytest/issues/5278&gt;`_: Pytest&#39;s internal python plugin can be disabled using ``-p no:python`` again.


- `5286 &lt;https://github.com/pytest-dev/pytest/issues/5286&gt;`_: Fix issue with ``disable_test_id_escaping_and_forfeit_all_rights_to_community_support`` option not working when using a list of test IDs in parametrized tests.


- `5330 &lt;https://github.com/pytest-dev/pytest/issues/5330&gt;`_: Show the test module being collected when emitting ``PytestCollectionWarning`` messages for
  test classes with ``__init__`` and ``__new__`` methods to make it easier to pin down the problem.


- `5333 &lt;https://github.com/pytest-dev/pytest/issues/5333&gt;`_: Fix regression in 4.5.0 with ``--lf`` not re-running all tests with known failures from non-selected tests.



Improved Documentation
----------------------

- `5250 &lt;https://github.com/pytest-dev/pytest/issues/5250&gt;`_: Expand docs on use of ``setenv`` and ``delenv`` with ``monkeypatch``.
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/pytest
  - Changelog: https://pyup.io/changelogs/pytest/
  - Homepage: https://docs.pytest.org/en/latest/
</details>





### Update [pytest-django](https://pypi.org/project/pytest-django) from **3.4.8** to **3.5.0**.


<details>
  <summary>Changelog</summary>
  
  
   ### 3.5.0
   ```
   ------------------

Features
^^^^^^^^

* Run tests in the same order as Django (223)

* Use verbosity=0 with disabled migrations (729, 730)

Bugfixes
^^^^^^^^

* django_db_setup: warn instead of crash with teardown errors (726)

Misc
^^^^
* tests: fix test_sqlite_database_renamed (739, 741)

* tests/conftest.py: move import of db_helpers (737)

* Cleanup/improve coverage, mainly with tests (706)

* Slightly revisit unittest handling (740)
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/pytest-django
  - Changelog: https://pyup.io/changelogs/pytest-django/
  - Docs: https://pytest-django.readthedocs.io/
</details>





### Update [Sphinx](https://pypi.org/project/Sphinx) from **2.0.1** to **2.1.0**.


<details>
  <summary>Changelog</summary>
  
  
   ### 2.1.0
   ```
   =====================================

Incompatible changes
--------------------

* Ignore filenames without file extension given to ``Builder.build_specific()``
  API directly
* 6230: The anchor of term in glossary directive is changed if it is consisted
  by non-ASCII characters
* 4550: html: Centering tables by default using CSS
* 6239: latex: xelatex and xeCJK are used for Chinese documents by default
* ``Sphinx.add_lexer()`` now takes a Lexer class instead of instance.  An
  instance of lexers are still supported until Sphinx-3.x.

Deprecated
----------

* ``sphinx.builders.latex.LaTeXBuilder.apply_transforms()``
* ``sphinx.builders._epub_base.EpubBuilder.esc()``
* ``sphinx.directives.Acks``
* ``sphinx.directives.Author``
* ``sphinx.directives.Centered``
* ``sphinx.directives.Class``
* ``sphinx.directives.CodeBlock``
* ``sphinx.directives.Figure``
* ``sphinx.directives.HList``
* ``sphinx.directives.Highlight``
* ``sphinx.directives.Include``
* ``sphinx.directives.Index``
* ``sphinx.directives.LiteralInclude``
* ``sphinx.directives.Meta``
* ``sphinx.directives.Only``
* ``sphinx.directives.SeeAlso``
* ``sphinx.directives.TabularColumns``
* ``sphinx.directives.TocTree``
* ``sphinx.directives.VersionChange``
* ``sphinx.domains.python.PyClassmember``
* ``sphinx.domains.python.PyModulelevel``
* ``sphinx.domains.std.StandardDomain._resolve_citation_xref()``
* ``sphinx.domains.std.StandardDomain.note_citations()``
* ``sphinx.domains.std.StandardDomain.note_citation_refs()``
* ``sphinx.domains.std.StandardDomain.note_labels()``
* ``sphinx.environment.NoUri``
* ``sphinx.ext.apidoc.format_directive()``
* ``sphinx.ext.apidoc.format_heading()``
* ``sphinx.ext.apidoc.makename()``
* ``sphinx.ext.autodoc.importer.MockFinder``
* ``sphinx.ext.autodoc.importer.MockLoader``
* ``sphinx.ext.autodoc.importer.mock()``
* ``sphinx.ext.autosummary.autolink_role()``
* ``sphinx.ext.imgmath.DOC_BODY``
* ``sphinx.ext.imgmath.DOC_BODY_PREVIEW``
* ``sphinx.ext.imgmath.DOC_HEAD``
* ``sphinx.transforms.CitationReferences``
* ``sphinx.transforms.SmartQuotesSkipper``
* ``sphinx.util.docfields.DocFieldTransformer.preprocess_fieldtypes()``
* ``sphinx.util.node.find_source_node()``
* ``sphinx.util.i18n.find_catalog()``
* ``sphinx.util.i18n.find_catalog_files()``
* ``sphinx.util.i18n.find_catalog_source_files()``

For more details, see :ref:`deprecation APIs list &lt;dev-deprecated-apis&gt;`.

Features added
--------------

* Add a helper class ``sphinx.transforms.post_transforms.SphinxPostTransform``
* Add helper methods

  - ``PythonDomain.note_module()``
  - ``PythonDomain.note_object()``
  - ``SphinxDirective.set_source_info()``

* 6180: Support ``--keep-going`` with BuildDoc setup command
* ``math`` directive now supports ``:class:`` option
* 6310: imgmath: let :confval:`imgmath_use_preview` work also with the SVG
  format for images rendering inline math
* todo: ``todo`` directive now supports ``:name:`` option
* Enable override via environment of ``SPHINXOPTS`` and ``SPHINXBUILD`` Makefile
  variables (refs: 6232, 6303)
* 6287: autodoc: Unable to document bound instance methods exported as module
  functions
* 6289: autodoc: :confval:`autodoc_default_options` now supports
  ``imported-members`` option
* 4777: autodoc: Support coroutine
* 744: autodoc: Support abstractmethod
* 6325: autodoc: Support attributes in __slots__.  For dict-style __slots__,
  autodoc considers values as a docstring of the attribute
* 6361: autodoc: Add :confval:`autodoc_typehints` to suppress typehints from
  signature
* 1063: autodoc: ``automodule`` directive now handles undocumented module level
  variables
* 6212 autosummary: Add :confval:`autosummary_imported_members` to display
  imported members on autosummary
* 6271: ``make clean`` is catastrophically broken if building into &#39;.&#39;
* 6363: Support ``%O%`` environment variable in make.bat
* 4777: py domain: Add ``:async:`` option to :rst:dir:`py:function` directive
* py domain: Add new options to :rst:dir:`py:method` directive

  - ``:abstractmethod:``
  - ``:async:``
  - ``:classmethod:``
  - ``:property:``
  - ``:staticmethod:``

* rst domain: Add :rst:dir:`directive:option` directive to describe the option
  for directive
* 6306: html: Add a label to search form for accessability purposes
* 4390: html: Consistent and semantic CSS for signatures
* 6358: The ``rawsource`` property of ``production`` nodes now contains the
  full production rule
* 6373: autosectionlabel: Allow suppression of warnings
* coverage: Support a new ``coverage_ignore_pyobjects`` option
* 6239: latex: Support to build Chinese documents

Bugs fixed
----------

* 6230: Inappropriate node_id has been generated by glossary directive if term
  is consisted by non-ASCII characters
* 6213: ifconfig: contents after headings are not shown
* commented term in glossary directive is wrongly recognized
* 6299: rst domain: rst:directive directive generates waste space
* 6379: py domain: Module index (py-modindex.html) has duplicate titles
* 6331: man: invalid output when doctest follows rubric
* 6351: &quot;Hyperlink target is not referenced&quot; message is shown even if
  referenced
* 6165: autodoc: ``tab_width`` setting of docutils has been ignored
* 6347: autodoc: crashes with a plain Tuple on Python 3.6 and 3.5
* 6311: autosummary: autosummary table gets confused by complex type hints
* 6350: autosummary: confused by an argument having some kind of default value
* Generated Makefiles lack a final EOL (refs: 6232)
* 6375: extlinks: Cannot escape angle brackets in link caption
* 6378: linkcheck: Send commonly used User-Agent
* 6387: html search: failed to search document with haiku and scrolls themes
* 6408: html search: Fix the ranking of search results
* 6406: Wrong year is returned for ``SOURCE_DATE_EPOCH``
* 6402: image directive crashes by unknown image format
* 6286: C++, allow 8 and 9 in hexadecimal integer literals.
* 6305: Fix the string in quickstart for &#39;path&#39; argument of parser
* LaTeX: Figures in admonitions produced errors (refs: 6364)
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/sphinx
  - Changelog: https://pyup.io/changelogs/sphinx/
  - Homepage: http://sphinx-doc.org/
</details>







Co-authored-by: pyup-bot <github-bot@pyup.io>
Co-authored-by: Mike Cooper <mythmon@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.