Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-aws-xray-sdk for 
openSUSE:Factory checked in at 2026-10-23 20:26:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-aws-xray-sdk (Old)
 and      /work/SRC/openSUSE:Factory/.python-aws-xray-sdk.new.2252680 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-aws-xray-sdk"

Fri Oct 23 20:26:14 2026 rev:14 rq:1387167 version:2.15.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-aws-xray-sdk/python-aws-xray-sdk.changes  
2026-03-19 17:38:13.963936015 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-aws-xray-sdk.new.2252680/python-aws-xray-sdk.changes
     2026-10-23 20:26:37.974354932 +0200
@@ -1,0 +2,14 @@
+Sat Oct 17 15:17:23 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to 2.15.0:
+  * bugfix: Fix log stack overflow if metadata contains
+    circular references
+  * Add psycopg (v3) database backend in a new
+    python-aws-xray-sdk-psycopg subpackage
+  * Keep revert-trace.patch (still applies, lambda trace
+    header behavior unchanged upstream)
+  * Skip psycopg tests needing a live PostgreSQL and the
+    benchmark test importing pkg_resources
+  * Spec cleanup: drop obsolete Group tags
+
+-------------------------------------------------------------------

Old:
----
  aws-xray-sdk-python-2.14.0-gh.tar.gz

New:
----
  aws-xray-sdk-python-2.15.0-gh.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-aws-xray-sdk.spec ++++++
--- /var/tmp/diff_new_pack.wjBnWi/_old  2026-10-23 20:26:38.640382813 +0200
+++ /var/tmp/diff_new_pack.wjBnWi/_new  2026-10-23 20:26:38.642382897 +0200
@@ -24,7 +24,6 @@
 %define psuffix %{nil}
 %bcond_with test
 %endif
-
 %if 0%{?suse_version} >= 1550
 %bcond_with aiobotocore
 # gh#aws/aws-xray-sdk-python#359
@@ -33,45 +32,41 @@
 %bcond_without aiobotocore
 %bcond_without flask_sqlalchemy
 %endif
-
 %{?sle15_python_module_pythons}
 Name:           python-aws-xray-sdk%{?psuffix}
-Version:        2.14.0
+Version:        2.15.0
 Release:        0
 Summary:        The AWS X-Ray SDK for Python
 License:        Apache-2.0
-Group:          Development/Languages/Python
 URL:            https://github.com/aws/aws-xray-sdk-python
 Source:         
https://github.com/aws/aws-xray-sdk-python/archive/refs/tags/%{version}.tar.gz#/aws-xray-sdk-python-%{version}-gh.tar.gz
 Source9:        python-aws-xray-sdk-rpmlintrc
 # revert of 
https://github.com/aws/aws-xray-sdk-python/commit/7ec8c59e2d61d13cb223f50f6a4973c51f8c5da5
 Patch:          revert-trace.patch
-%if 0%{?suse_version} >= 1550
-BuildRequires:  %{python_module pip}
-BuildRequires:  %{python_module wheel}
-%endif
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-botocore >= 1.11.3
 Requires:       python-wrapt
+BuildArch:      noarch
+%if 0%{?suse_version} >= 1550
+BuildRequires:  %{python_module pip}
+BuildRequires:  %{python_module wheel}
+%endif
 %ifpython2
 Requires:       python-enum34
 Requires:       python-future
 %endif
 %if %{with test}
-BuildRequires:  %pythons
 BuildRequires:  %{python_module WebTest}
 BuildRequires:  %{python_module aws-xray-sdk = %{version}}
 BuildRequires:  %{python_module aws-xray-sdk-Django = %{version}}
 BuildRequires:  %{python_module aws-xray-sdk-Flask = %{version}}
-%if %{with flask_sqlalchemy}
-BuildRequires:  %{python_module aws-xray-sdk-Flask-SQLAlchemy = %{version}}
-%endif
 BuildRequires:  %{python_module aws-xray-sdk-SQLAlchemy = %{version}}
 BuildRequires:  %{python_module aws-xray-sdk-aiohttp = %{version}}
 BuildRequires:  %{python_module aws-xray-sdk-bottle = %{version}}
 BuildRequires:  %{python_module aws-xray-sdk-mysql-connector = %{version}}
+BuildRequires:  %{python_module aws-xray-sdk-psycopg = %{version}}
 BuildRequires:  %{python_module aws-xray-sdk-psycopg2 = %{version}}
 BuildRequires:  %{python_module aws-xray-sdk-pymongo = %{version}}
 BuildRequires:  %{python_module aws-xray-sdk-pynamodb = %{version}}
@@ -80,11 +75,14 @@
 BuildRequires:  %{python_module pytest-asyncio}
 BuildRequires:  %{python_module pytest-benchmark}
 BuildRequires:  %{python_module pytest}
+BuildRequires:  %{pythons}
+%if %{with flask_sqlalchemy}
+BuildRequires:  %{python_module aws-xray-sdk-Flask-SQLAlchemy = %{version}}
+%endif
 %if %{with aiobotocore}
 BuildRequires:  %{python_module aws-xray-sdk-aiobotocore = %{version}}
 %endif
 %endif
-BuildArch:      noarch
 %python_subpackages
 
 %description
@@ -103,7 +101,6 @@
 
 %package        all
 Summary:        Metapackage to pull in all AWS X-Ray SDK backends
-Group:          Metapackages
 Requires:       %{name} = %{version}
 Recommends:     %{name}-Django = %{version}
 Recommends:     %{name}-Flask = %{version}
@@ -113,6 +110,7 @@
 Recommends:     %{name}-aiohttp = %{version}
 Recommends:     %{name}-bottle = %{version}
 Recommends:     %{name}-mysql-connector = %{version}
+Recommends:     %{name}-psycopg = %{version}
 Recommends:     %{name}-psycopg2 = %{version}
 Recommends:     %{name}-pymongo = %{version}
 Recommends:     %{name}-pymysql = %{version}
@@ -127,7 +125,6 @@
 
 %package        Django
 Summary:        Django backend for the AWS X-Ray Python SDK
-Group:          Development/Languages/Python
 Requires:       %{name} = %{version}
 Requires:       python-Django >= 1.10
 
@@ -139,7 +136,6 @@
 
 %package        Flask
 Summary:        Flaks backend for the AWS X-Ray Python SDK
-Group:          Development/Languages/Python
 Requires:       %{name} = %{version}
 Requires:       python-Flask >= 0.10
 
@@ -152,7 +148,6 @@
 %if %{with flask_sqlalchemy}
 %package        Flask-SQLAlchemy
 Summary:        Flask-SQLAlchemy backend for the AWS X-Ray Python SDK
-Group:          Development/Languages/Python
 Requires:       %{name} = %{version}
 Requires:       %{name}-SQLAlchemy = %{version}
 Requires:       python-Flask >= 0.10
@@ -168,7 +163,6 @@
 
 %package        SQLAlchemy
 Summary:        SQLAlchemy backend for the AWS X-Ray Python SDK
-Group:          Development/Languages/Python
 Requires:       %{name} = %{version}
 Requires:       python-SQLAlchemy < 2
 
@@ -180,7 +174,6 @@
 
 %package        bottle
 Summary:        bottle backend for the AWS X-Ray Python SDK
-Group:          Development/Languages/Python
 Requires:       %{name} = %{version}
 Requires:       python-bottle >= 0.10
 
@@ -192,7 +185,6 @@
 
 %package        mysql-connector
 Summary:        mysql backend for the AWS X-Ray Python SDK
-Group:          Development/Languages/Python
 Requires:       %{name} = %{version}
 Requires:       python-mysql-connector-python
 
@@ -204,7 +196,6 @@
 
 %package        pymongo
 Summary:        pymongo backend for the AWS X-Ray Python SDK
-Group:          Development/Languages/Python
 Requires:       %{name} = %{version}
 Requires:       python-pymongo
 
@@ -216,7 +207,6 @@
 
 %package        pynamodb
 Summary:        pynamodb backend for the AWS X-Ray Python SDK
-Group:          Development/Languages/Python
 Requires:       %{name} = %{version}
 Requires:       python-pynamodb >= 3.3.1
 
@@ -226,9 +216,19 @@
 
 This package provides the pynamodb backend for %{name}.
 
+%package        psycopg
+Summary:        psycopg (v3) backend for the AWS X-Ray Python SDK
+Requires:       %{name} = %{version}
+Requires:       python-psycopg
+
+%description    psycopg
+The AWS X-Ray SDK for Python enables Python developers to record and
+emit information from within their applications to the AWS X-Ray service.
+
+This package provides the psycopg (v3) backend for %{name}.
+
 %package        psycopg2
 Summary:        psycopg2 backend for the AWS X-Ray Python SDK
-Group:          Development/Languages/Python
 Requires:       %{name} = %{version}
 Requires:       python-psycopg2
 
@@ -240,7 +240,6 @@
 
 %package        requests
 Summary:        requests backend for the AWS X-Ray Python SDK
-Group:          Development/Languages/Python
 Requires:       %{name} = %{version}
 Requires:       python-requests
 
@@ -252,7 +251,6 @@
 
 %package        aiobotocore
 Summary:        aiobotocore backend for the AWS X-Ray Python SDK
-Group:          Development/Languages/Python
 Requires:       %{name} = %{version}
 Requires:       python-aiobotocore
 
@@ -264,7 +262,6 @@
 
 %package        aiohttp
 Summary:        aiohttp backend for the AWS X-Ray Python SDK
-Group:          Development/Languages/Python
 Requires:       %{name} = %{version}
 Requires:       python-aiohttp >= 3.0
 
@@ -276,7 +273,6 @@
 
 %package        pymysql
 Summary:        pymysql backend for the AWS X-Ray Python SDK
-Group:          Development/Languages/Python
 Requires:       %{name} = %{version}
 Requires:       python-PyMySQL >= 1.0.0
 
@@ -321,6 +317,8 @@
 ignore_tests+=" --ignore tests/ext/pg8000/test_pg8000.py"
 # no testing.postgresql package
 ignore_tests+=" --ignore tests/ext/psycopg2/test_psycopg2.py"
+# needs psycopg_pool and a running PostgreSQL instance
+ignore_tests+=" --ignore tests/ext/psycopg/test_psycopg.py"
 ignore_tests+=" --ignore tests/ext/sqlalchemy_core/test_postgres.py"
 # no testing.myssqld package
 ignore_tests+=" --ignore tests/ext/pymysql/test_pymysql.py"
@@ -343,6 +341,9 @@
 ignore_tests+=" --ignore tests/test_async_local_storage.py"
 ignore_tests+=" --ignore tests/test_async_recorder.py"
 
+# benchmark-only test importing pkg_resources, removed from setuptools
+ignore_tests+=" --ignore tests/test_local_sampling_benchmark.py"
+
 # needs a running PyMySQL instance
 donttest="test_db_url_with_special_char"
 # https://github.com/aws/aws-xray-sdk-python/issues/321
@@ -363,6 +364,7 @@
 %exclude %{python_sitelib}/aws_xray_sdk/ext/flask/
 %exclude %{python_sitelib}/aws_xray_sdk/ext/flask_sqlalchemy/
 %exclude %{python_sitelib}/aws_xray_sdk/ext/mysql/
+%exclude %{python_sitelib}/aws_xray_sdk/ext/psycopg/
 %exclude %{python_sitelib}/aws_xray_sdk/ext/psycopg2/
 %exclude %{python_sitelib}/aws_xray_sdk/ext/pymongo/
 %exclude %{python_sitelib}/aws_xray_sdk/ext/pynamodb/
@@ -407,6 +409,10 @@
 %license LICENSE
 %{python_sitelib}/aws_xray_sdk/ext/pynamodb/
 
+%files %{python_files psycopg}
+%license LICENSE
+%{python_sitelib}/aws_xray_sdk/ext/psycopg/
+
 %files %{python_files psycopg2}
 %license LICENSE
 %{python_sitelib}/aws_xray_sdk/ext/psycopg2/

++++++ aws-xray-sdk-python-2.14.0-gh.tar.gz -> 
aws-xray-sdk-python-2.15.0-gh.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-xray-sdk-python-2.14.0/.github/workflows/IntegrationTesting.yaml 
new/aws-xray-sdk-python-2.15.0/.github/workflows/IntegrationTesting.yaml
--- old/aws-xray-sdk-python-2.14.0/.github/workflows/IntegrationTesting.yaml    
2024-06-05 00:18:10.000000000 +0200
+++ new/aws-xray-sdk-python-2.15.0/.github/workflows/IntegrationTesting.yaml    
2025-10-29 22:50:22.000000000 +0100
@@ -4,6 +4,10 @@
     branches:
       - master
 
+permissions:
+  id-token: write
+  contents: read
+
 jobs:
   build_SDK:
     name: Build X-Ray Python SDK
@@ -22,7 +26,7 @@
         run: python setup.py sdist
 
       - name: Upload SDK build artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: sdk-build-artifact
           path: .
@@ -41,7 +45,7 @@
           python-version: '3.8'
 
       - name: Download X-Ray SDK build artifact
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
           name: sdk-build-artifact
           path: ./sample-apps/flask
@@ -55,7 +59,7 @@
         working-directory: ./sample-apps/flask
 
       - name: Upload WebApp with X-Ray SDK build artifact
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: sdk-flask-build-artifact
           path: ./sample-apps/flask/deploy.zip
@@ -70,7 +74,7 @@
         uses: actions/checkout@v3
 
       - name: Download WebApp with X-Ray SDK build artifact
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
           name: sdk-flask-build-artifact
 
@@ -78,10 +82,9 @@
         run: cp deploy.zip ./terraform
 
       - name: Configure AWS Credentials
-        uses: aws-actions/configure-aws-credentials@v1
+        uses: aws-actions/configure-aws-credentials@v4
         with:
-          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
-          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+          role-to-assume: ${{ secrets.AWS_INTEG_TEST_ROLE_ARN }}
           aws-region: us-west-2
 
       - name: Setup Terraform
@@ -109,7 +112,7 @@
         working-directory: ./terraform
 
       - name: Upload terraform state files for destorying resources
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
           name: terraform-state-artifact
           path: ./terraform
@@ -126,10 +129,9 @@
           java-version: 14
 
       - name: Configure AWS Credentials
-        uses: aws-actions/configure-aws-credentials@v1
+        uses: aws-actions/configure-aws-credentials@v4
         with:
-          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
-          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+          role-to-assume: ${{ secrets.AWS_INTEG_TEST_ROLE_ARN }}
           aws-region: us-west-2
 
       - name: Checkout test framework
@@ -149,15 +151,14 @@
 
     steps:
       - name: Download terraform state artifact
-        uses: actions/download-artifact@v3
+        uses: actions/download-artifact@v4
         with:
           name: terraform-state-artifact
 
       - name: Configure AWS Credentials
-        uses: aws-actions/configure-aws-credentials@v1
+        uses: aws-actions/configure-aws-credentials@v4
         with:
-          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
-          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+          role-to-assume: ${{ secrets.AWS_INTEG_TEST_ROLE_ARN }}
           aws-region: us-west-2
 
       - name: Setup Terraform
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-xray-sdk-python-2.14.0/.github/workflows/Release.yaml 
new/aws-xray-sdk-python-2.15.0/.github/workflows/Release.yaml
--- old/aws-xray-sdk-python-2.14.0/.github/workflows/Release.yaml       
2024-06-05 00:18:10.000000000 +0200
+++ new/aws-xray-sdk-python-2.15.0/.github/workflows/Release.yaml       
2025-10-29 22:50:22.000000000 +0100
@@ -9,6 +9,8 @@
 
 jobs:
   release:
+    permissions:
+      contents: write
     runs-on: ubuntu-latest
     steps:
       - name: Checkout master branch
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-xray-sdk-python-2.14.0/.github/workflows/UnitTesting.yaml 
new/aws-xray-sdk-python-2.15.0/.github/workflows/UnitTesting.yaml
--- old/aws-xray-sdk-python-2.14.0/.github/workflows/UnitTesting.yaml   
2024-06-05 00:18:10.000000000 +0200
+++ new/aws-xray-sdk-python-2.15.0/.github/workflows/UnitTesting.yaml   
2025-10-29 22:50:22.000000000 +0100
@@ -1,4 +1,6 @@
 name: Unit Testing
+permissions:
+  contents: read
 on:
   push:
     branches:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-xray-sdk-python-2.14.0/.github/workflows/continuous-monitoring.yml 
new/aws-xray-sdk-python-2.15.0/.github/workflows/continuous-monitoring.yml
--- old/aws-xray-sdk-python-2.14.0/.github/workflows/continuous-monitoring.yml  
2024-06-05 00:18:10.000000000 +0200
+++ new/aws-xray-sdk-python-2.15.0/.github/workflows/continuous-monitoring.yml  
2025-10-29 22:50:22.000000000 +0100
@@ -4,6 +4,10 @@
   schedule:
     - cron:  '*/10 * * * *'
 
+permissions:
+  id-token: write
+  contents: read
+
 jobs:
   smoke-tests:
     name: Run smoke tests
@@ -13,10 +17,9 @@
         uses: actions/checkout@v3
       
       - name: Configure AWS Credentials
-        uses: aws-actions/configure-aws-credentials@v1
+        uses: aws-actions/configure-aws-credentials@v4
         with:
-          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
-          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+          role-to-assume: ${{ secrets.AWS_INTEG_TEST_ROLE_ARN }}
           aws-region: us-east-1
       
       - uses: actions/setup-python@v4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-xray-sdk-python-2.14.0/CHANGELOG.rst 
new/aws-xray-sdk-python-2.15.0/CHANGELOG.rst
--- old/aws-xray-sdk-python-2.14.0/CHANGELOG.rst        2024-06-05 
00:18:10.000000000 +0200
+++ new/aws-xray-sdk-python-2.15.0/CHANGELOG.rst        2025-10-29 
22:50:22.000000000 +0100
@@ -5,6 +5,10 @@
 Unreleased
 ==========
 
+2.15.0
+==========
+* bugfix: Fix log stack overflow if metadata contains circular reference 
`https://github.com/aws/aws-xray-sdk-python/pull/464`
+
 2.14.0
 ==========
 * bugfix: Fix warning message condition for subsegment ending 
`https://github.com/aws/aws-xray-sdk-python/pull/434`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-xray-sdk-python-2.14.0/README.md 
new/aws-xray-sdk-python-2.15.0/README.md
--- old/aws-xray-sdk-python-2.14.0/README.md    2024-06-05 00:18:10.000000000 
+0200
+++ new/aws-xray-sdk-python-2.15.0/README.md    2025-10-29 22:50:22.000000000 
+0100
@@ -1,17 +1,34 @@
 ![Build 
Status](https://github.com/aws/aws-xray-sdk-python/actions/workflows/IntegrationTesting.yaml/badge.svg)
 
[![codecov](https://codecov.io/gh/aws/aws-xray-sdk-python/branch/master/graph/badge.svg)](https://codecov.io/gh/aws/aws-xray-sdk-python)
 
-### :mega: OpenTelemetry Python with AWS X-Ray
+# AWS X-Ray SDK for Python
+
+## :mega: Upcoming Maintenance Mode on February 25, 2026
+
+[The AWS X-Ray SDKs will enter maintenance mode on **`February 25, 
2026`**][xray-sdk-daemon-timeline]. During maintenance mode, the X-Ray SDKs and 
Daemon will only receive critical bug fixes and security updates, and will not 
be updated to support new features.
+
+We recommend that you migrate to [AWS Distro for OpenTelemetry (ADOT) or 
OpenTelemetry Instrumentation][xray-otel-migration-docs] to generate traces 
(through manual or zero-code instrumentation) from your application and send 
them to AWS X-Ray. OpenTelemetry is the industry-wide standard for tracing 
instrumentation and observability. It has a large open-source community for 
support and provides more instrumentations and updates. By adopting an 
OpenTelemetry solution, developers can leverage the latest services and 
innovations from AWS CloudWatch.
+
+## :mega: End-of-Support on February 25, 2027
+
+[The AWS X-Ray SDKs will reach end-of-support on **`February 25, 
2027`**][xray-sdk-daemon-timeline]. After end-of-support, the X-Ray SDKs will 
no longer receive updates or releases. Previously published releases will 
continue to be available via public package managers and the source code will 
remain on GitHub.
+
+[xray-otel-migration-docs]: 
https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-migration.html
+[xray-sdk-daemon-timeline]: 
https://docs.aws.amazon.com/xray/latest/devguide/xray-daemon-eos.html
+
+-------------------------------------
+
+### OpenTelemetry Python with AWS X-Ray
 
 AWS X-Ray supports using OpenTelemetry Python and the AWS Distro for 
OpenTelemetry (ADOT) Collector to instrument your application and send trace 
data to X-Ray. The OpenTelemetry SDKs are an industry-wide standard for tracing 
instrumentation. They provide more instrumentations and have a larger community 
for support, but may not have complete feature parity with the X-Ray SDKs. See 
[choosing between the ADOT and X-Ray 
SDKs](https://docs.aws.amazon.com/xray/latest/devguide/xray-instrumenting-your-app.html#xray-instrumenting-choosing)
 for more help with choosing between the two.
 
 If you want additional features when tracing your Python applications, please 
[open an issue on the OpenTelemetry Python Instrumentation 
repository](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/new?labels=feature-request&template=feature_request.md&title=X-Ray%20Compatible%20Feature%20Request).
 
-### :mega: Python Versions End-of-Support Notice
+### Python Versions End-of-Support Notice
 
 AWS X-Ray SDK for Python versions `>2.11.0` has dropped support for Python 
2.7, 3.4, 3.5, and 3.6.
 
-# AWS X-Ray SDK for Python
+-------------------------------------
 
 ![Screenshot of the AWS X-Ray console](/images/example_servicemap.png?raw=true)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-xray-sdk-python-2.14.0/aws_xray_sdk/core/context.py 
new/aws-xray-sdk-python-2.15.0/aws_xray_sdk/core/context.py
--- old/aws-xray-sdk-python-2.14.0/aws_xray_sdk/core/context.py 2024-06-05 
00:18:10.000000000 +0200
+++ new/aws-xray-sdk-python-2.15.0/aws_xray_sdk/core/context.py 2025-10-29 
22:50:22.000000000 +0100
@@ -22,7 +22,7 @@
     replace the current stored entities and to clean up the storage.
 
     For any data access or data mutation, if there is no active segment present
-    if will use user-defined behavior to handle such case. By default it throws
+    it will use user-defined behavior to handle such case. By default it throws
     an runtime error.
 
     This data structure is thread-safe.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-xray-sdk-python-2.14.0/aws_xray_sdk/core/patcher.py 
new/aws-xray-sdk-python-2.15.0/aws_xray_sdk/core/patcher.py
--- old/aws-xray-sdk-python-2.14.0/aws_xray_sdk/core/patcher.py 2024-06-05 
00:18:10.000000000 +0200
+++ new/aws-xray-sdk-python-2.15.0/aws_xray_sdk/core/patcher.py 2025-10-29 
22:50:22.000000000 +0100
@@ -23,6 +23,7 @@
     'pymongo',
     'pymysql',
     'psycopg2',
+    'psycopg',
     'pg8000',
     'sqlalchemy_core',
     'httpx',
@@ -38,6 +39,7 @@
     'pymongo',
     'pymysql',
     'psycopg2',
+    'psycopg',
     'pg8000',
     'sqlalchemy_core',
     'httpx',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-xray-sdk-python-2.14.0/aws_xray_sdk/core/sampling/local/sampling_rule.py
 
new/aws-xray-sdk-python-2.15.0/aws_xray_sdk/core/sampling/local/sampling_rule.py
--- 
old/aws-xray-sdk-python-2.14.0/aws_xray_sdk/core/sampling/local/sampling_rule.py
    2024-06-05 00:18:10.000000000 +0200
+++ 
new/aws-xray-sdk-python-2.15.0/aws_xray_sdk/core/sampling/local/sampling_rule.py
    2025-10-29 22:50:22.000000000 +0100
@@ -5,7 +5,7 @@
 
 class SamplingRule:
     """
-    One SamolingRule represents one rule defined from local rule json file
+    One SamplingRule represents one rule defined from local rule json file
     or from a dictionary. It can be either a custom rule or default rule.
     """
     FIXED_TARGET = 'fixed_target'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-xray-sdk-python-2.14.0/aws_xray_sdk/core/utils/conversion.py 
new/aws-xray-sdk-python-2.15.0/aws_xray_sdk/core/utils/conversion.py
--- old/aws-xray-sdk-python-2.14.0/aws_xray_sdk/core/utils/conversion.py        
2024-06-05 00:18:10.000000000 +0200
+++ new/aws-xray-sdk-python-2.15.0/aws_xray_sdk/core/utils/conversion.py        
2025-10-29 22:50:22.000000000 +0100
@@ -30,6 +30,7 @@
             return metadata
         else:
             return obj
-    except Exception:
-        log.exception("Failed to convert metadata to dict")
+    except Exception as e:
+        import pprint
+        log.warning("Failed to convert metadata to dict:\n%s", 
pprint.pformat(getattr(e, "args", None)))
         return {}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-xray-sdk-python-2.14.0/aws_xray_sdk/ext/psycopg/__init__.py 
new/aws-xray-sdk-python-2.15.0/aws_xray_sdk/ext/psycopg/__init__.py
--- old/aws-xray-sdk-python-2.14.0/aws_xray_sdk/ext/psycopg/__init__.py 
1970-01-01 01:00:00.000000000 +0100
+++ new/aws-xray-sdk-python-2.15.0/aws_xray_sdk/ext/psycopg/__init__.py 
2025-10-29 22:50:22.000000000 +0100
@@ -0,0 +1,4 @@
+from .patch import patch
+
+
+__all__ = ['patch']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-xray-sdk-python-2.14.0/aws_xray_sdk/ext/psycopg/patch.py 
new/aws-xray-sdk-python-2.15.0/aws_xray_sdk/ext/psycopg/patch.py
--- old/aws-xray-sdk-python-2.14.0/aws_xray_sdk/ext/psycopg/patch.py    
1970-01-01 01:00:00.000000000 +0100
+++ new/aws-xray-sdk-python-2.15.0/aws_xray_sdk/ext/psycopg/patch.py    
2025-10-29 22:50:22.000000000 +0100
@@ -0,0 +1,37 @@
+import wrapt
+from operator import methodcaller
+
+from aws_xray_sdk.ext.dbapi2 import XRayTracedConn
+
+
+def patch():
+    wrapt.wrap_function_wrapper(
+        'psycopg',
+        'connect',
+        _xray_traced_connect
+    )
+
+    wrapt.wrap_function_wrapper(
+        'psycopg_pool.pool',
+        'ConnectionPool._connect',
+        _xray_traced_connect
+    )
+
+
+def _xray_traced_connect(wrapped, instance, args, kwargs):
+    conn = wrapped(*args, **kwargs)
+    parameterized_dsn = {c[0]: c[-1] for c in map(methodcaller('split', '='), 
conn.info.dsn.split(' '))}
+    meta = {
+        'database_type': 'PostgreSQL',
+        'url': 'postgresql://{}@{}:{}/{}'.format(
+            parameterized_dsn.get('user', 'unknown'),
+            parameterized_dsn.get('host', 'unknown'),
+            parameterized_dsn.get('port', 'unknown'),
+            parameterized_dsn.get('dbname', 'unknown'),
+        ),
+        'user': parameterized_dsn.get('user', 'unknown'),
+        'database_version': str(conn.info.server_version),
+        'driver_version': 'Psycopg 3'
+    }
+
+    return XRayTracedConn(conn, meta)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-xray-sdk-python-2.14.0/aws_xray_sdk/version.py 
new/aws-xray-sdk-python-2.15.0/aws_xray_sdk/version.py
--- old/aws-xray-sdk-python-2.14.0/aws_xray_sdk/version.py      2024-06-05 
00:18:10.000000000 +0200
+++ new/aws-xray-sdk-python-2.15.0/aws_xray_sdk/version.py      2025-10-29 
22:50:22.000000000 +0100
@@ -1 +1 @@
-VERSION = '2.14.0'
+VERSION = '2.15.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-xray-sdk-python-2.14.0/docs/conf.py 
new/aws-xray-sdk-python-2.15.0/docs/conf.py
--- old/aws-xray-sdk-python-2.14.0/docs/conf.py 2024-06-05 00:18:10.000000000 
+0200
+++ new/aws-xray-sdk-python-2.15.0/docs/conf.py 2025-10-29 22:50:22.000000000 
+0100
@@ -62,9 +62,9 @@
 # built documents.
 #
 # The short X.Y version.
-version = u'2.14.0'
+version = u'2.15.0'
 # The full version, including alpha/beta/rc tags.
-release = u'2.14.0'
+release = u'2.15.0'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
@@ -177,4 +177,6 @@
 
 
 # Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'https://docs.python.org/': None}
+intersphinx_mapping = {
+    'python': ('https://docs.python.org/', None),
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-xray-sdk-python-2.14.0/docs/index.rst 
new/aws-xray-sdk-python-2.15.0/docs/index.rst
--- old/aws-xray-sdk-python-2.14.0/docs/index.rst       2024-06-05 
00:18:10.000000000 +0200
+++ new/aws-xray-sdk-python-2.15.0/docs/index.rst       2025-10-29 
22:50:22.000000000 +0100
@@ -29,6 +29,7 @@
 * mysql-connector
 * pg8000
 * psycopg2
+* psycopg (psycopg3)
 * pymongo
 * pymysql
 * pynamodb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-xray-sdk-python-2.14.0/sample-apps/flask/requirements.txt 
new/aws-xray-sdk-python-2.15.0/sample-apps/flask/requirements.txt
--- old/aws-xray-sdk-python-2.14.0/sample-apps/flask/requirements.txt   
2024-06-05 00:18:10.000000000 +0200
+++ new/aws-xray-sdk-python-2.15.0/sample-apps/flask/requirements.txt   
2025-10-29 22:50:22.000000000 +0100
@@ -1,11 +1,11 @@
 boto3==1.34.26
-certifi==2023.11.17
+certifi==2024.7.4
 chardet==5.2.0
 Flask==2.3.3
 idna==3.7
 requests==2.32.0
-urllib3==1.26.18
-Werkzeug==3.0.3
+urllib3==1.26.19
+Werkzeug==3.0.6
 flask-sqlalchemy==2.5.1
 SQLAlchemy==1.4
 aws_xray_sdk==2.6.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/aws-xray-sdk-python-2.14.0/tests/ext/psycopg/test_psycopg.py 
new/aws-xray-sdk-python-2.15.0/tests/ext/psycopg/test_psycopg.py
--- old/aws-xray-sdk-python-2.14.0/tests/ext/psycopg/test_psycopg.py    
1970-01-01 01:00:00.000000000 +0100
+++ new/aws-xray-sdk-python-2.15.0/tests/ext/psycopg/test_psycopg.py    
2025-10-29 22:50:22.000000000 +0100
@@ -0,0 +1,136 @@
+import psycopg
+import psycopg.sql
+import psycopg_pool
+
+import pytest
+import testing.postgresql
+
+from aws_xray_sdk.core import patch
+from aws_xray_sdk.core import xray_recorder
+from aws_xray_sdk.core.context import Context
+
+patch(('psycopg',))
+
+
[email protected](autouse=True)
+def construct_ctx():
+    """
+    Clean up context storage on each test run and begin a segment
+    so that later subsegment can be attached. After each test run
+    it cleans up context storage again.
+    """
+    xray_recorder.configure(service='test', sampling=False, context=Context())
+    xray_recorder.clear_trace_entities()
+    xray_recorder.begin_segment('name')
+    yield
+    xray_recorder.clear_trace_entities()
+
+
+def test_execute_dsn_kwargs():
+    q = 'SELECT 1'
+    with testing.postgresql.Postgresql() as postgresql:
+        url = postgresql.url()
+        dsn = postgresql.dsn()
+        conn = psycopg.connect(dbname=dsn['database'],
+                                user=dsn['user'],
+                                password='',
+                                host=dsn['host'],
+                                port=dsn['port'])
+        cur = conn.cursor()
+        cur.execute(q)
+
+    subsegment = xray_recorder.current_segment().subsegments[0]
+    assert subsegment.name == 'execute'
+    sql = subsegment.sql
+    assert sql['database_type'] == 'PostgreSQL'
+    assert sql['user'] == dsn['user']
+    assert sql['url'] == url
+    assert sql['database_version']
+
+
+def test_execute_dsn_string():
+    q = 'SELECT 1'
+    with testing.postgresql.Postgresql() as postgresql:
+        url = postgresql.url()
+        dsn = postgresql.dsn()
+        conn = psycopg.connect('dbname=' + dsn['database'] +
+                                ' password=mypassword' +
+                                ' host=' + dsn['host'] +
+                                ' port=' + str(dsn['port']) +
+                                ' user=' + dsn['user'])
+        cur = conn.cursor()
+        cur.execute(q)
+
+    subsegment = xray_recorder.current_segment().subsegments[0]
+    assert subsegment.name == 'execute'
+    sql = subsegment.sql
+    assert sql['database_type'] == 'PostgreSQL'
+    assert sql['user'] == dsn['user']
+    assert sql['url'] == url
+    assert sql['database_version']
+
+
+def test_execute_in_pool():
+    q = 'SELECT 1'
+    with testing.postgresql.Postgresql() as postgresql:
+        url = postgresql.url()
+        dsn = postgresql.dsn()
+        pool = psycopg_pool.ConnectionPool('dbname=' + dsn['database'] +
+                                            ' password=mypassword' +
+                                            ' host=' + dsn['host'] +
+                                            ' port=' + str(dsn['port']) +
+                                            ' user=' + dsn['user'],
+                                            min_size=1,
+                                            max_size=1)
+        with pool.connection() as conn:
+            cur = conn.cursor()
+            cur.execute(q)
+
+    subsegment = xray_recorder.current_segment().subsegments[0]
+    assert subsegment.name == 'execute'
+    sql = subsegment.sql
+    assert sql['database_type'] == 'PostgreSQL'
+    assert sql['user'] == dsn['user']
+    assert sql['url'] == url
+    assert sql['database_version']
+
+
+def test_execute_bad_query():
+    q = 'SELECT blarg'
+    with testing.postgresql.Postgresql() as postgresql:
+        url = postgresql.url()
+        dsn = postgresql.dsn()
+        conn = psycopg.connect(dbname=dsn['database'],
+                                user=dsn['user'],
+                                password='',
+                                host=dsn['host'],
+                                port=dsn['port'])
+        cur = conn.cursor()
+        try:
+            cur.execute(q)
+        except Exception:
+            pass
+
+    subsegment = xray_recorder.current_segment().subsegments[0]
+    assert subsegment.name == 'execute'
+    sql = subsegment.sql
+    assert sql['database_type'] == 'PostgreSQL'
+    assert sql['user'] == dsn['user']
+    assert sql['url'] == url
+    assert sql['database_version']
+
+    exception = subsegment.cause['exceptions'][0]
+    assert exception.type == 'UndefinedColumn'
+
+def test_query_as_string():
+    with testing.postgresql.Postgresql() as postgresql:
+        url = postgresql.url()
+        dsn = postgresql.dsn()
+        conn = psycopg.connect('dbname=' + dsn['database'] +
+                                ' password=mypassword' +
+                                ' host=' + dsn['host'] +
+                                ' port=' + str(dsn['port']) +
+                                ' user=' + dsn['user'])
+        test_sql = psycopg.sql.Identifier('test')
+        assert test_sql.as_string(conn)
+        assert test_sql.as_string(conn.cursor())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-xray-sdk-python-2.14.0/tests/util.py 
new/aws-xray-sdk-python-2.15.0/tests/util.py
--- old/aws-xray-sdk-python-2.14.0/tests/util.py        2024-06-05 
00:18:10.000000000 +0200
+++ new/aws-xray-sdk-python-2.15.0/tests/util.py        2025-10-29 
22:50:22.000000000 +0100
@@ -4,6 +4,14 @@
 from aws_xray_sdk.core.recorder import AWSXRayRecorder
 from aws_xray_sdk.core.emitters.udp_emitter import UDPEmitter
 from aws_xray_sdk.core.sampling.sampler import DefaultSampler
+from aws_xray_sdk.core.utils.conversion import metadata_to_dict
+
+
+class CircularReferenceClass:
+    """Test class that can create circular references"""
+    def __init__(self, name):
+        self.name = name
+        self.ref = None
 
 
 class StubbedEmitter(UDPEmitter):
@@ -99,3 +107,15 @@
                     if result is not None:
                         return result
     return None
+
+
+def test_metadata_to_dict_self_reference():
+    """Test that self-referencing objects don't cause stack overflow"""
+    obj = CircularReferenceClass("self_ref")
+    obj.ref = obj  # Self reference
+    
+    # This should not cause stack overflow
+    result = metadata_to_dict(obj)
+    
+    # The function should handle the self reference gracefully
+    assert isinstance(result, dict)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-xray-sdk-python-2.14.0/tox.ini 
new/aws-xray-sdk-python-2.15.0/tox.ini
--- old/aws-xray-sdk-python-2.14.0/tox.ini      2024-06-05 00:18:10.000000000 
+0200
+++ new/aws-xray-sdk-python-2.15.0/tox.ini      2025-10-29 22:50:22.000000000 
+0100
@@ -30,6 +30,8 @@
 
     py{37,38,39,310,311,312}-ext-psycopg2
 
+    py{37,38,39,310,311}-ext-psycopg
+    
     py{37,38,39,310,311,312}-ext-pymysql
 
     py{37,38,39,310,311,312}-ext-pynamodb
@@ -47,9 +49,9 @@
 
 deps =
     ; Testing packages
-    pytest > 3.0.0
+    pytest > 3.0.0, < 8.0.0
     pytest-benchmark
-    coverage == 4.5.4
+    coverage == 7.2.7
     codecov
 
     ; Packages common to all test environments
@@ -65,7 +67,7 @@
     ext-aiobotocore: pytest-asyncio
 
     ext-aiohttp: aiohttp >= 3.3.0
-    ext-aiohttp: pytest-aiohttp
+    ext-aiohttp: pytest-aiohttp < 1.1.0
 
     ext-httpx: httpx >= 0.20
     ext-httpx: pytest-asyncio >= 0.19
@@ -99,6 +101,10 @@
     ext-psycopg2: psycopg2
     ext-psycopg2: testing.postgresql
 
+    ext-psycopg: psycopg
+    ext-psycopg: psycopg[pool]
+    ext-psycopg: testing.postgresql
+
     ext-pg8000: pg8000 <= 1.20.0
     ext-pg8000: testing.postgresql
 
@@ -136,6 +142,8 @@
     ext-pg8000: coverage run --append --source aws_xray_sdk -m pytest 
tests/ext/pg8000 {posargs}
 
     ext-psycopg2: coverage run --append --source aws_xray_sdk -m pytest 
tests/ext/psycopg2 {posargs}
+    
+    ext-psycopg: coverage run --append --source aws_xray_sdk -m pytest 
tests/ext/psycopg {posargs}
 
     ext-pymysql: coverage run --append --source aws_xray_sdk -m pytest 
tests/ext/pymysql {posargs}
 

Reply via email to