classification
Title: bytes_methods.c won't recompile if related stringlib/* changed
Type: Stage: resolved
Components: Build Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: xiang.zhang Nosy List: python-dev, serhiy.storchaka, vstinner, xiang.zhang
Priority: normal Keywords: patch

Created on 2016-12-10 06:20 by xiang.zhang, last changed 2016-12-15 09:18 by xiang.zhang. This issue is now closed.

Files
File name Uploaded Description Edit
Makefile-bytes-methods.patch xiang.zhang, 2016-12-10 07:17 review
Makefile-bytes-methods-v2.patch xiang.zhang, 2016-12-10 10:43 review
Messages (7)
msg282832 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2016-12-10 06:20
bytes_methods.c includes files in stringlib, for example, stringlib/count.h. But if count.h changes, simply running make won't recompile bytes_methods.c and the methods of bytes remain unchanged. You have to make distclean and compile from scratch.
msg282833 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-12-10 06:32
Needed a rule in Makefile.
msg282835 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-12-10 07:46
LGTM. But be aware of possible differences in 3.5.

Alternatively just BYTESTR_DEPS can be used instead of BYTESMETHODS_DEPS. This would make easier moving implementations between bytesobject.c and bytes_methods.c.
msg282846 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2016-12-10 10:43
> Alternatively just BYTESTR_DEPS can be used instead of BYTESMETHODS_DEPS. This would make easier moving implementations between bytesobject.c and bytes_methods.c.

Yes. The only downside of this is some changes may recompile bytes_methods.c unnecessarily but this is not a matter.

> But be aware of possible differences in 3.5.

In 3.5 bytes_methods.c doesn't rely on stringlib/*.
msg282847 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-12-10 10:50
Makefile-bytes-methods-v2.patch LGTM.
msg282908 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-12-11 07:40
LGTM, you can push it to 3.6 and default.
msg283262 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-12-15 09:15
New changeset 56a7eb5a0679 by Xiang Zhang in branch '3.6':
Issue #28930: Add a Makefile rule for bytes_methods.c.
https://hg.python.org/cpython/rev/56a7eb5a0679

New changeset c4bcca326c0a by Xiang Zhang in branch 'default':
Issue #28930: Merge from 3.6.
https://hg.python.org/cpython/rev/c4bcca326c0a
History
Date User Action Args
2016-12-15 09:18:41xiang.zhangsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2016-12-15 09:15:47python-devsetnosy: + python-dev
messages: + msg283262
2016-12-11 07:40:57vstinnersetmessages: + msg282908
2016-12-10 10:50:59serhiy.storchakasetmessages: + msg282847
2016-12-10 10:43:36xiang.zhangsetfiles: + Makefile-bytes-methods-v2.patch
versions: - Python 3.5
nosy: + vstinner

messages: + msg282846
2016-12-10 07:46:59serhiy.storchakasetmessages: + msg282835
2016-12-10 07:17:45xiang.zhangsetfiles: + Makefile-bytes-methods.patch
versions: + Python 3.5, Python 3.6, Python 3.7
assignee: xiang.zhang
keywords: + patch
type: behavior ->
stage: needs patch -> patch review
2016-12-10 06:32:38serhiy.storchakasetnosy: + serhiy.storchaka

messages: + msg282833
stage: needs patch
2016-12-10 06:20:32xiang.zhangcreate