Project

General

Profile

Actions

Bug #42923

closed

pybind / cephfs: remove static typing in LibCephFS.chown

Added by Venky Shankar over 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Code Hygiene
Target version:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
mgr/volumes
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

    def chown(self, path, int uid, int gid):
        """                                                                                                                           
        Change directory ownership                                                                                                    
        :param path: the path of the directory to change.                                                                             
        :param uid: the uid to set                                                                                                    
        :param gid: the gid to set                                                                                                    
        """ 
        self.require_state("mounted")
        path = cstr(path, 'path')
        if not isinstance(uid, int):
            raise TypeError('uid must be an int')
        elif not isinstance(gid, int):
            raise TypeError('gid must be an int')

although Cython supports typing function agrs, it makes less sense as the type is checked in the function itself. Plus, to be uniform with other cephfs python binding APIs, it makes sense to remove static typing here.


Related issues 1 (0 open1 closed)

Copied to CephFS - Backport #43085: nautilus: pybind / cephfs: remove static typing in LibCephFS.chownResolvedJos CollinActions
Actions #1

Updated by Venky Shankar over 4 years ago

  • Category set to Code Hygiene
  • Status changed from New to In Progress
  • Assignee set to Venky Shankar
  • Target version set to v15.0.0
  • Start date deleted (11/21/2019)
  • Source set to Community (dev)
  • Tags set to nautilus
  • Component(FS) mgr/volumes added
Actions #2

Updated by Venky Shankar over 4 years ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 31756
Actions #3

Updated by Patrick Donnelly over 4 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #4

Updated by Nathan Cutler over 4 years ago

  • Tags deleted (nautilus)
  • Backport set to nautilus
Actions #5

Updated by Nathan Cutler over 4 years ago

  • Copied to Backport #43085: nautilus: pybind / cephfs: remove static typing in LibCephFS.chown added
Actions #6

Updated by Nathan Cutler over 4 years ago

  • Status changed from Pending Backport to Resolved
Actions #7

Updated by Nathan Cutler over 4 years ago

  • Status changed from Resolved to Pending Backport
Actions #8

Updated by Nathan Cutler about 4 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions

Also available in: Atom PDF