[issue35586] Open pyexpat compilation, Make shows error(missing separator)

2018-12-25 Thread kbengine

New submission from kbengine :

Python3.7.2
My compilation steps:
1. Modify Modules/Setup.dist, open pyexpat
pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c 
-I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DXML_POOR_ENTROPY=1 
-DUSE_PYEXPAT_CAPI

2. ./configure
3. make
Makefile:272: *** missing separator. Stop.




--
components: Extension Modules
messages: 332529
nosy: kbengine
priority: normal
severity: normal
status: open
title: Open pyexpat compilation, Make shows error(missing separator)
type: compile error
versions: Python 3.7

___
Python tracker 
<https://bugs.python.org/issue35586>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22676] _pickle.c

2014-10-20 Thread kbengine

New submission from kbengine:

I have an application, the use of Python3.2.3 development.
When I upgrade to Python3.4.2, found a problem.

I have an extended xxx.c (c-python) module, I call pickle to serialize and 
deserialize, _pickle.c calls the whichmodule to look for this module, The final 
will be to find the module from sys.modules.

But probably there are 200 elements in sys.modules, Use the obj = getattribute 
(module, global_name, allow_qualname) to try to get the object:

static PyObject *
getattribute(PyObject *obj, PyObject *name, int allow_qualname) {
...
...
...

tmp = PyObject_GetAttr(obj, subpath);
Py_DECREF(obj);
 
// There will be hundreds of times to return to NULL
// There will be hundreds of times calls PyErr_Format   
// (PyExc_AttributeError, Can't get attribute%R on%R , name, obj);
// This process will lead to hundreds of calls to moduleobject.c-
// module_repr(PyModuleObject *m).

// So I frequently call pickle.dumps CPU consumption sharply.

if (tmp == NULL) {
if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
PyErr_Clear();


PyErr_Format(PyExc_AttributeError,
 Can't get attribute %R on %R, name, obj);
}
Py_DECREF(dotted_path);
return NULL;
}
   ...
   ...
}

--
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
  3150.0010.0000.0040.000 frozen 
importlib._bootstrap:690(_module_repr)




I went wrong?
Look forward to answer, thanks!

--
components: Extension Modules
files: 20141020193031.jpg
messages: 229723
nosy: kbengine
priority: normal
severity: normal
status: open
title: _pickle.c
type: performance
versions: Python 3.4
Added file: http://bugs.python.org/file36980/20141020193031.jpg

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22676
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22676] Creating the string representation of a module is slower

2014-10-20 Thread kbengine

kbengine added the comment:

This is a misunderstanding, getattribute (PyObject *obj, PyObject *name, int 
allow_qualname) is the Python code, in the Python/Modules/_pickle.c (1538).

Do efficiency is decreased a lot.

--
status: pending - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22676
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com