Skip to content

Conversation

bengosney
Copy link
Contributor

@bengosney bengosney commented Jul 20, 2024

Short description

python-bidi 0.5.0 introduces a breaking change

Proposed changes

Update the import to fix the breaking change

Resolved issues

Fixes: #766

Copy link
Collaborator

@timobrembeck timobrembeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for reporting and fixing this issue! 👍

Co-authored-by: Timo Brembeck <github@timo.brembeck.email>
@@ -22,7 +22,7 @@
import arabic_reshaper
import reportlab
import reportlab.pdfbase._cidfontdata
from bidi.algorithm import get_display
from bidi import get_display
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be trivial to keep supporting older versions?

@sandip31
Copy link

sandip31 commented Jul 21, 2024

This pending change need to be merged ASAP, as its affecting the production

@stefan6419846
Copy link
Contributor

Why can't you just downgrade to python-bidi<0.5.0 in production? This shouldn't be too hard if it really breaks for you at the moment. xhtml2pdf is still a FOSS package maintained by volunteers in their free time.

@sandip31
Copy link

Thanks @stefan6419846
It fixed the issue for now.

@TolaAbiodun
Copy link

if you are using github actions, you can downgrade to version 0.4.2

     - name: Install Dependencies
        run: |
          python -m pip install --upgrade pip
          pip install python-bidi==0.4.2
          pip install -r requirements.txt

@stefan6419846
Copy link
Contributor

Version 0.5.1 has been released to fix this for now, after this issue of xhtml2pdf has been reported against python-bidi: https://redirect.github.com/MeirKriheli/python-bidi/issues/23

@victoraugusto6
Copy link

Hello everyone, any predictions on when a fix for this problem will be released?

@stefan6419846
Copy link
Contributor

Just use python-bidi==0.5.1 - this added backwards-compatibility for now and should work with the existing xhtml2pdf version as well.

@jorenham
Copy link
Contributor

jorenham commented Aug 2, 2024

Like I mentioned in #766 (comment):

I believe that python-bidi 0.6.0 fixes this:
https://github.com/MeirKriheli/python-bidi/releases/tag/v0.6.0

@luisza luisza merged commit 3ac6559 into xhtml2pdf:master Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

python-bidi 0.5.0 introduces a breaking change
9 participants