This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Move io-in-c modules into a subdirectory of Modules/
Type: Stage:
Components: Build Versions: Python 3.1
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: alexandre.vassalotti, benjamin.peterson, pitrou
Priority: normal Keywords: needs review, patch

Created on 2009-04-03 23:55 by alexandre.vassalotti, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
move-iomodule-in-subdir-3.diff alexandre.vassalotti, 2009-04-04 00:27
pythoncore.patch pitrou, 2009-04-04 01:13
move-iomodule-in-subdir-4.diff alexandre.vassalotti, 2009-04-04 01:46
Messages (14)
msg85346 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2009-04-03 23:55
Here is a patch that moves the source files of the _io module (and
closely related modules) into subdirectory of Modules. The new file
hierarchy proposed is the following:

  Modules/
    _io/
      _iomodule.h
      _iomodule.c
      iobase.c
      fileio.c
      bufferedio.c
      textio.c
      bytesio.c
      stringio.c

I believe that moving the io module into its own subdirectory will make
clear whether the different I/O implementations share common bugs.
Currently, it is quite easy to miss a module when doing a bug fix.

The patch was not tested on Windows. I tried my best to configure by
hand PCbuild and PC/{VC, VS7.1, VS8.0}. However, I would be surprised if
my changes were flawless.
msg85347 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-04-03 23:56
Where's the patch?
msg85350 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-04-04 00:08
Some comments:
- there are some unrelated pickle changes in your patch
- in Makefile.pre.in, it seems the IO_OBJS definition might need updating

Otherwise I don't have any objections.
Please note, when committing, it would be good to use "svn mv" for the
actual moving of the files, so that their history can be followed.
msg85351 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2009-04-04 00:12
Antoine, you're too quick. :-)

By the way, the patch is fairly large due to the renaming. So, here's
quick-and-dirty summary of the important changes.

  PCbuild/pythoncore.vcproj: Renamed the paths and added a <Filter/> tag
for the _io directory.
  PC/VS7.1/pythoncore.vcproj: Same as above.
  PC/VS8.0/pythoncore.vcproj: Same as above.
  PC/VC6/pythoncore.dsp: Renamed the paths.
  Makefile.pre.in: Updated the path to _iomodule.h
  Modules/Setup.dist: Renamed the paths.

Oh, my last patch had some junk for pickle. Here's a clean patch.
msg85353 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2009-04-04 00:27
Antoine wrote:
> - in Makefile.pre.in, it seems the IO_OBJS definition might need updating

I updated the patch to also fix IO_OBJS. Also, I added stringio.c to
IO_OBJS. 

> Please note, when committing, it would be good to use "svn mv" for the
> actual moving of the files, so that their history can be followed.

Yes, I used "svn move" to rename the file in my local checkout, but
unfortunately "svn diff" doesn't support renames.
msg85355 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-04-04 00:33
I think you can commit!
msg85356 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2009-04-04 00:36
Have you tested PCbuild changes? As, this is the part I am the most
unsure about.
msg85357 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-04-04 00:40
> Have you tested PCbuild changes? As, this is the part I am the most
> unsure about.

Ok, unless someone beats me to it, I'm gonna fire a Windows VM and test
this.
msg85358 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-04-04 00:55
Some failures:

_iomodule.c
c1 : fatal error C1083: Impossible d'ouvrir le fichier source :
'..\..\Modules\_io\_iomodule.c' : No such file or directory
textio.c
c1 : fatal error C1083: Impossible d'ouvrir le fichier source :
'..\..\Modules\_io\textio.c' : No such file or directory
iobase.c
c1 : fatal error C1083: Impossible d'ouvrir le fichier source :
'..\..\Modules\_io\iobase.c' : No such file or directory
bufferedio.c
c1 : fatal error C1083: Impossible d'ouvrir le fichier source :
'..\..\Modules\_io\bufferedio.c' : No such file or directory
stringio.c
c1 : fatal error C1083: Impossible d'ouvrir le fichier source :
'..\..\Modules\_io\stringio.c' : No such file or directory
bytesio.c
c1 : fatal error C1083: Impossible d'ouvrir le fichier source :
'..\..\Modules\_io\bytesio.c' : No such file or directory
fileio.c
c1 : fatal error C1083: Impossible d'ouvrir le fichier source :
'..\..\Modules\_io\fileio.c' : No such file or directory

It looks like a mistake in file names (missing leading underscores, and
a non-existent _iomodule.c instead of io.c).
msg85359 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-04-04 00:57
Or perhaps these are really meant as the new file names? Initially I
thought the purpose was initially to move the files into a subdir.
msg85361 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-04-04 01:13
After also renaming the files, there is a slight bug in
PCbuild/pythoncore.vcproj. Here is a subpatch incorporating the changes
to this only file.
msg85364 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2009-04-04 01:46
Thanks! Here is the updated patch.
msg85385 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-04-04 10:51
You should commit. If there is a problem with other Windows build files,
it will certainly be noticed and fixed by a true Windows developer.
msg85429 - (view) Author: Alexandre Vassalotti (alexandre.vassalotti) * (Python committer) Date: 2009-04-04 19:59
Committed in r71185.

Thanks Antoine for the review!
History
Date User Action Args
2022-04-11 14:56:47adminsetgithub: 49932
2009-04-04 19:59:24alexandre.vassalottisetstatus: open -> closed
resolution: accepted
messages: + msg85429
2009-04-04 10:51:14pitrousetmessages: + msg85385
2009-04-04 01:46:53alexandre.vassalottisetfiles: + move-iomodule-in-subdir-4.diff

messages: + msg85364
2009-04-04 01:13:43pitrousetfiles: + pythoncore.patch

messages: + msg85361
2009-04-04 00:57:42pitrousetmessages: + msg85359
2009-04-04 00:55:03pitrousetmessages: + msg85358
2009-04-04 00:40:50pitrousetmessages: + msg85357
2009-04-04 00:36:08alexandre.vassalottisetmessages: + msg85356
2009-04-04 00:33:07pitrousetmessages: + msg85355
2009-04-04 00:28:49alexandre.vassalottisetfiles: - move-iomodule-in-subdir-2.diff
2009-04-04 00:28:43alexandre.vassalottisetfiles: - move-iomodule-in-subdir.diff
2009-04-04 00:27:34alexandre.vassalottisetfiles: + move-iomodule-in-subdir-3.diff

messages: + msg85353
2009-04-04 00:13:14alexandre.vassalottisetfiles: + move-iomodule-in-subdir-2.diff

messages: + msg85351
2009-04-04 00:08:36pitrousetmessages: + msg85350
2009-04-03 23:59:35alexandre.vassalottisetfiles: + move-iomodule-in-subdir.diff
2009-04-03 23:56:39pitrousetnosy: + pitrou
messages: + msg85347
2009-04-03 23:55:41alexandre.vassalotticreate