Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python 3.7 regex change breaks postgresql COLLATE #4208

Closed
sqlalchemy-bot opened this issue Mar 5, 2018 · 5 comments
Closed

python 3.7 regex change breaks postgresql COLLATE #4208

sqlalchemy-bot opened this issue Mar 5, 2018 · 5 comments
Labels
bug Something isn't working high priority postgresql
Milestone

Comments

@sqlalchemy-bot
Copy link
Collaborator

Migrated issue, originally created by Michael Bayer (@zzzeek)

see https://bugs.python.org/issue32998

patch:

diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index 0cc7c307f..5ae27a996 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -1967,7 +1967,8 @@ class PGTypeCompiler(compiler.GenericTypeCompiler):
                 "[]" *
                 (type_.dimensions if type_.dimensions is not None else 1)
             )),
-            inner
+            inner,
+            count=1
         )
 

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

this was first in #4006

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

Only replace first occurrence for COLLATE/ARRAY syntax

Fixed bug in Postgresql COLLATE / ARRAY adjustment first introduced
in 🎫4006 where new behaviors in Python 3.7 regular expressions
caused the fix to fail.

Change-Id: Ied3893d7cac210befa0277b55b3b895b0ba1f0d2
Fixes: #4208

dc117f8

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

Only replace first occurrence for COLLATE/ARRAY syntax

Fixed bug in Postgresql COLLATE / ARRAY adjustment first introduced
in 🎫4006 where new behaviors in Python 3.7 regular expressions
caused the fix to fail.

Change-Id: Ied3893d7cac210befa0277b55b3b895b0ba1f0d2
Fixes: #4208
(cherry picked from commit 7300469)

cc6ec00

@sqlalchemy-bot
Copy link
Collaborator Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

@sqlalchemy-bot
Copy link
Collaborator Author

Michael Bayer (@zzzeek) wrote:

Only replace first occurrence for COLLATE/ARRAY syntax

Fixed bug in Postgresql COLLATE / ARRAY adjustment first introduced
in 🎫4006 where new behaviors in Python 3.7 regular expressions
caused the fix to fail.

Change-Id: Ied3893d7cac210befa0277b55b3b895b0ba1f0d2
Fixes: #4208

7300469

@sqlalchemy-bot sqlalchemy-bot added this to the 1.1.x milestone Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority postgresql
Projects
None yet
Development

No branches or pull requests

1 participant