From 6e097a876e7a0b2f3968bcc849907c4f96c446a0 Mon Sep 17 00:00:00 2001
From: Alexander Smorkalov <alexander.smorkalov@xperience.ai>
Date: Fri, 3 Feb 2023 09:38:34 +0300
Subject: [PATCH 1/3] Docs and meta information update for release.

---
 .github/workflows/build_wheels_macos.yml | 2 +-
 README.md                                | 3 ++-
 setup.py                                 | 5 +++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/build_wheels_macos.yml b/.github/workflows/build_wheels_macos.yml
index 43f98c7f..df60217d 100644
--- a/.github/workflows/build_wheels_macos.yml
+++ b/.github/workflows/build_wheels_macos.yml
@@ -48,7 +48,7 @@ jobs:
       SDIST: ${{ matrix.build_sdist || 0 }}
       ENABLE_HEADLESS: ${{ matrix.without_gui }}
       ENABLE_CONTRIB: ${{ matrix.with_contrib }}
-      MACOSX_DEPLOYMENT_TARGET: 10.13
+      MACOSX_DEPLOYMENT_TARGET: '11.0'
     steps:
     - name: Cleanup
       run: find . -mindepth 1 -delete
diff --git a/README.md b/README.md
index bd818bc1..78861466 100644
--- a/README.md
+++ b/README.md
@@ -216,11 +216,11 @@ The default ``manylinux2014`` images have been extended with some OpenCV depende
 
 Python 3.x compatible pre-built wheels are provided for the officially supported Python versions (not in EOL):
 
-- 3.6
 - 3.7
 - 3.8
 - 3.9
 - 3.10
+- 3.11
 
 ### Backward compatibility
 
@@ -228,3 +228,4 @@ Starting from 4.2.0 and 3.4.9 builds the macOS Travis build environment was upda
 
 Starting from 4.3.0 and 3.4.10 builds the Linux build environment was updated from `manylinux1` to `manylinux2014`. This dropped support for old Linux distributions.
 
+Starting from version 4.7.0 the Mac OS Github Actions build environment was update to version 11. Mac OS 10.x support depricated. See https://github.com/actions/runner-images/issues/5583
diff --git a/setup.py b/setup.py
index a5f5fc0e..123bb83a 100644
--- a/setup.py
+++ b/setup.py
@@ -262,7 +262,7 @@ def main():
         name=package_name,
         version=package_version,
         url="https://github.com/opencv/opencv-python",
-        license="MIT",
+        license="Apache 2.0",
         description="Wrapper package for OpenCV python bindings.",
         long_description=long_description,
         long_description_content_type="text/markdown",
@@ -279,7 +279,7 @@ def main():
             "Intended Audience :: Education",
             "Intended Audience :: Information Technology",
             "Intended Audience :: Science/Research",
-            "License :: OSI Approved :: MIT License",
+            "License :: OSI Approved :: Apache 2.0",
             "Operating System :: MacOS",
             "Operating System :: Microsoft :: Windows",
             "Operating System :: POSIX",
@@ -292,6 +292,7 @@ def main():
             "Programming Language :: Python :: 3.8",
             "Programming Language :: Python :: 3.9",
             "Programming Language :: Python :: 3.10",
+            "Programming Language :: Python :: 3.11",
             "Programming Language :: C++",
             "Programming Language :: Python :: Implementation :: CPython",
             "Topic :: Scientific/Engineering",

From 352caf14261e427faf688bc2fe0b7e3d99b88a3f Mon Sep 17 00:00:00 2001
From: Alexander Smorkalov <alexander.smorkalov@xperience.ai>
Date: Tue, 7 Feb 2023 10:09:32 +0300
Subject: [PATCH 2/3] Use default deployment target on Mac OS x64.

---
 .github/workflows/build_wheels_macos.yml | 1 -
 README.md                                | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/.github/workflows/build_wheels_macos.yml b/.github/workflows/build_wheels_macos.yml
index df60217d..1defd1e5 100644
--- a/.github/workflows/build_wheels_macos.yml
+++ b/.github/workflows/build_wheels_macos.yml
@@ -48,7 +48,6 @@ jobs:
       SDIST: ${{ matrix.build_sdist || 0 }}
       ENABLE_HEADLESS: ${{ matrix.without_gui }}
       ENABLE_CONTRIB: ${{ matrix.with_contrib }}
-      MACOSX_DEPLOYMENT_TARGET: '11.0'
     steps:
     - name: Cleanup
       run: find . -mindepth 1 -delete
diff --git a/README.md b/README.md
index 78861466..60cdebea 100644
--- a/README.md
+++ b/README.md
@@ -228,4 +228,4 @@ Starting from 4.2.0 and 3.4.9 builds the macOS Travis build environment was upda
 
 Starting from 4.3.0 and 3.4.10 builds the Linux build environment was updated from `manylinux1` to `manylinux2014`. This dropped support for old Linux distributions.
 
-Starting from version 4.7.0 the Mac OS Github Actions build environment was update to version 11. Mac OS 10.x support depricated. See https://github.com/actions/runner-images/issues/5583
+Starting from version 4.7.0 the Mac OS GitHub Actions build environment was update to version 11. Mac OS 10.x support depricated. See https://github.com/actions/runner-images/issues/5583

From 277cab960f6a349744be2f2bffb8155faed538f7 Mon Sep 17 00:00:00 2001
From: Alexander Smorkalov <alexander.smorkalov@xperience.ai>
Date: Mon, 20 Feb 2023 10:46:11 +0300
Subject: [PATCH 3/3] Fixed numpy dependency issue with Python 3.11.

---
 pyproject.toml | 5 +++--
 setup.py       | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/pyproject.toml b/pyproject.toml
index fa0c3a32..659bbf03 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -8,6 +8,7 @@ requires = [
   "numpy==1.19.3; python_version<='3.9' and sys_platform == 'linux' and platform_machine == 'aarch64'",
   "numpy==1.21.0; python_version<='3.9' and sys_platform == 'darwin' and platform_machine == 'arm64'",
   "numpy==1.19.3; python_version=='3.9' and platform_machine != 'aarch64' and platform_machine != 'arm64'",
-  "numpy==1.21.2; python_version>='3.10' and platform_system!='Darwin'",
-  "numpy==1.21.4; python_version>='3.10' and platform_system=='Darwin'"
+  "numpy==1.21.2; python_version=='3.10' and platform_system!='Darwin'",
+  "numpy==1.21.4; python_version=='3.10' and platform_system=='Darwin'",
+  "numpy==1.22.0; python_version>='3.11'"
 ]
diff --git a/setup.py b/setup.py
index 123bb83a..e0e3ed31 100644
--- a/setup.py
+++ b/setup.py
@@ -32,6 +32,7 @@ def main():
         'numpy>=1.19.3; python_version>="3.6" and platform_system=="Linux" and platform_machine=="aarch64"',
         'numpy>=1.21.0; python_version<="3.9" and platform_system=="Darwin" and platform_machine=="arm64"',
         'numpy>=1.21.4; python_version>="3.10" and platform_system=="Darwin"',
+        "numpy>=1.22.0; python_version>='3.11'"
     ]
 
     python_version = cmaker.CMaker.get_python_version()