Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#53620 closed defect (fixed)

bzr 2.6.0: throws TypeError: first argument must be string or compiled pattern

Reported by: dorward (David Dorward) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 2.4.0
Keywords: Cc:
Port: bzr

Description

Most operations with bzr (including bzr pull) are throwing this error:

  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 247, in _compile
    raise TypeError, "first argument must be string or compiled pattern"
TypeError: first argument must be string or compiled pattern
 
bzr 2.6.0 on python 2.7.13 (Darwin-16.4.0-x86_64-i386-64bit)
arguments: ['/opt/local/bin/bzr', 'pull']
plugins: bash_completion[2.6.0], bisect[1.1.0dev], changelog_merge[2.6.0],
    diff_revid[unknown], extmerge[unknown], fastimport[0.14.0dev],
    grep[2.6.0], launchpad[2.6.0], netrc_credential_store[2.6.0],
    news_merge[2.6.0], po_merge[2.6.0], qbzr[0.23.2], weave_fmt[2.6.0]
encoding: 'utf-8', fsenc: 'utf-8', lang: 'en_GB.UTF-8'

It appears to be the same as this upstream bug: https://bugs.launchpad.net/bzr/+bug/1644003

That bug has an upstream fix. Given the decision not to upgrade in ports ( https://trac.macports.org/ticket/52561 ), can the fix be backported?

Attachments (1)

full-error.txt (4.0 KB) - added by dorward (David Dorward) 8 years ago.
Complete output from running bzr pull

Download all attachments as: .zip

Change History (6)

comment:1 Changed 8 years ago by mf2k (Frank Schima)

Cc: raimue@… removed
Owner: set to raimue
Status: newassigned

Changed 8 years ago by dorward (David Dorward)

Attachment: full-error.txt added

Complete output from running bzr pull

comment:2 Changed 8 years ago by dorward (David Dorward)

Downloading the source tree of 2.7.0 from upstream and using that instead of the ports version works around this bug for me (but stops compiled extensions working, so I'd have to install qbzr by hand and maintain that as well as bzr outside of ports if I were to go down that route as a long term solution).

comment:3 Changed 8 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: assignedclosed

In 0b0703b0/macports-ports:

bzr: Backport upstream patch for python >= 2.7.12

bzr fails to run with specific locales selected in LC_ALL/LANG.
Backport the upstream patch to workaround the problem.

Closes: #53620

comment:4 Changed 8 years ago by raimue (Rainer Müller)

Thank you for the report. I could reproduce problem with

LANG=de_DE.UTF-8 LC_ALL=de_DE.UTF-8 bzr pull

I backported the upstream fix to the bzr port.

comment:5 Changed 8 years ago by dorward (David Dorward)

I've done a port selfupdate, reinstalled bzr and qbzr and everything appears to be working fine now.

Thanks!

Note: See TracTickets for help on using tickets.