File tree Expand file tree Collapse file tree 4 files changed +6
-35
lines changed
Expand file tree Collapse file tree 4 files changed +6
-35
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,12 @@ Unreleased
1717- Error handling: At two spots in cursor / value converter handling, where
1818 ``assert`` statements have been used, ``ValueError`` exceptions are raised
1919 now.
20+ - Python: Migrated to use "implicit namespace packages" instead of "declared
21+ namespaces" for the ``crate`` namespace package, see `PEP 420`_.
2022
2123
2224.. _Migrate from crate.client to sqlalchemy-cratedb: https://cratedb.com/docs/sqlalchemy-cratedb/migrate-from-crate-client.html
25+ .. _PEP 420: https://peps.python.org/pep-0420/
2326.. _sqlalchemy-cratedb: https://pypi.org/project/sqlalchemy-cratedb/
2427
2528
Original file line number Diff line number Diff line change 2222import os
2323import re
2424
25- from setuptools import find_packages , setup
25+ from setuptools import find_namespace_packages , setup
2626
2727
2828def read (path ):
@@ -45,15 +45,14 @@ def read(path):
4545 url = "https://github.com/crate/crate-python" ,
4646 author = "Crate.io" ,
474748- package_dir = {"" : "src" },
4948 description = "CrateDB Python Client" ,
5049 long_description = long_description ,
5150 long_description_content_type = "text/x-rst" ,
5251 platforms = ["any" ],
5352 license = "Apache License 2.0" ,
5453 keywords = "cratedb db api dbapi database sql http rdbms olap" ,
55- packages = find_packages ("src" ),
56- namespace_packages = [ "crate" ] ,
54+ packages = find_namespace_packages ("src" ),
55+ package_dir = { "" : "src" } ,
5756 install_requires = [
5857 "urllib3<2.3" ,
5958 "verlib2==0.2.0" ,
Original file line number Diff line number Diff line change 1- # -*- coding: utf-8; -*-
2- #
3- # Licensed to CRATE Technology GmbH ("Crate") under one or more contributor
4- # license agreements. See the NOTICE file distributed with this work for
5- # additional information regarding copyright ownership. Crate licenses
6- # this file to you under the Apache License, Version 2.0 (the "License");
7- # you may not use this file except in compliance with the License. You may
8- # obtain a copy of the License at
9- #
10- # http://www.apache.org/licenses/LICENSE-2.0
11- #
12- # Unless required by applicable law or agreed to in writing, software
13- # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14- # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15- # License for the specific language governing permissions and limitations
16- # under the License.
17- #
18- # However, if you have executed another commercial license agreement
19- # with Crate these terms will supersede the license and you may use the
20- # software solely pursuant to the terms of the relevant commercial agreement.
21-
22- # this is a namespace package
23- try :
24- import pkg_resources
25-
26- pkg_resources .declare_namespace (__name__ )
27- except ImportError :
28- import pkgutil
29-
30- __path__ = pkgutil .extend_path (__path__ , __name__ )
Original file line number Diff line number Diff line change 1- # package
You can’t perform that action at this time.
0 commit comments