If code changes were made then they have been tested.
I have updated the documentation to reflect the changes.
[] This PR fixes an issue.
[] This PR adds something new (e.g. new method or parameters).
[] This PR is a breaking change (e.g. methods or parameters removed/renamed)
This PR is not a code change (e.g. documentation, README, ...)
<!-- Pull requests that do not fill this information in will likely be closed -->
## Summary
Due to a bug in Python 3.9.7, code situations where we call an __init__ function in a subclass will fail with a TypeError.
This is only a bug within the Python language and was patched out with Python 3.10 and this doesn't affect Python 3.9.6.
Here, we are advising the incompatibility.
You can view that bug report [here on the Python Bugs site.](https://bugs.python.org/issue45121)
## Checklist
<!-- Put an x inside [ ] to check it, like so: [x] -->
- [x] If code changes were made then they have been tested.
- [x] I have updated the documentation to reflect the changes.
- [] This PR fixes an issue.
- [] This PR adds something new (e.g. new method or parameters).
- [] This PR is a breaking change (e.g. methods or parameters removed/renamed)
- [x] This PR is **not** a code change (e.g. documentation, README, ...)
I feel like this should be left as a note in the affected places, instead of as a big notice at the top of the readme, on that note, where are the affected places? I have been running 3.9.7 for development since it came out on pacman and seem to have no problems.
I feel like this should be left as a note in the affected places, instead of as a big notice at the top of the readme, on that note, where are the affected places? I have been running 3.9.7 for development since it came out on `pacman` and seem to have no problems.
Well, on my hands, I'm working on Windows 10 with the 3.9.7 directly from python.org and it seemingly throws this error.
Affected areas would primarily be wherever a class derives from a Protocol and we call super().__init__(). I'm not really familiar with d.py codebase or the additions you guys have made, however, this specific error was called from discord/ext/commands/converter.py:116
Here's the full traceback:
Ignoringexceptionincommandsquadspromote:Traceback(mostrecentcalllast):File"C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py",line471,in_actual_conversionreturnawaitconverter().convert(ctx,argument)File"C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\converter.py",line116,in__init__super().__init__()File"C:\Program Files\Python39\lib\typing.py",line1083,in_no_initraiseTypeError('Protocols cannot be instantiated')TypeError:ProtocolscannotbeinstantiatedTheaboveexceptionwasthedirectcauseofthefollowingexception:Traceback(mostrecentcalllast):File"C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\bot.py",line986,ininvokeawaitctx.command.invoke(ctx)File"C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py",line1361,ininvokeawaitctx.invoked_subcommand.invoke(ctx)File"C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py",line868,ininvokeawaitself.prepare(ctx)File"C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py",line802,inprepareawaitself._parse_arguments(ctx)File"C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py",line710,in_parse_argumentstransformed=awaitself.transform(ctx,param)File"C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py",line565,intransformreturnawaitself.do_conversion(ctx,converter,argument,param)File"C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py",line518,indo_conversionreturnawaitself._actual_conversion(ctx,converter,argument,param)File"C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py",line477,in_actual_conversionraiseConversionError(converter,exc)fromexcdiscord.ext.commands.errors.ConversionError:(<class'discord.ext.commands.converter.MemberConverter'>, TypeError('Protocolscannotbeinstantiated'))
Now, again, I don't know where the specific spots are where this applies, all I know is this is a bug with Python 3.9.7 and from that, that's why I believe it's certainly easier to just block out 3.9.7 instead of making changes to the underlying codebase. This behavior was patched out on 3.10 and 3.9.6 is unaffected in my uses.
Well, on my hands, I'm working on Windows 10 with the 3.9.7 directly from python.org and it seemingly throws this error.
Affected areas would primarily be wherever a class derives from a `Protocol` and we call `super().__init__()`. I'm not really familiar with d.py codebase or the additions you guys have made, however, this specific error was called from `discord/ext/commands/converter.py:116`
Here's the full traceback:
```py
Ignoring exception in command squads promote:
Traceback (most recent call last):
File "C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py", line 471, in _actual_conversion
return await converter().convert(ctx, argument)
File "C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\converter.py", line 116, in __init__
super().__init__()
File "C:\Program Files\Python39\lib\typing.py", line 1083, in _no_init
raise TypeError('Protocols cannot be instantiated')
TypeError: Protocols cannot be instantiated
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\bot.py", line 986, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py", line 1361, in invoke
await ctx.invoked_subcommand.invoke(ctx)
File "C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py", line 868, in invoke
await self.prepare(ctx)
File "C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py", line 802, in prepare
await self._parse_arguments(ctx)
File "C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py", line 710, in _parse_arguments
transformed = await self.transform(ctx, param)
File "C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py", line 565, in transform
return await self.do_conversion(ctx, converter, argument, param)
File "C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py", line 518, in do_conversion
return await self._actual_conversion(ctx, converter, argument, param)
File "C:\Users\saltamimi\.virtualenvs\halobot-rewrite-O1Pbt8pO\lib\site-packages\discord\ext\commands\core.py", line 477, in _actual_conversion
raise ConversionError(converter, exc) from exc
discord.ext.commands.errors.ConversionError: (<class 'discord.ext.commands.converter.MemberConverter'>, TypeError('Protocols cannot be instantiated'))
```
Now, again, I don't know where the specific spots are where this applies, all I know is this is a bug with Python 3.9.7 and from that, that's why I believe it's certainly easier to just block out 3.9.7 instead of making changes to the underlying codebase. This behavior was patched out on 3.10 and 3.9.6 is unaffected in my uses.
A warning at the top of the readme is not appropriate for this kind of bug.
Honestly I don't see a reason to add this warning anywhere, we can simply point people to the python bug on the off chance that they come across this error. However if the others agree that they'd wish to add a notice, it'll have to be in strictly the affected area of the docs, not the top of the readme
A warning at the top of the readme is not appropriate for this kind of bug.
Honestly I don't see a reason to add this warning anywhere, we can simply point people to the python bug on the off chance that they come across this error. However if the others agree that they'd wish to add a notice, it'll have to be in strictly the affected area of the docs, not the top of the readme
A warning at the top of the readme is not appropriate for this kind of bug. Honestly I don't see a reason to add this warning anywhere, we can simply point people to the python bug on the off chance that they come across this error. However if the others agree that they'd wish to add a notice, it'll have to be in strictly the affected area of the docs, not the top of the readme
This, I can respect. However, I'm unaware if there's more of these cases here. I'm fine with redoing it to the docs, but the question becomes where more instances like this happen with the codebases.
> A warning at the top of the readme is not appropriate for this kind of bug. Honestly I don't see a reason to add this warning anywhere, we can simply point people to the python bug on the off chance that they come across this error. However if the others agree that they'd wish to add a notice, it'll have to be in strictly the affected area of the docs, not the top of the readme
This, I can respect. However, I'm unaware if there's more of these cases here. I'm fine with redoing it to the docs, but the question becomes where more instances like this happen with the codebases.
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Due to a bug in Python 3.9.7, code situations where we call an init function in a subclass will fail with a TypeError.
This is only a bug within the Python language and was patched out with Python 3.10 and this doesn't affect Python 3.9.6.
Here, we are advising the incompatibility.
You can view that bug report here on the Python Bugs site.
Checklist
can you try updating your python 3.9.7 version to see if it fixes the issue or did they fix it in 3.9.8?
Hey there,
3.9.8 is not released yet, but I have not tested 3.9.6 nor 3.10. I'll give these a deployment in a few hours.
Per my tests, 3.9.6 and 3.10.0 seem unaffected. I reinstalled Python 3.9.7 and the same edge case error happened.
I feel like this should be left as a note in the affected places, instead of as a big notice at the top of the readme, on that note, where are the affected places? I have been running 3.9.7 for development since it came out on
pacmanand seem to have no problems.Well, on my hands, I'm working on Windows 10 with the 3.9.7 directly from python.org and it seemingly throws this error.
Affected areas would primarily be wherever a class derives from a
Protocoland we callsuper().__init__(). I'm not really familiar with d.py codebase or the additions you guys have made, however, this specific error was called fromdiscord/ext/commands/converter.py:116Here's the full traceback:
Now, again, I don't know where the specific spots are where this applies, all I know is this is a bug with Python 3.9.7 and from that, that's why I believe it's certainly easier to just block out 3.9.7 instead of making changes to the underlying codebase. This behavior was patched out on 3.10 and 3.9.6 is unaffected in my uses.
A warning at the top of the readme is not appropriate for this kind of bug.
Honestly I don't see a reason to add this warning anywhere, we can simply point people to the python bug on the off chance that they come across this error. However if the others agree that they'd wish to add a notice, it'll have to be in strictly the affected area of the docs, not the top of the readme
This, I can respect. However, I'm unaware if there's more of these cases here. I'm fine with redoing it to the docs, but the question becomes where more instances like this happen with the codebases.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.