Repository: jazzband/tablib
Pull request #570 (2023-10-30 20:40:25)

Move `src/tablib/packages/dbfpy` to `src/tablib/_vendor/dbfpy`
Follow on from https://github.com/jazzband/tablib/pull/569.

`dbfpy` is a vendored package. Move it to a `_vendor` directory to make this clear.

This will be released in tablib 4.0.0.

codecov[bot]: We're currently processing your upload.  This comment will be updated when the results are available.

Patch:
diff --git a/src/tablib/packages/__init__.py b/src/tablib/_vendor/__init__.py
similarity index 100%
rename from src/tablib/packages/__init__.py
rename to src/tablib/_vendor/__init__.py
diff --git a/src/tablib/packages/dbfpy/__init__.py b/src/tablib/_vendor/dbfpy/__init__.py
similarity index 100%
rename from src/tablib/packages/dbfpy/__init__.py
rename to src/tablib/_vendor/dbfpy/__init__.py
diff --git a/src/tablib/packages/dbfpy/dbf.py b/src/tablib/_vendor/dbfpy/dbf.py
similarity index 100%
rename from src/tablib/packages/dbfpy/dbf.py
rename to src/tablib/_vendor/dbfpy/dbf.py
diff --git a/src/tablib/packages/dbfpy/dbfnew.py b/src/tablib/_vendor/dbfpy/dbfnew.py
similarity index 100%
rename from src/tablib/packages/dbfpy/dbfnew.py
rename to src/tablib/_vendor/dbfpy/dbfnew.py
diff --git a/src/tablib/packages/dbfpy/fields.py b/src/tablib/_vendor/dbfpy/fields.py
similarity index 100%
rename from src/tablib/packages/dbfpy/fields.py
rename to src/tablib/_vendor/dbfpy/fields.py
diff --git a/src/tablib/packages/dbfpy/header.py b/src/tablib/_vendor/dbfpy/header.py
similarity index 100%
rename from src/tablib/packages/dbfpy/header.py
rename to src/tablib/_vendor/dbfpy/header.py
diff --git a/src/tablib/packages/dbfpy/record.py b/src/tablib/_vendor/dbfpy/record.py
similarity index 100%
rename from src/tablib/packages/dbfpy/record.py
rename to src/tablib/_vendor/dbfpy/record.py
diff --git a/src/tablib/packages/dbfpy/utils.py b/src/tablib/_vendor/dbfpy/utils.py
similarity index 100%
rename from src/tablib/packages/dbfpy/utils.py
rename to src/tablib/_vendor/dbfpy/utils.py
diff --git a/src/tablib/formats/_dbf.py b/src/tablib/formats/_dbf.py
index e873866..831c7bd 100644
--- a/src/tablib/formats/_dbf.py
+++ b/src/tablib/formats/_dbf.py
@@ -4,8 +4,8 @@ import io
 import os
 import tempfile
 
-from ..packages.dbfpy import dbf, dbfnew
-from ..packages.dbfpy import record as dbfrecord
+from .._vendor.dbfpy import dbf, dbfnew
+from .._vendor.dbfpy import record as dbfrecord
 
 
 class DBFFormat:


Test patch:
diff --git a/tests/test_tablib_dbfpy_packages_fields.py b/tests/test_tablib_dbfpy_packages_fields.py
index fd39717..aa01227 100644
--- a/tests/test_tablib_dbfpy_packages_fields.py
+++ b/tests/test_tablib_dbfpy_packages_fields.py
@@ -1,9 +1,9 @@
 #!/usr/bin/env python
-"""Tests for tablib.packages.dbfpy."""
+"""Tests for tablib._vendor.dbfpy."""
 
 import unittest
 
-from tablib.packages.dbfpy import fields
+from tablib._vendor.dbfpy import fields
 
 
 class DbfFieldDefTestCompareCase(unittest.TestCase):
diff --git a/tests/test_tablib_dbfpy_packages_utils.py b/tests/test_tablib_dbfpy_packages_utils.py
index df88795..dd98db4 100644
--- a/tests/test_tablib_dbfpy_packages_utils.py
+++ b/tests/test_tablib_dbfpy_packages_utils.py
@@ -1,10 +1,10 @@
 #!/usr/bin/env python
-"""Tests for tablib.packages.dbfpy."""
+"""Tests for tablib._vendor.dbfpy."""
 
 import datetime as dt
 import unittest
 
-from tablib.packages.dbfpy import utils
+from tablib._vendor.dbfpy import utils
 
 
 class UtilsUnzfillTestCase(unittest.TestCase):