Wrong OSError message from os.rename() when dst is a non-empty directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| python3.4 (Ubuntu) |
Medium
|
Unassigned |
Bug Description
Under Python 3.3, if renaming a directory with `os.rename()` when the destination is an existing, non-empty directory, like this:
os.rename(
You'll get an OSError with a message like this:
OSError: [Errno 39] Directory not empty: '/tmp/bar'
However, in the current Python 3.4.0b1 package in Trusty, this error message will contain the source directory name instead of the destination directory name, like this:
OSError: [Errno 39] Directory not empty: '/tmp/foo'
I've attached a test case, which also covers renaming directories relative to an open directory descriptor. This test case works on Python 3.3, fails on Python 3.4.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: python3.4 3.4~b1-0ubuntu3
ProcVersionSign
Uname: Linux 3.12.0-7-generic x86_64
ApportVersion: 2.12.7-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Dec 27 19:57:28 2013
SourcePackage: python3.4
UpgradeStatus: No upgrade log present (probably fresh install)
Jason Gerard DeRose (jderose) wrote : | #1 |
Jason Gerard DeRose (jderose) wrote : | #2 |
Jason Gerard DeRose (jderose) wrote : | #3 |
Hmm, originally I didn't think this was related, but it may be after all: http://
Jason Gerard DeRose (jderose) wrote : | #4 |
Note this problem is still present in Python 3.4 Beta3
Jason Gerard DeRose (jderose) wrote : | #5 |
Note this is still present in the final 3.4.0-1 Ubuntu package.
Launchpad Janitor (janitor) wrote : | #6 |
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in python3.4 (Ubuntu): | |
status: | New → Confirmed |
Changed in python3.4 (Ubuntu): | |
status: | Confirmed → Triaged |
importance: | Undecided → Medium |
milestone: | none → trusty-updates |
Matthias Klose (doko) wrote : | #7 |
3.4.0 has this fixed. resolutions in http://
Changed in python3.4 (Ubuntu): | |
status: | Triaged → Fix Released |
I didn't find an existing upstream up for this, so I filed one: http:// bugs.python. org/issue20093