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

Exceptions from blacksheep/messages.pyx in version 1.2.19 #460

Closed
waweber opened this issue Jan 2, 2024 · 2 comments
Closed

Exceptions from blacksheep/messages.pyx in version 1.2.19 #460

waweber opened this issue Jan 2, 2024 · 2 comments

Comments

@waweber
Copy link

waweber commented Jan 2, 2024

Describe the bug

Upgrading to 1.2.19 from 1.2.18 raises several exceptions like:

File "blacksheep/messages.pyx", line 302, in blacksheep.messages.Request.host.__get__
    host_header = self.get_first_header(b'host')
  File "blacksheep/messages.pyx", line 46, in blacksheep.messages.Message.get_first_header
    cpdef bytes get_first_header(self, bytes key):
  File "blacksheep/messages.pyx", line 46, in blacksheep.messages.Message.get_first_header
    cpdef bytes get_first_header(self, bytes key):
  File "blacksheep/messages.pyx", line 49, in blacksheep.messages.Message.get_first_header
    for header in self.__headers:

TypeError: 'NoneType' object is not iterable

Maybe something went wrong with the Cython compilation?

@RobertoPrevato
Copy link
Member

RobertoPrevato commented Jan 7, 2024

Thank You for reporting this issue. I yanked the 1.2.19 release. The problem happened for this reason:

  • v1 branch was still compiling and running tests using Cython-0.29.34 (pinned in requirements.txt)
  • the release event is handled by the GitHub Workflow defined on main, the workflow was modified to build the wheels using cython-3.0.2
  • a breaking change in the more recent version of Cython broke the package that way

as a side note, this issue was fixed on v2 branch 4 months ago, at d0a9f17

RobertoPrevato added a commit that referenced this issue Jan 7, 2024
RobertoPrevato added a commit that referenced this issue Jan 7, 2024
@RobertoPrevato
Copy link
Member

I published a fix with 1.2.20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants