Code-Society-Lab / Code-Society-Lab/grace

TranslationCog - CGI deprecated in Python 3.13+

Open
#129 0 comments 0 reactions 1 assignee Claimed by @PenguinBoi12 View on GitHub
deprecation
Dominant language
Python
Stars
22
Forks
15
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
The cgi module is deprecated in Python 3.13+, and googletrans depends on httpx, which internally relies on cgi. This causes compatibility issues with newer Python versions. We should investigate possible solutions:

- Switch to a compatible version of httpx/googletrans
- Replace googletrans with an alternative translation library
- Remove translation functionality entirely if it’s non-essential

**Have you been able to reproduce the bug?**
Switching to Python 3.13+ should cause the bug to happen. If you're under 3.13, deprecation warning can be enabled by adding the following in `bot/grace.py` :

```python
import warnings
warnings.filterwarnings("always", category=DeprecationWarning)
```

When the error occurs it simply return the grace help
Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.