Your message dated Tue, 18 Nov 2014 14:18:19 +0100
with message-id <[email protected]>
and subject line Re: Bug#766408: python2.7: The os module does not exhibit 
proper functionality with the open() function.
has caused the Debian Bug report #766408,
regarding python2.7: The os module does not exhibit proper functionality with 
the open() function.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
766408: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766408
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python2.7
Version: 2.7.3-6+deb7u2
Severity: important

Dear Maintainer,
I did a system upgrade to find broken functionality of the os module in python 
2.7.
The issue persisted after doing a fresh install of debian 7.7. No further 
explorative 
steps of deduction have been made further from the below documented procedures.


The steps taken to reproduce are as follows:

 user : python
>>> import os
>>> os.open('/home/user/existing_file', 0)
3
>>> os.open('/home/user/existing_file', 0)
4
>>> os.open('/home/user/existing_file', 0)
5
>>> os.open('/home/user/existing_file', 0)
6
>>> os.open('/home/user/existing_file', 0)
7


The use of modifying flags in open had the same outcome, with slight variation.


 user: python
>>> import os
>>> os.open('/home/user/nonexisting_file', os.O_CREAT | os.O_TRUNC)
3
>>> os.open('/home/user/nonexisting_file', os.O_CREAT | os.O_TRUNC)
4
>>> os.open('/home/user/nonexisting_file', os.O_CREAT | os.O_TRUNC)
5
>>> os.open('/home/user/nonexisting_file', os.O_CREAT | os.O_TRUNC)
6
>>> os.open('/home/user/nonexisting_file', os.O_CREAT | os.O_TRUNC)
7


The traceback errors are still caught and raised appropriately.

 user: python
>>> import os
>>> os.read('/home/user/nonexisting_file', os.O_TRUNC)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 2] No such file or directory: 'home/user/nonexisting_file'




The representation of the error codes is as follows:

>>> for i in range(1, 8):
....     print("%d %s" % (i, os.strerror(i)))
.... 
1 Operation not permitted
2 No such file or directory
3 No such process
4 Interrupted system call
5 Input/output error
6 No such device or address
7 Argument list too long
>>> 



Prior to an "apt-get update && apt-get upgrade" the issue was not present.
The expected outcome is that os returns a valid file descriptor pointing to 
said file.
The issue is that the file descriptor is never created under valid conditions, 
the error code
returned is bogus, and the os object will continue to increment the error code 
as the same call is made.
Changing the flags has no effect of outcome, but simply continues the 
incrementing. 
However, Traceback's are not disabled nor escaped.



-- System Information:
Debian Release: 7.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python2.7 depends on:
ii  libbz2-1.0         1.0.6-4
ii  libc6              2.13-38+deb7u6
ii  libdb5.1           5.1.29-5
ii  libexpat1          2.1.0-1+deb7u1
ii  libgcc1            1:4.7.2-5
ii  libncursesw5       5.9-10
ii  libreadline6       6.2+dfsg-0.1
ii  libsqlite3-0       3.7.13-1+deb7u1
ii  libtinfo5          5.9-10
ii  mime-support       3.52-1
ii  python2.7-minimal  2.7.3-6+deb7u2

python2.7 recommends no packages.

Versions of packages python2.7 suggests:
ii  binutils       2.22-8
pn  python2.7-doc  <none>

-- no debconf information

--- End Message ---
--- Begin Message ---
On 11/18/2014 02:09 PM, Tomm Smith wrote:
This bug can actually be closed. I was confused over my syntax and was
testing the issue to quickly, causing near sight.

--- End Message ---

Reply via email to