python-hyper / h11

A pure-Python, bring-your-own-I/O implementation of HTTP/1.1
https://h11.readthedocs.io/
MIT License
490 stars 62 forks source link

Format with black 23.3.0 #162

Closed zanieb closed 1 year ago

zanieb commented 1 year ago

The black version used in CI is not pinned so the new version's formatting needs to be applied to master.

sethmlarson commented 1 year ago

@madkinsz Can we pin the version of black we're using so this doesn't happen again?

zanieb commented 1 year ago

@sethmlarson It looks like the dependency is defined in tox.ini which is not supported by Dependabot https://github.com/dependabot/dependabot-core/issues/2076 — if we pin it it'd be nice to put it somewhere that gets updated.

Perhaps #163 but let's sort that out separately.

zanieb commented 1 year ago

Docs build failing with

>>>-------------------------------------------------------------------------
Exception in /home/docs/checkouts/readthedocs.org/user_builds/h11/checkouts/162/docs/source/basic-usage.rst at block ending on line 315
Specify :okexcept: as an option in the ipython:: block to suppress this message
---------------------------------------------------------------------------
LocalProtocolError                        Traceback (most recent call last)
<ipython-input-49-3865bb9786ee> in <module>
----> 1 client.conn.start_next_cycle()

~/checkouts/readthedocs.org/user_builds/h11/envs/162/lib/python3.7/site-packages/h11-0.14.0+dev-py3.7.egg/h11/_connection.py in start_next_cycle(self)
    235         """
    236         old_states = dict(self._cstate.states)
--> 237         self._cstate.start_next_cycle()
    238         self._request_method = None
    239         # self.their_http_version gets left alone, since it presumably lasts

~/checkouts/readthedocs.org/user_builds/h11/envs/162/lib/python3.7/site-packages/h11-0.14.0+dev-py3.7.egg/h11/_state.py in start_next_cycle(self)
    359         if self.states != {CLIENT: DONE, SERVER: DONE}:
    360             raise LocalProtocolError(
--> 361                 "not in a reusable state. self.states={}".format(self.states)
    362             )
    363         # Can't reach DONE/DONE with any of these active, but still, let's be

LocalProtocolError: not in a reusable state. self.states={CLIENT: MUST_CLOSE, SERVER: CLOSED}

<<<-------------------------------------------------------------------------
Kludex commented 1 year ago

@sethmlarson Can you help us here? 👀

(And congrats on the new role again! 😁🙏)

Kludex commented 1 year ago

Thanks @sethmlarson 🙏