dc-kafka-python-six-fix


Namedc-kafka-python-six-fix JSON
Version 0.1.3 PyPI version JSON
download
home_pageNone
SummaryFix for kafka-python 2.0.2 missing six module
upload_time2025-02-04 16:04:43
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseApache-2.0
keywords kafka python six error fix
VCS
bugtrack_url
requirements pip setuptools wheel build twine six kafka-python
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # dc-kafka-python-six-fix

## Who Needs This?

- Mac/Linux users running kafka-python will encounter a missing six dependency when using Kafka.
- Windows users may be fine locally but will hit the same issue when deploying to cloud environments (e.g., GitHub Actions, Docker, or other Linux-based CI/CD).

## What Does this Fix Do?

- Restores compatibility without modifying existing Kafka code.
- Prevents the ModuleNotFoundError: No module named 'kafka.vendor.six.moves' issue.
- Works instantly without requiring manual virtual environment tweaks.
- Works for Kafka using kafka-python.


## How To Use This Fix 


### Step 1. Install 
Run

```
pip install dc-kafka-python-six-fix
```

OR add this dependency to requirements.txt and run with:

```
python3 -m pip install -r requirements.txt
```

## Step 2. Import & Apply The Fix

Import and apply the fix before importing from Kafka. For example:

```python
from dc_kafka_python_six_fix import fix_six
fix_six() 

from kafka import KafkaConsumer
```
## Why Is This Fix Needed?

- The kafka-python package expects six.moves inside kafka.vendor, but six is no longer included.
- This package restores six to the expected location, allowing Kafka Consumers to function without modification.
- No need to manually patch virtual environments every time we install kafka-python.

---

## Warning: kafka-python Is No Longer Maintained

- The kafka-python package is no longer actively maintained.
- Consider migrating to [confluent-kafka-python](https://github.com/confluentinc/confluent-kafka-python) for all future projects.
- The migration requires minimal changes but provides long-term stability.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dc-kafka-python-six-fix",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "kafka, python, six, error, fix",
    "author": null,
    "author_email": "Denise Case <denisecase@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/67/f9/6b2e6a62a32828a4903759ff6ec2068f504995c039acf7362de886fd1b2d/dc_kafka_python_six_fix-0.1.3.tar.gz",
    "platform": null,
    "description": "# dc-kafka-python-six-fix\n\n## Who Needs This?\n\n- Mac/Linux users running kafka-python will encounter a missing six dependency when using Kafka.\n- Windows users may be fine locally but will hit the same issue when deploying to cloud environments (e.g., GitHub Actions, Docker, or other Linux-based CI/CD).\n\n## What Does this Fix Do?\n\n- Restores compatibility without modifying existing Kafka code.\n- Prevents the ModuleNotFoundError: No module named 'kafka.vendor.six.moves' issue.\n- Works instantly without requiring manual virtual environment tweaks.\n- Works for Kafka using kafka-python.\n\n\n## How To Use This Fix \n\n\n### Step 1. Install \nRun\n\n```\npip install dc-kafka-python-six-fix\n```\n\nOR add this dependency to requirements.txt and run with:\n\n```\npython3 -m pip install -r requirements.txt\n```\n\n## Step 2. Import & Apply The Fix\n\nImport and apply the fix before importing from Kafka. For example:\n\n```python\nfrom dc_kafka_python_six_fix import fix_six\nfix_six() \n\nfrom kafka import KafkaConsumer\n```\n## Why Is This Fix Needed?\n\n- The kafka-python package expects six.moves inside kafka.vendor, but six is no longer included.\n- This package restores six to the expected location, allowing Kafka Consumers to function without modification.\n- No need to manually patch virtual environments every time we install kafka-python.\n\n---\n\n## Warning: kafka-python Is No Longer Maintained\n\n- The kafka-python package is no longer actively maintained.\n- Consider migrating to [confluent-kafka-python](https://github.com/confluentinc/confluent-kafka-python) for all future projects.\n- The migration requires minimal changes but provides long-term stability.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Fix for kafka-python 2.0.2 missing six module",
    "version": "0.1.3",
    "project_urls": {
        "BugTracker": "https://github.com/denisecase/dc-kafka-python-six-fix/issues",
        "Homepage": "https://github.com/denisecase/dc-kafka-python-six-fix",
        "Repository": "https://github.com/denisecase/dc-kafka-python-six-fix"
    },
    "split_keywords": [
        "kafka",
        " python",
        " six",
        " error",
        " fix"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a341faad00baf604c99852a3849e231c57647b5aeaa58aef3045d8c4ddec15e3",
                "md5": "ac16d5bcd8cb4c9724a242eaedd2e350",
                "sha256": "ad7cb9824e8fe97714a1a53683852f179a29b84ed3288afa5d58f4d4048d0380"
            },
            "downloads": -1,
            "filename": "dc_kafka_python_six_fix-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ac16d5bcd8cb4c9724a242eaedd2e350",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 7625,
            "upload_time": "2025-02-04T16:04:42",
            "upload_time_iso_8601": "2025-02-04T16:04:42.046373Z",
            "url": "https://files.pythonhosted.org/packages/a3/41/faad00baf604c99852a3849e231c57647b5aeaa58aef3045d8c4ddec15e3/dc_kafka_python_six_fix-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "67f96b2e6a62a32828a4903759ff6ec2068f504995c039acf7362de886fd1b2d",
                "md5": "5f775fa0a900593414543780c37db9dd",
                "sha256": "df93809f8f695e28a65fbd3b6ccbce939a44375e5f8aac74ca214844bc7fba02"
            },
            "downloads": -1,
            "filename": "dc_kafka_python_six_fix-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "5f775fa0a900593414543780c37db9dd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 6934,
            "upload_time": "2025-02-04T16:04:43",
            "upload_time_iso_8601": "2025-02-04T16:04:43.103325Z",
            "url": "https://files.pythonhosted.org/packages/67/f9/6b2e6a62a32828a4903759ff6ec2068f504995c039acf7362de886fd1b2d/dc_kafka_python_six_fix-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-04 16:04:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "denisecase",
    "github_project": "dc-kafka-python-six-fix",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pip",
            "specs": []
        },
        {
            "name": "setuptools",
            "specs": []
        },
        {
            "name": "wheel",
            "specs": []
        },
        {
            "name": "build",
            "specs": []
        },
        {
            "name": "twine",
            "specs": []
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "kafka-python",
            "specs": [
                [
                    "==",
                    "2.0.2"
                ]
            ]
        }
    ],
    "lcname": "dc-kafka-python-six-fix"
}
        
Elapsed time: 0.51982s