Comments (7)
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.
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.
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.
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.
Updating Python to latest fixed it. I updated from Python 3.9 to 3.10 and the bug was gone.
from jishaku.
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.
where updating would require installing basically every library over again, which isn't fun to do
Well, you could pipe the output ofpip3.9 freeze
into a file, then callpip3.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)
- ability to add user who can run jishaku on the fly HOT 2
- Button disable
- Add Whois command HOT 2
- Unsupport discord.py v1.7.x HOT 1
- Python 3.9.13 not supported HOT 1
- Proper user configurable jsk py dict vars HOT 1
- change jishaku commands names HOT 1
- Jishaku version occasionally appears as vNone in selftest HOT 4
- Adding asqlite to options for the sql features HOT 3
- Unhandled code branch in `jishaku voice` command.
- Cog already loaded when loading it HOT 1
- I canβt use jishaku shell command HOT 2
- `jishaku timeit` raises an AttributeError upon use. HOT 1
- Tracking: need for a new release
- KeyError on Python version 3.11.0 HOT 3
- AttributeError: 'Context' object has no attribute 'add_reaction' HOT 2
- Question about next possible release to pypi HOT 2
- Convert message links to Message objects in REPLs HOT 1
- [Tracking] import_expression doesn't function correctly in 3.12 HOT 3
- jsk sync command broken on dpy master HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jishaku.