[Bug 1856753] Re: python 2.7.17-1~18.04 causes ImportError in ujson.so

2019-12-19 Thread Peter Kolbus
Using python-ujson is not an option unfortunately as my full use case
also involves a virtualenv.

That said, I’m wondering if this may also cause problems in python-ujson
the next time the deb needs to be built from sources, perhaps in a mass
rebuild?

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1856753

Title:
  python 2.7.17-1~18.04 causes ImportError in ujson.so

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1856753/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1856753] Re: python 2.7.17-1~18.04 causes ImportError in ujson.so

2019-12-19 Thread Dimitri John Ledkov
Buffer_ is not a symbol name prefix used by python.

readelf -a ./libpython2.7/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 | grep 
PyBuffer_  
004e2b08  03740006 R_X86_64_GLOB_DAT 00540a40 PyBuffer_Type + 0
   408: 00175c90   381 FUNCGLOBAL DEFAULT   12 
PyBuffer_FromReadWriteObj
   416: 00175c10   122 FUNCGLOBAL DEFAULT   12 PyBuffer_FromMemory
   816: 00175960   381 FUNCGLOBAL DEFAULT   12 PyBuffer_FromObject
   884: 00540a40   392 OBJECT  GLOBAL DEFAULT   23 PyBuffer_Type
   889: 00052260   135 FUNCGLOBAL DEFAULT   12 PyBuffer_GetPointer
  1024: 0005217082 FUNCGLOBAL DEFAULT   12 PyBuffer_Release
  1084: 001758c0   154 FUNCGLOBAL DEFAULT   12 PyBuffer_New
  1334: 0005ad00   297 FUNCGLOBAL DEFAULT   12 
PyBuffer_FromContiguous
  1345: 00175b90   122 FUNCGLOBAL DEFAULT   12 
PyBuffer_FromReadWriteMem
  1382: 000522f0   678 FUNCGLOBAL DEFAULT   12 PyBuffer_IsContiguous
  1412: 0005ae30   297 FUNCGLOBAL DEFAULT   12 PyBuffer_ToContiguous
  1472: 000521d0   132 FUNCGLOBAL DEFAULT   12 
PyBuffer_FillContiguousSt
  1520: 00053640   182 FUNCGLOBAL DEFAULT   12 PyBuffer_FillInfo

If it was PyBuffer_ then maybe it would have come from python itself.

ujson appears to be compiled extension, did you missbuilt it?

And it itself defines this

FASTCALL_ATTR INLINE_PREFIX void FASTCALL_MSVC Buffer_AppendShortHexUnchecked 
(char *outputOffset, unsigned short value)
{
  *(outputOffset++) = g_hexChars[(value & 0xf000) >> 12];
  *(outputOffset++) = g_hexChars[(value & 0x0f00) >> 8];
  *(outputOffset++) = g_hexChars[(value & 0x00f0) >> 4];
  *(outputOffset++) = g_hexChars[(value & 0x000f) >> 0];
}

Which is possibly now inlined, instead of being an exported symbol?
Compiler can choose to do that.

BTW. python-ujson is available on ubuntu bionic
$ sudo apt install python-ujson
$ python2 -c 'import ujson; print ujson'


I am afraid this is a bug with pip's ujson, not with ubuntu's python2.

The one that we provide is the same version 1.35. Maybe you can remove
your self-built / pip install ujson and install our distro provided one
instead with sudo apt install python-ujson?

** Changed in: python2.7 (Ubuntu)
   Status: Confirmed => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1856753

Title:
  python 2.7.17-1~18.04 causes ImportError in ujson.so

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1856753/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1856753] Re: python 2.7.17-1~18.04 causes ImportError in ujson.so

2019-12-19 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: python2.7 (Ubuntu)
   Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1856753

Title:
  python 2.7.17-1~18.04 causes ImportError in ujson.so

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1856753/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs