Coder Social home page Coder Social logo

support 3.8 about quart-github-webhook HOT 9 CLOSED

NargiT avatar NargiT commented on May 27, 2024
support 3.8

from quart-github-webhook.

Comments (9)

binary1230 avatar binary1230 commented on May 27, 2024 1

thanks for the lib and the homework

I submitted a PR with the code changes above and updated example. This issue should probably be renamed to be more about upgrading Flask/Quart versions and not about python 3.8, for clarity sake for others looking for breadcrumbs when they're first getting started if they hit the same issue we did.

Thanks!

from quart-github-webhook.

AstraLuma avatar AstraLuma commented on May 27, 2024

It should? I'm using this in https://github.com/ppb/binny/ with 3.9

from quart-github-webhook.

NargiT avatar NargiT commented on May 27, 2024

hum... I tried to build the project with only py38 and I have errors running tests. more over the build on the ci is broken so I don't understand why it fails.

from quart-github-webhook.

NargiT avatar NargiT commented on May 27, 2024

here is the error I got from pytest

self = <quart_github_webhook.webhook.Webhook object at 0x7f1b4e016820>
app = <Quart 'tests.test_webhook'>, endpoint = '/postreceive', secret = None

    def __init__(self, app, endpoint="/postreceive", secret=None):
>       app.add_url_rule(
            path=endpoint, endpoint=endpoint, view_func=self._postreceive, methods=["POST"],
        )
E       TypeError: add_url_rule() got an unexpected keyword argument 'path'

../quart_github_webhook/webhook.py:19: TypeError

from quart-github-webhook.

NargiT avatar NargiT commented on May 27, 2024

so I dig a bit and looks like since version 0.12.0 quart updated the api to match the one from flask.
pgjones/quart@7b1f6f2 and since no version is mentioned in tox.ini the build is not reproductible.

there is also another modification since 0.15.0 in quart pgjones/quart@4da1b58 that remove internal alias for werkzeug htts status.

So I don't know what to do, it's not an issue with the code more an issue with dependencies.

If I want to use latest version of quart, we have to update this.

@@ -17,7 +17,7 @@ class Webhook(object):
 
     def __init__(self, app, endpoint="/postreceive", secret=None):
         app.add_url_rule(
-            path=endpoint, endpoint=endpoint, view_func=self._postreceive, methods=["POST"],
+            rule=endpoint, endpoint=endpoint, view_func=self._postreceive, methods=["POST"],
         )
 
         self._hooks = collections.defaultdict(list)

from quart-github-webhook.

NargiT avatar NargiT commented on May 27, 2024

It should? I'm using this in https://github.com/ppb/binny/ with 3.9

and indeed it work in your project because it uses 0.11.5 https://github.com/ppb/binny/blob/5dea0551a310c5d105c59d1e730722a49e979e8f/poetry.lock#L641

from quart-github-webhook.

AstraLuma avatar AstraLuma commented on May 27, 2024

Ah, ok.

from quart-github-webhook.

AstraLuma avatar AstraLuma commented on May 27, 2024

I'll probably get to this Eventually:tm:, or I'll happily accept PRs.

from quart-github-webhook.

NargiT avatar NargiT commented on May 27, 2024

I can do the PR, not today. I might not be able to run all env in my local machine so I will try first on your CI.

from quart-github-webhook.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.