Giter VIP home page Giter VIP logo

Comments (7)

jaidencreep avatar jaidencreep commented on July 22, 2024 1

An unideal solution, but removing P from typing.Generic[GenericFeature, P, T] in jishaku.features.baseclass.Feature.Command fixes this issue. This can be traced back to the typing_extensions module:

Note: Can't fake ParamSpec as a TypeVar to get it to work
with Generics. ParamSpec isn't an instance of TypeVar in 3.10.
So encouraging code like isinstance(ParamSpec('P'), TypeVar))
will lead to breakage in 3.10.
This also means no accurate parameters for GenericAliases.
(AN: line 2380-2384)

Really sucks but this solution shouldn't have any issues

Versions affected by this issue: Pre-3.10

from jishaku.

Gorialis avatar Gorialis commented on July 22, 2024

I'm really struggling to replicate this. Can you tell me a bit more about what packages you have (e.g. what lib version you're running), and the Python build information (it appears on the top like when you run the REPL)?

from jishaku.

SuperSajuuk avatar SuperSajuuk commented on July 22, 2024

Hi there @Gorialis here's some extra details that might help. I've separated into dev and prod so you can see the different environments (do you want full package lists from pip freeze or is the below suffice?):

NB: In both cases below, I've been attempting to install Jishaku either by doing pip install -U git+https://github.com/Gorialis/jishaku or pip install -U jishaku. I note that in my Windows environment, the installed Jishaku version is at commit 0a1a45d and appears to operate as intended [ie no errors get thrown by Jishaku when loading, despite what seemed to be happening before], despite seemingly erroring at the same commit build as that which was used by Production before it was rolled back. The production code base is identical to that of my development code, so its not like I've introduced anything into Production that wasn't already in development.

Development
The version of Python installed is Python 3.8.5 for 64-bit Window, installed using a Windows Installer package downloaded from the Python website. The build information for this version is included: Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32

In terms of the discord.py package, the version installed is 2.0.0a4269+gb7e25645 which matches the production environment at the moment.

Production
The version of Python installed here is a source-built version, and I can include the build info for that below (which I have extracted by using !jsk on the bot): Python 3.9.6 (default, Jul 17 2021, 14:05:48) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux

The version of discord.py installed on the Production version is discord.py @ git+https://github.com/Rapptz/discord.py@b7e25645dc68bbb828bf1ede711d098c6b183237. I intentionally upgraded my development environment to a newer version of discord.py before upgrading Production, to verify there were no bugs I would encounter by doing so. However, even in Production when using a slightly older version of the library (about 1.5 weeks old in terms of commit history?), the same issue occurred as on Windows. As on the Windows build, Jishaku was attempted to be upgraded by passing the github url or just the package name.

Let me know if you need any other information. :)

from jishaku.

writeblankspace avatar writeblankspace commented on July 22, 2024
Exception has occurred: ExtensionFailed
Extension 'jishaku' raised an error: TypeError: Parameters to Generic[...] must all be type variables

The above exception was the direct cause of the following exception:

  File "G:\My Drive\.Drive\.VSCODE\.bots\pif paf\bot.py", line 95, in main
    await bot.load_extension(extension)
  File "G:\My Drive\.Drive\.VSCODE\.bots\pif paf\bot.py", line 100, in <module>
    asyncio.run(main())

Got the same issue here. (extension's value is jishaku). I'm also using the dev version of jishaku and using dpy 2.0.

from jishaku.

writeblankspace avatar writeblankspace commented on July 22, 2024

Updating Python to latest fixed it. I updated from Python 3.9 to 3.10 and the bug was gone.

from jishaku.

SuperSajuuk avatar SuperSajuuk commented on July 22, 2024

Updating Python to latest fixed it. I updated from Python 3.9 to 3.10 and the bug was gone.

Good to know, although updating Python just to fix this error doesn't seem a very good idea, considering that discord.py supports Python 3.8 and 3.9 (both of which are my development and production versions respectively, where updating would require installing basically every library over again, which isn't fun to do).

from jishaku.

pythonmcpi avatar pythonmcpi commented on July 22, 2024

where updating would require installing basically every library over again, which isn't fun to do
Well, you could pipe the output of pip3.9 freeze into a file, then call pip3.10 install -r filename.txt to reinstall the libraries. You'd have to check if the libraries support 3.10, though.

from jishaku.

Related Issues (20)

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.