[Django] #33817: Use python-oracledb instead of cx-oracle

148 views
Skip to first unread message

Django

unread,
Jul 1, 2022, 6:18:21 AM7/1/22
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-----------------------------------------+------------------------
Reporter: GamePad64 | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: dev
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
There is a new library for Oracle databases: https://oracle.github.io
/python-oracledb/.
It is intended to replace cx-oracle eventually, and it is fully compatible
with it. It supports so-called “thin” mode, which can be used without
installing Oracle binary client libraries.
That could be beneficial in some scenarios.

--
Ticket URL: <https://code.djangoproject.com/ticket/33817>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 1, 2022, 6:28:28 AM7/1/22
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: GamePad64 | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* cc: Florian Apolloner, Christopher Jones (added)
* keywords: => oracle
* type: Uncategorized => New feature
* component: Uncategorized => Database layer (models, ORM)
* stage: Unreviewed => Accepted


Comment:

Thanks for the report, see the [https://groups.google.com/g/django-
developers/c/Zrq94HLxp0k django-developers thread] for a discussion of
potential ways to move this forward:

> I'd prefer adding support for `python-oracledb` in Django 4.2 and
immediately deprecate using `cx_Oracle` (will be removed in Django 5.1).

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:1>

Django

unread,
Jul 27, 2022, 6:17:20 AM7/27/22
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: petronny
Type: New feature | Status: assigned

Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: new => assigned
* needs_better_patch: 0 => 1
* needs_tests: 0 => 1
* owner: nobody => petronny
* needs_docs: 0 => 1
* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/15841 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:2>

Django

unread,
Jul 29, 2022, 3:06:37 PM7/29/22
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: petronny
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Colin Murtaugh):

* cc: Colin Murtaugh (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:3>

Django

unread,
Sep 26, 2022, 1:53:18 AM9/26/22
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: petronny
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by petronny):

* needs_better_patch: 1 => 0
* needs_tests: 1 => 0
* needs_docs: 1 => 0


Comment:

I've fixed the patch, tests and documentation. And this ticket is now
ready for review.

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:4>

Django

unread,
Sep 29, 2022, 1:40:14 AM9/29/22
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li

Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Suraj Shaw):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:5>

Django

unread,
Oct 27, 2022, 7:40:53 AM10/27/22
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Marti Raudsepp):

* cc: Marti Raudsepp (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:6>

Django

unread,
Dec 28, 2022, 3:46:50 AM12/28/22
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1

* stage: Ready for checkin => Accepted


* needs_tests: 0 => 1

* needs_docs: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:7>

Django

unread,
Mar 8, 2023, 3:22:53 AM3/8/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jingbei Li):

* needs_better_patch: 1 => 0

* needs_docs: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:8>

Django

unread,
Mar 28, 2023, 2:01:09 PM3/28/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Suraj Shaw):

* needs_tests: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:9>

Django

unread,
Mar 28, 2023, 2:01:57 PM3/28/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Suraj Shaw):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:10>

Django

unread,
Mar 29, 2023, 2:34:49 AM3/29/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 0 => 1
* stage: Ready for checkin => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:11>

Django

unread,
Apr 3, 2023, 2:03:14 PM4/3/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Suraj Shaw):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:12>

Django

unread,
Apr 3, 2023, 2:12:33 PM4/3/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Ready for checkin => Accepted


Comment:

Suraj, why did you changed the status? Oracle tests still crash with this
patch, it's not
[https://docs.djangoproject.com/en/stable/internals/contributing/triaging-
tickets/#ready-for-checkin "ready for checkin"].

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:13>

Django

unread,
May 18, 2023, 2:20:41 AM5/18/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Suraj Shaw):

@Mariusz Felisiak I tested this patch for oracle tests and i am not seeing
any error with 19c db as well as 21c. Shall we change the status from
accepted to ready for checkin?

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:14>

Django

unread,
May 18, 2023, 2:25:49 AM5/18/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

Replying to [comment:14 Suraj Shaw]:


> @Mariusz Felisiak I tested this patch for oracle tests and i am not
seeing any error with 19c db as well as 21c. Shall we change the status
from accepted to ready for checkin?

It crashes on our setup, so it's not ready. We cannot permanently break
our CI.

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:15>

Django

unread,
May 22, 2023, 3:36:17 AM5/22/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Suraj Shaw):

Replying to [comment:15 Mariusz Felisiak]:


> Replying to [comment:14 Suraj Shaw]:
> > @Mariusz Felisiak I tested this patch for oracle tests and i am not
seeing any error with 19c db as well as 21c. Shall we change the status
from accepted to ready for checkin?
>
> It crashes on our setup, so it's not ready. We cannot permanently break
our CI.

In the setup integration it seems to be using 19c db. Shall we look out to
upgrade it to 23c. It may or may not resolve the crash issue but it may be
needed at some stage anyway.

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:16>

Django

unread,
May 22, 2023, 3:56:33 AM5/22/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

> In the setup integration it seems to be using 19c db. Shall we look out
to upgrade it to 23c. It may or may not resolve the crash issue but it may
be needed at some stage anyway.

Oracle 19c will be supported 4 more years, so I see no reason to bump it
now. First of all it's really time-consuming (at least few days of my
work). Secondly Oracle 23c is not officially supported by `python-
oracledb` or `cx_Oracle`.

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:17>

Django

unread,
May 23, 2023, 10:56:27 PM5/23/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Suraj Shaw):

Replying to [comment:17 Mariusz Felisiak]:


> > In the setup integration it seems to be using 19c db. Shall we look
out to upgrade it to 23c. It may or may not resolve the crash issue but it
may be needed at some stage anyway.
>
> Oracle 19c will be supported 4 more years, so I see no reason to bump it
now. First of all it's really time-consuming (at least few days of my
work). Secondly Oracle 23c is not officially supported by `python-
oracledb` or `cx_Oracle`.

Oracle 23c is officially supported and i guess it may help us to get past
the crash impasse.

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:18>

Django

unread,
May 23, 2023, 11:19:59 PM5/23/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

> Oracle 23c is officially supported and i guess it may help us to get
past the crash impasse.

Again, Oracle 19c will be supported 4 more years, so I see no reason to
bump it now. We cannot drop support for it just because we don't know why
it crashes with this patch.

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:19>

Django

unread,
Jun 15, 2023, 6:13:07 AM6/15/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Suraj Shaw):

@Mariusz Felisiak Any leads how shall we proceed further to this PR to
land it as soon as possible since its quite long we have been waiting for
this feature to be present in django.

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:20>

Django

unread,
Jun 15, 2023, 7:29:46 AM6/15/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Florian Apolloner):

Replying to [comment:20 Suraj Shaw]:


> @Mariusz Felisiak Any leads how shall we proceed further to this PR to
land it as soon as possible since its quite long we have been waiting for
this feature to be present in django.

As Mariusz already pointed out more than once: Oracle 19c is and still
will be supported for a while. So you will need to fix the PR for Oracle
19, once that is done it can get reviewed.

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:21>

Django

unread,
Jun 15, 2023, 8:23:17 AM6/15/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Christopher Jones):

It's not easy to fix something that doesn't reproduce, and where log files
are not available !

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:22>

Django

unread,
Jun 15, 2023, 9:44:54 AM6/15/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Florian Apolloner):

Which logs would be needed? The CI job logs are public. If you think it is
in the Oracle logs, please tell us which logs would be relevant or which
config changes would be required to obtain the necessary logs, then it
would be easier for the people having access to help you.

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:23>

Django

unread,
Jun 16, 2023, 2:08:51 AM6/16/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Christopher Jones):

We (Oracle) can assist on a live session if we can get someone who can
handle the Django infrastructure questions. We span a few timezones.
What's convenient? Send me email addresses (mine is in my profile
https://github.com/cjbj) to invite.

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:24>

Django

unread,
Jun 17, 2023, 12:41:48 PM6/17/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Florian Apolloner):

@MarkusH: Can you or someone else from ops help out here (another option
would be to temporarily give me access to the CI boxes again)?

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:25>

Django

unread,
Jun 20, 2023, 12:04:33 AM6/20/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

I can take a look but not in June, maybe in July or August. It's not high
on my priority list. I've already spent too much time in June keeping the
Oracle backend as functional as the others. As far as I'm aware, it's an
issue in `python-oracledb` or one of the libraries it uses. Of course, we
will help you (Oracle) with debugging, even considering the fact that
you've never helped us maintain the Oracle backend by providing
infrastructure, knowledge, or money. You have to wait patiently like
everyone else. It's an open-source.

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:26>

Django

unread,
Jun 20, 2023, 1:47:40 AM6/20/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Suraj Shaw):

After following the logs that has been uploaded , it looks like it is
crashing inside the code that is displaying all of the variables in the
stack. In the debugging code if it can be disabled it may help us to find
out what the real issue is.

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:27>

Django

unread,
Aug 9, 2023, 4:19:05 AM8/9/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:28>

Django

unread,
Aug 10, 2023, 4:18:53 AM8/10/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: oracle | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:29>

Django

unread,
Aug 10, 2023, 6:07:12 AM8/10/23
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: closed

Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: oracle | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"9946f0b0d9356b55e819f861b31615fa5b548f99" 9946f0b]:
{{{
#!CommitTicketReference repository=""
revision="9946f0b0d9356b55e819f861b31615fa5b548f99"
Fixed #33817 -- Added support for python-oracledb and deprecated
cx_Oracle.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:30>

Django

unread,
May 10, 2024, 9:17:49 AM5/10/24
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: oracle | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Peter Bittner):

AFAICS, this change is implemented
[https://github.com/django/django/blob/stable/5.0.x/django/db/backends/oracle/oracledb_any.py
for Django 5+ only], for the moment.

We need to run a Django 4.2 LTS application with Oracle on Python 3.9 on a
RHEL 8.9 host. We could upgrade to Django 5.0, but it requires Python >=
3.10, which we don't have available.

Are there any plans to backport this change to 4.2 LTS?
--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:31>

Django

unread,
May 10, 2024, 9:39:48 AM5/10/24
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: oracle | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Marti Raudsepp):

@Peter I doubt the Django project will help you here.

The `python-oracledb` documentation contains instructions how to replace
`cx_Oracle` module with `oracledb`. I used this for some time with Django
4.2 in development environments without problems (but never in
production). https://python-
oracledb.readthedocs.io/en/latest/user_guide/appendix_c.html#python-
frameworks-sql-generators-and-orms

Alternatively, it's possible to extract the `django.db.backends.oracle` DB
backend package from Django 5.0 and use it with Django 4.2. Of course this
may be a more complicated task, as there were likely DB backend API
changes between 5.0 and 4.2.
--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:32>

Django

unread,
May 10, 2024, 11:06:51 AM5/10/24
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: oracle | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jingbei Li):

@Peter If you are not afraid of breaking things, you can check some
earlier commit of that PR.

For example, the very first commit can just be used as a dirty workaround.

{{{
From 0ee2e12252c0eb8b735ad99bb834d4122847f246 Mon Sep 17 00:00:00 2001
From: Jingbei Li <i...@jingbei.li>
Date: Tue, 12 Jul 2022 14:22:40 +0800
Subject: [PATCH] added oracledb support

---
django/db/backends/oracle/base.py | 7 +++++--
django/db/backends/oracle/introspection.py | 5 ++++-
2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/django/db/backends/oracle/base.py
b/django/db/backends/oracle/base.py
index 2ccd3bc0286da..a38bf0421c669 100644
--- a/django/db/backends/oracle/base.py
+++ b/django/db/backends/oracle/base.py
@@ -49,9 +49,12 @@ def _setup_environment(environ):


try:
- import cx_Oracle as Database
+ import oracledb as Database
except ImportError as e:
- raise ImproperlyConfigured("Error loading cx_Oracle module: %s" % e)
+ try:
+ import cx_Oracle as Database
+ except ImportError as e:
+ raise ImproperlyConfigured("Error loading oracledb or cx_Oracle
module: %s" % e)

# Some of these import cx_Oracle, so import them after checking if it's
installed.
from .client import DatabaseClient # NOQA
diff --git a/django/db/backends/oracle/introspection.py
b/django/db/backends/oracle/introspection.py
index ce743b291d74b..d4b10f0afab65 100644
--- a/django/db/backends/oracle/introspection.py
+++ b/django/db/backends/oracle/introspection.py
@@ -1,6 +1,9 @@
from collections import namedtuple

-import cx_Oracle
+try:
+ import oracledb as cx_Oracle
+except ImportError:
+ import cx_Oracle

from django.db import models
from django.db.backends.base.introspection import
BaseDatabaseIntrospection
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:33>

Django

unread,
Sep 9, 2024, 8:08:57 AM9/9/24
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: oracle | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"cdbd31960e0cf41063b3efac97292ee0ccc262bb" cdbd3196]:
{{{#!CommitTicketReference repository=""
revision="cdbd31960e0cf41063b3efac97292ee0ccc262bb"
Refs #33817 -- Corrected errors raised when Oracle driver is not
installed.

oracledb_any should reraise ImportError instead of raising
ImproperlyConfigured.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:34>

Django

unread,
Jan 15, 2025, 4:28:48 PMJan 15
to django-...@googlegroups.com
#33817: Use python-oracledb instead of cx-oracle
-------------------------------------+-------------------------------------
Reporter: Alexander Shishenko | Owner: Jingbei
| Li
Type: New feature | Status: closed
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: oracle | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce <42296566+sarahboyce@…>):

In [changeset:"b4bc393b23dd2a222a3ca52b5d44ec33499c789f" b4bc393]:
{{{#!CommitTicketReference repository=""
revision="b4bc393b23dd2a222a3ca52b5d44ec33499c789f"
Refs #33817 -- Removed support for cx_Oracle per deprecation timeline.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33817#comment:35>
Reply all
Reply to author
Forward
0 new messages