File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -253,10 +253,14 @@ class BugzillaBase(object):
253253 to ~/.bugzillacookies. If set to None, the library won't save the
254254 cookies persistently.
255255 '''
256+
257+ # bugzilla version that the class is targetting. filled in by
258+ # subclasses
256259 bz_ver_major = 0
257260 bz_ver_minor = 0
258261
259- # This is the class API version
262+ # Intended to be the API version of the class, but historically is
263+ # unused and basically worthless since we don't plan on breaking API.
260264 version = "0.1"
261265
262266 @staticmethod
@@ -374,8 +378,8 @@ def _init_private_data(self):
374378 self ._components_details = {}
375379
376380 def _get_user_agent (self ):
377- ret = ('Python-urllib bugzilla.py/%s %s/%s ' %
378- (__version__ , str (self .__class__ .__name__ ), self . version ))
381+ ret = ('Python-urllib bugzilla.py/%s %s' %
382+ (__version__ , str (self .__class__ .__name__ )))
379383 return ret
380384 user_agent = property (_get_user_agent )
381385
Original file line number Diff line number Diff line change 1313
1414
1515class Bugzilla3 (BugzillaBase ):
16- version = '0.1'
1716 bz_ver_major = 3
1817 bz_ver_minor = 0
1918
2019
2120class Bugzilla32 (Bugzilla3 ):
22- version = '0.1'
2321 bz_ver_minor = 2
2422
2523
2624class Bugzilla34 (Bugzilla32 ):
27- version = '0.2'
2825 bz_ver_minor = 4
2926
3027
3128class Bugzilla36 (Bugzilla34 ):
32- version = '0.1'
3329 bz_ver_minor = 6
3430
3531 def _getbugfields (self ):
Original file line number Diff line number Diff line change 1212
1313
1414class Bugzilla4 (Bugzilla36 ):
15- '''Concrete implementation of the Bugzilla protocol. This one uses the
16- methods provided by standard Bugzilla 4.0.x releases.'''
17- version = '0.1'
1815 bz_ver_major = 4
1916 bz_ver_minor = 0
2017
Original file line number Diff line number Diff line change @@ -29,7 +29,6 @@ class RHBugzilla(_parent):
2929 This class was written using bugzilla.redhat.com's API docs:
3030 https://bugzilla.redhat.com/docs/en/html/api/
3131 '''
32- version = '0.1'
3332
3433 def __init__ (self , * args , ** kwargs ):
3534 """
Original file line number Diff line number Diff line change @@ -65,8 +65,8 @@ def testUserAgent(self):
6565 b3 = bugzilla .Bugzilla3 (url = None , cookiefile = None )
6666 rhbz = bugzilla .RHBugzilla (url = None , cookiefile = None )
6767
68- self .assertTrue (b3 .user_agent .endswith ("Bugzilla3/0.1 " ))
69- self .assertTrue (rhbz .user_agent .endswith ("RHBugzilla/0.1 " ))
68+ self .assertTrue (b3 .user_agent .endswith ("Bugzilla3" ))
69+ self .assertTrue (rhbz .user_agent .endswith ("RHBugzilla" ))
7070
7171 def testCookies (self ):
7272 if (sys .version_info [0 ] < 2 or
You can’t perform that action at this time.
0 commit comments