[issue13175] packaging uses wrong line endings in RECORD files on Windows

2014-03-12 Thread Éric Araujo

Éric Araujo added the comment:

This issue is now obsolete for distutils2.  Other projects that write RECORD 
files are hopefully more robust in their code and tests.

--
resolution:  - out of date
stage:  - committed/rejected
status: open - closed

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2012-05-17 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I should be able to run a VM to test and commit this soon.  Keep faith!

--

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2012-02-11 Thread Paul Moore

Paul Moore p.f.mo...@gmail.com added the comment:

 Do I need to hg clone then do some magic pip incantation to get it installed?
 Why would you want to install it?  Clone it, hack on it in place, run tests 
 in place.  :)

 FTR, “bin/pip install -e .” is the command to “install” a project in develop 
 (or editable) mode with pip in a virtualenv.

Thanks, that's what I needed. I'm new to pip and know little more than
pip install :-)

--

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2012-02-10 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 I just did pip install distutils2 in a virtualenv. If that doesn't work then 
 yes,
 I got the wrong one :-(
You need to get a development repo to make patches, not a released version, 
just like for CPython.

 Do I need to hg clone then do some magic pip incantation to get it installed?
Why would you want to install it?  Clone it, hack on it in place, run tests in 
place.  :)

FTR, “bin/pip install -e .” is the command to “install” a project in develop 
(or editable) mode with pip in a virtualenv.

--

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2012-02-09 Thread Paul Moore

Paul Moore p.f.mo...@gmail.com added the comment:

Any progress on this one?

I tried to reproduce using distutils2, but don't know how distutils2 works - 
there's no pysetup and python -m distutils2.run doesn't work the same as python 
-m packaging.run.

Can we at least get packaging working in time for 3.3, even if it leaves an 
issue with distutils2 to sort out?

--

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2012-02-09 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 I tried to reproduce using distutils2, but don't know how distutils2
 works - there's no pysetup and python -m distutils2.run doesn't work
 the same as python -m packaging.run.

Maybe you’re using the old PyPI release or Tarek’s outdated Bitbucket 
repository.  http://hg.python.org/distutils is current, contains pysetup and 
supports -m distutils2.run.

I’ll port your patch to d2 this week.

--

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2012-02-09 Thread Paul Moore

Paul Moore p.f.mo...@gmail.com added the comment:

 Maybe you’re using the old PyPI release or Tarek’s outdated Bitbucket 
 repository.  http://hg.python.org/distutils is current, contains pysetup and 
 supports -m distutils2.run.

I just did pip install distutils2 in a virtualenv. If that doesn't
work then yes, I got the wrong one :-(

Do I need to hg clone then do some magic pip incantation to get it
installed? I'm new to pip/viirtualenv. I'll have a look.

--

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2011-10-17 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 I found the problem - it's in packaging.util.write_record_file.
We have two functions that write RECORD files; I’ve opened a report to kill one.

 The file passed to csv.writer should be opened with newline=''.
How will we port this to 2.x?

 I don't expect the test will catch the issue except on Windows...
Do you mean that the test will fail or be a no-op on other OSes?  We can mark 
it as Windows-specific (@unittest.skipIf(sys.platform != 'win32', 'test only 
relevant on win32')) or just let it run if it’s harmless.  The important point 
is: does it fail before the fix, does it pass after?

--
assignee: tarek - eric.araujo
dependencies: +Remove duplicate definition of write_record_file
versions: +3rd party

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2011-10-17 Thread Paul Moore

Paul Moore p.f.mo...@gmail.com added the comment:

On 17 October 2011 14:15, Éric Araujo rep...@bugs.python.org wrote:
 The file passed to csv.writer should be opened with newline=''.
 How will we port this to 2.x?

No idea :-( The 2.7 documentation says use the 'b' flag, but that
probably doesn't allow an encoding parameter (it doesn't on 3.x).

 I don't expect the test will catch the issue except on Windows...
 Do you mean that the test will fail or be a no-op on other OSes?  We can mark 
 it as Windows-specific (@unittest.skipIf(sys.platform != 'win32', 'test only 
 relevant on win32')) or just let it run if it’s harmless.  The important 
 point is: does it fail before the fix, does it pass after?

The test fails before the fix, passes after. It's a no-op on platforms
where text and binary files are the same, (i.e., non-Windows systems).
So it's harmless.

--

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2011-10-17 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 The file passed to csv.writer should be opened with newline=''.
 How will we port this to 2.x?
 No idea :-( The 2.7 documentation says use the 'b' flag, but that
 probably doesn't allow an encoding parameter (it doesn't on 3.x).

Ah, I see that newline controls newline translation.  We use codecs.open in 
distutils2; I think it uses universal newlines mode.  We’ll figure it out, the 
important part is to have good tests.

 The test fails before the fix, passes after. It's a no-op on platforms
 where text and binary files are the same, (i.e., non-Windows systems).
 So it's harmless.

Great.  I’ll look at your patch and try to port it to distutils2.

--

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2011-10-16 Thread Paul Moore

Paul Moore p.f.mo...@gmail.com added the comment:

I found the problem - it's in packaging.util.write_record_file. The
file passed to csv.writer should be opened with newline=''.

--

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2011-10-16 Thread Paul Moore

Paul Moore p.f.mo...@gmail.com added the comment:

Here's a patch. It includes a test, but I don't expect the test will catch the 
issue except on Windows...

--
keywords: +patch
Added file: http://bugs.python.org/file23416/recordfix.patch

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2011-10-15 Thread Vinay Sajip

Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:

I'm trying to reproduce this too, but have failed so far. Which version(s) of 
Windows did the problems appear on?

--
nosy: +vinay.sajip

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2011-10-15 Thread Paul Moore

Paul Moore p.f.mo...@gmail.com added the comment:

Windows 7, 32 bit.

--

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2011-10-14 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

packaging.util creates a RECORD file with OS-specific line endings and 
csv.writerow; packaging.command.install_distinfo uses LF everywhere and 
csv.writerow.  I’m not sure this is related to binary vs. text I/O; maybe it’s 
some other code like the RESOURCES system that’s giving lines with endings to 
install_distinfo, which then adds CRLF.  Do you have a RECORD file to upload 
for inspection?

--

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2011-10-14 Thread Paul Moore

Paul Moore p.f.mo...@gmail.com added the comment:

Unfortunately, no. I have been unable to get this in a reproducible form - but 
I have seen it a few times now. I will keep trying to reproduce.

The worst thing is that packaging fails to recognise the data in RECORD and 
won't uninstall the package. It would be helpful if packaging were a little 
more permissive in how it handles this sort of problem in RECORD.

--

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



[issue13175] packaging uses wrong line endings in RECORD files on Windows

2011-10-13 Thread Paul Moore

New submission from Paul Moore p.f.mo...@gmail.com:

On Windows, packaging seems to create RECORD files with an additional CR at the 
end of the line. (So the line end is CR CR LF). This does not seem to be 
consistent, but it is likely to be because a file is being opened in text mode 
rather than binary.

I am trying to develop a reproducible test case, but am having difficulty at 
the moment. I have opened this bug in any case as a place holder and in case 
someone else can reproduce the issue.

--
assignee: tarek
components: Distutils2
messages: 145488
nosy: alexis, eric.araujo, pmoore, tarek
priority: normal
severity: normal
status: open
title: packaging uses wrong line endings in RECORD files on Windows
type: behavior
versions: Python 3.3

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