dissolve-python 0.3.0

A tool to dissolve deprecated calls in Python codebases
Documentation

<TEMP>/library/async_ops.py: 4 deprecated function(s)
  - library.async_ops.get_json
    Replacement: 
    Since: 2.5.0
  - library.async_ops.legacy_upload
    Replacement: 
    Since: 1.0.0
  - library.async_ops.old_batch_fetch
    Replacement: 
    Since: 3.1.0
  - library.async_ops.old_fetch_data
    Replacement: 
    Since: 3.0.0
    Remove in: 4.0.0

<TEMP>/library/config.py: 23 deprecated function(s)
  - library.config.AppConfig.DEPRECATED_LOG_LEVEL
    Replacement: Constant(ExprConstant { range: 2092..2098, value: Str("INFO"), kind: None })
  - library.config.AppConfig.LEGACY_ENDPOINTS
    Replacement: List(ExprList { range: 2322..2405, elts: [Constant(ExprConstant { range: 2332..2347, value: Str("/api/v1/users"), kind: None }), Constant(ExprConstant { range: 2357..2371, value: Str("/api/v1/data"), kind: None }), Constant(ExprConstant { range: 2382..2399, value: Str("/api/v1/reports"), kind: None })], ctx: Load })
  - library.config.AppConfig.LEGACY_PAGE_SIZE
    Replacement: Constant(ExprConstant { range: 2011..2013, value: Int(25), kind: None })
  - library.config.AppConfig.OLD_ENDPOINT
    Replacement: Constant(ExprConstant { range: 1947..1975, value: Str("https://api.example.com/v3"), kind: None })
  - library.config.AppConfig.OLD_LIMITS
    Replacement: Dict(ExprDict { range: 2164..2281, keys: [Some(Constant(ExprConstant { range: 2174..2195, value: Str("requests_per_minute"), kind: None })), Some(Constant(ExprConstant { range: 2211..2226, value: Str("max_file_size"), kind: None })), Some(Constant(ExprConstant { range: 2254..2271, value: Str("timeout_seconds"), kind: None }))], values: [Constant(ExprConstant { range: 2197..2201, value: Int(1000), kind: None }), Constant(ExprConstant { range: 2228..2236, value: Int(10485760), kind: None }), Constant(ExprConstant { range: 2273..2275, value: Int(30), kind: None })] })
  - library.config.AppConfig.OLD_LOG_SETTING
    Replacement: Constant(ExprConstant { range: 2048..2052, value: Bool(true), kind: None })
  - library.config.DEPRECATED_VERSION
    Replacement: Constant(ExprConstant { range: 1163..1167, value: Str("v3"), kind: None })
  - library.config.DevConfig.LEGACY_DEV_API
    Replacement: Constant(ExprConstant { range: 3819..3848, value: Str("https://dev-api.example.com"), kind: None })
  - library.config.DevConfig.OLD_DEBUG_MODE
    Replacement: Constant(ExprConstant { range: 3781..3785, value: Bool(true), kind: None })
  - library.config.FeatureFlags.DEPRECATED_SETTINGS
    Replacement: Dict(ExprDict { range: 3358..3532, keys: [Some(Constant(ExprConstant { range: 3368..3372, value: Str("ui"), kind: None })), Some(Constant(ExprConstant { range: 3421..3426, value: Str("api"), kind: None })), Some(Constant(ExprConstant { range: 3476..3486, value: Str("features"), kind: None }))], values: [Dict(ExprDict { range: 3374..3411, keys: [Some(Constant(ExprConstant { range: 3375..3382, value: Str("theme"), kind: None })), Some(Constant(ExprConstant { range: 3392..3404, value: Str("animations"), kind: None }))], values: [Constant(ExprConstant { range: 3384..3390, value: Str("dark"), kind: None }), Constant(ExprConstant { range: 3406..3410, value: Bool(true), kind: None })] }), Dict(ExprDict { range: 3428..3466, keys: [Some(Constant(ExprConstant { range: 3429..3441, value: Str("rate_limit"), kind: None })), Some(Constant(ExprConstant { range: 3449..3460, value: Str("cache_ttl"), kind: None }))], values: [Constant(ExprConstant { range: 3443..3447, value: Int(1000), kind: None }), Constant(ExprConstant { range: 3462..3465, value: Int(300), kind: None })] }), Dict(ExprDict { range: 3488..3526, keys: [Some(Constant(ExprConstant { range: 3489..3495, value: Str("beta"), kind: None })), Some(Constant(ExprConstant { range: 3504..3518, value: Str("experimental"), kind: None }))], values: [Constant(ExprConstant { range: 3497..3502, value: Bool(false), kind: None }), Constant(ExprConstant { range: 3520..3525, value: Bool(false), kind: None })] })] })
  - library.config.FeatureFlags.LEGACY_BETA
    Replacement: Constant(ExprConstant { range: 3171..3176, value: Bool(false), kind: None })
  - library.config.FeatureFlags.OLD_MONITORING
    Replacement: Constant(ExprConstant { range: 3248..3252, value: Bool(true), kind: None })
  - library.config.FeatureFlags.OLD_UI_FLAG
    Replacement: Constant(ExprConstant { range: 3100..3104, value: Bool(true), kind: None })
  - library.config.LEGACY_ALLOWED_ORIGINS
    Replacement: List(ExprList { range: 1492..1584, elts: [Constant(ExprConstant { range: 1498..1519, value: Str("https://example.com"), kind: None }), Constant(ExprConstant { range: 1525..1550, value: Str("https://www.example.com"), kind: None }), Constant(ExprConstant { range: 1557..1582, value: Str("https://app.example.com"), kind: None })], ctx: Load })
  - library.config.LEGACY_CACHE_ENABLED
    Replacement: Constant(ExprConstant { range: 1295..1299, value: Bool(true), kind: None })
  - library.config.LEGACY_RETRIES
    Replacement: Constant(ExprConstant { range: 1075..1076, value: Int(3), kind: None })
  - library.config.OLD_API_URL
    Replacement: Constant(ExprConstant { range: 930..958, value: Str("https://api.example.com/v3"), kind: None })
  - library.config.OLD_DATABASE_CONFIG
    Replacement: Dict(ExprDict { range: 1352..1432, keys: [Some(Constant(ExprConstant { range: 1358..1364, value: Str("host"), kind: None })), Some(Constant(ExprConstant { range: 1388..1394, value: Str("port"), kind: None })), Some(Constant(ExprConstant { range: 1406..1412, value: Str("name"), kind: None }))], values: [Constant(ExprConstant { range: 1366..1382, value: Str("db.example.com"), kind: None }), Constant(ExprConstant { range: 1396..1400, value: Int(5432), kind: None }), Constant(ExprConstant { range: 1414..1430, value: Str("app_production"), kind: None })] })
  - library.config.OLD_DEBUG_FLAG
    Replacement: Constant(ExprConstant { range: 1254..1259, value: Bool(false), kind: None })
  - library.config.OLD_HOST
    Replacement: Constant(ExprConstant { range: 1191..1207, value: Str("db.example.com"), kind: None })
  - library.config.OLD_TIMEOUT
    Replacement: Constant(ExprConstant { range: 1014..1016, value: Int(60), kind: None })
  - library.config.ProdConfig.LEGACY_PROD_API
    Replacement: Constant(ExprConstant { range: 4090..4115, value: Str("https://api.example.com"), kind: None })
  - library.config.ProdConfig.OLD_PROD_MODE
    Replacement: Constant(ExprConstant { range: 4050..4055, value: Bool(false), kind: None })
 WARN dissolve_python::unified_visitor: Skipping function 'library.containers.LegacyContainer.contains' in <TEMP>/library/containers.py: Replacement expression contains unsupported construct (e.g., comprehensions, conditionals, comparisons). Skipping function.
 WARN dissolve_python::unified_visitor: Skipping function 'library.containers.SmartList.is_empty' in <TEMP>/library/containers.py: Replacement expression contains unsupported construct (e.g., comprehensions, conditionals, comparisons). Skipping function.
 WARN dissolve_python::unified_visitor: Skipping function 'library.containers.SmartList.has_item' in <TEMP>/library/containers.py: Replacement expression contains unsupported construct (e.g., comprehensions, conditionals, comparisons). Skipping function.

<TEMP>/library/containers.py: 7 deprecated function(s)
  - library.containers.LegacyContainer.__unicode__
    Replacement: str({self})
    Since: 2.0.0
    Remove in: 3.0.0
  - library.containers.LegacyContainer.get_item
    Replacement: {self}._items[{index}]
    Since: 2.1.0
  - library.containers.LegacyContainer.set_item
    Replacement: 
    Since: 2.1.0
  - library.containers.LegacyContainer.size
    Replacement: len({self})
    Since: 1.0.0
  - library.containers.LegacyContainer.to_str
    Replacement: str({self})
    Since: 1.0.0
  - library.containers.SmartList.get_count
    Replacement: len({self})
    Since: 1.0.0
  - library.containers.SmartList.length
    Replacement: len({self})
    Since: 1.0.0
 WARN dissolve_python::unified_visitor: Skipping function 'library.containers.LegacyContainer.contains' in <unknown>: Replacement expression contains unsupported construct (e.g., comprehensions, conditionals, comparisons). Skipping function.
 WARN dissolve_python::unified_visitor: Skipping function 'library.containers.SmartList.is_empty' in <unknown>: Replacement expression contains unsupported construct (e.g., comprehensions, conditionals, comparisons). Skipping function.
 WARN dissolve_python::unified_visitor: Skipping function 'library.containers.SmartList.has_item' in <unknown>: Replacement expression contains unsupported construct (e.g., comprehensions, conditionals, comparisons). Skipping function.
 WARN dissolve_python::unified_visitor: Skipping function 'library.models.LegacyUser.is_enabled' in <TEMP>/library/models.py: Replacement expression contains unsupported construct (e.g., comprehensions, conditionals, comparisons). Skipping function.

<TEMP>/library/models.py: 4 deprecated function(s)
  - library.models.LegacyUser.get_name
    Replacement: {self}._user.get_display_name()
    Since: 1.5.0
    Remove in: 2.5.0
  - library.models.LegacyUser.set_profile_data
    Replacement: {self}._user.update_profile(**{data})
    Since: 1.8.0
  - library.models.OldDataProcessor
    Replacement: 
    Since: 2.0.0
    Remove in: 3.0.0
  - library.models.SimpleProcessor
    Replacement: 
    Since: 1.0.0
 WARN dissolve_python::unified_visitor: Skipping function 'library.models.LegacyUser.is_enabled' in <unknown>: Replacement expression contains unsupported construct (e.g., comprehensions, conditionals, comparisons). Skipping function.

<TEMP>/library/processors.py: 8 deprecated function(s)
  - library.processors.DataValidator.check_email
    Replacement: DataValidator.is_valid_email({email_addr})
    Since: 1.3.0
    Remove in: 2.0.0
  - library.processors.DataValidator.create_strict_validator
    Replacement: {cls}.create_validator(strict=True)
    Since: 1.0.0
  - library.processors.DataValidator.validate_phone_number
    Replacement: DataValidator.is_valid_phone({number}, country_code=None)
    Since: 1.6.0
  - library.processors.ProcessingEngine.legacy_clean_text
    Replacement: ProcessingEngine.normalize_text({text_data}, lowercase=True, strip_whitespace=True)
    Since: 2.1.0
  - library.processors.ProcessingEngine.legacy_fast_processor
    Replacement: {cls}.create_fast_engine()
    Since: 1.0.0
  - library.processors.ProcessingEngine.old_create_engine
    Replacement: 
    Since: 2.0.0
    Remove in: 3.0.0
  - library.processors.ProcessingEngine.old_process_batch
    Replacement: ProcessingEngine.process_text_batch(text_items={items}, strip_whitespace={trim}, lowercase=not {uppercase})
    Since: 1.0.0
  - library.processors.ProcessingEngine.old_validate_data
    Replacement: ProcessingEngine.validate_input({input_data})
    Since: 1.5.0
    Remove in: 2.5.0

<TEMP>/library/utils.py: 6 deprecated function(s)
  - library.utils.cube
    Replacement: power({num}, 3)
    Since: 2.1.0
  - library.utils.legacy_divide
    Replacement: divide({numerator}, {denominator})
    Since: 2.0.0
  - library.utils.old_add
    Replacement: add({a}, {b})
    Since: 1.0.0
    Remove in: 3.0.0
  - library.utils.old_format_string
    Replacement: format_string(uppercase, {template}, *args)
    Since: 1.2.0
  - library.utils.old_multiply
    Replacement: multiply({x}, {y})
    Since: 1.5.0
    Remove in: 3.0.0
  - library.utils.square
    Replacement: power({num}, 2)
    Since: 1.8.0
    Remove in: 2.5.0

=== Summary ===
Total files analyzed: 11
Total deprecated functions found: 52

=== All deprecated functions ===

library.async_ops.get_json
  Replacement: 
  Since: 2.5.0

library.async_ops.legacy_upload
  Replacement: 
  Since: 1.0.0

library.async_ops.old_batch_fetch
  Replacement: 
  Since: 3.1.0

library.async_ops.old_fetch_data
  Replacement: 
  Since: 3.0.0
  Remove in: 4.0.0

library.config.AppConfig.DEPRECATED_LOG_LEVEL
  Replacement: Constant(ExprConstant { range: 2092..2098, value: Str("INFO"), kind: None })

library.config.AppConfig.LEGACY_ENDPOINTS
  Replacement: List(ExprList { range: 2322..2405, elts: [Constant(ExprConstant { range: 2332..2347, value: Str("/api/v1/users"), kind: None }), Constant(ExprConstant { range: 2357..2371, value: Str("/api/v1/data"), kind: None }), Constant(ExprConstant { range: 2382..2399, value: Str("/api/v1/reports"), kind: None })], ctx: Load })

library.config.AppConfig.LEGACY_PAGE_SIZE
  Replacement: Constant(ExprConstant { range: 2011..2013, value: Int(25), kind: None })

library.config.AppConfig.OLD_ENDPOINT
  Replacement: Constant(ExprConstant { range: 1947..1975, value: Str("https://api.example.com/v3"), kind: None })

library.config.AppConfig.OLD_LIMITS
  Replacement: Dict(ExprDict { range: 2164..2281, keys: [Some(Constant(ExprConstant { range: 2174..2195, value: Str("requests_per_minute"), kind: None })), Some(Constant(ExprConstant { range: 2211..2226, value: Str("max_file_size"), kind: None })), Some(Constant(ExprConstant { range: 2254..2271, value: Str("timeout_seconds"), kind: None }))], values: [Constant(ExprConstant { range: 2197..2201, value: Int(1000), kind: None }), Constant(ExprConstant { range: 2228..2236, value: Int(10485760), kind: None }), Constant(ExprConstant { range: 2273..2275, value: Int(30), kind: None })] })

library.config.AppConfig.OLD_LOG_SETTING
  Replacement: Constant(ExprConstant { range: 2048..2052, value: Bool(true), kind: None })

library.config.DEPRECATED_VERSION
  Replacement: Constant(ExprConstant { range: 1163..1167, value: Str("v3"), kind: None })

library.config.DevConfig.LEGACY_DEV_API
  Replacement: Constant(ExprConstant { range: 3819..3848, value: Str("https://dev-api.example.com"), kind: None })

library.config.DevConfig.OLD_DEBUG_MODE
  Replacement: Constant(ExprConstant { range: 3781..3785, value: Bool(true), kind: None })

library.config.FeatureFlags.DEPRECATED_SETTINGS
  Replacement: Dict(ExprDict { range: 3358..3532, keys: [Some(Constant(ExprConstant { range: 3368..3372, value: Str("ui"), kind: None })), Some(Constant(ExprConstant { range: 3421..3426, value: Str("api"), kind: None })), Some(Constant(ExprConstant { range: 3476..3486, value: Str("features"), kind: None }))], values: [Dict(ExprDict { range: 3374..3411, keys: [Some(Constant(ExprConstant { range: 3375..3382, value: Str("theme"), kind: None })), Some(Constant(ExprConstant { range: 3392..3404, value: Str("animations"), kind: None }))], values: [Constant(ExprConstant { range: 3384..3390, value: Str("dark"), kind: None }), Constant(ExprConstant { range: 3406..3410, value: Bool(true), kind: None })] }), Dict(ExprDict { range: 3428..3466, keys: [Some(Constant(ExprConstant { range: 3429..3441, value: Str("rate_limit"), kind: None })), Some(Constant(ExprConstant { range: 3449..3460, value: Str("cache_ttl"), kind: None }))], values: [Constant(ExprConstant { range: 3443..3447, value: Int(1000), kind: None }), Constant(ExprConstant { range: 3462..3465, value: Int(300), kind: None })] }), Dict(ExprDict { range: 3488..3526, keys: [Some(Constant(ExprConstant { range: 3489..3495, value: Str("beta"), kind: None })), Some(Constant(ExprConstant { range: 3504..3518, value: Str("experimental"), kind: None }))], values: [Constant(ExprConstant { range: 3497..3502, value: Bool(false), kind: None }), Constant(ExprConstant { range: 3520..3525, value: Bool(false), kind: None })] })] })

library.config.FeatureFlags.LEGACY_BETA
  Replacement: Constant(ExprConstant { range: 3171..3176, value: Bool(false), kind: None })

library.config.FeatureFlags.OLD_MONITORING
  Replacement: Constant(ExprConstant { range: 3248..3252, value: Bool(true), kind: None })

library.config.FeatureFlags.OLD_UI_FLAG
  Replacement: Constant(ExprConstant { range: 3100..3104, value: Bool(true), kind: None })

library.config.LEGACY_ALLOWED_ORIGINS
  Replacement: List(ExprList { range: 1492..1584, elts: [Constant(ExprConstant { range: 1498..1519, value: Str("https://example.com"), kind: None }), Constant(ExprConstant { range: 1525..1550, value: Str("https://www.example.com"), kind: None }), Constant(ExprConstant { range: 1557..1582, value: Str("https://app.example.com"), kind: None })], ctx: Load })

library.config.LEGACY_CACHE_ENABLED
  Replacement: Constant(ExprConstant { range: 1295..1299, value: Bool(true), kind: None })

library.config.LEGACY_RETRIES
  Replacement: Constant(ExprConstant { range: 1075..1076, value: Int(3), kind: None })

library.config.OLD_API_URL
  Replacement: Constant(ExprConstant { range: 930..958, value: Str("https://api.example.com/v3"), kind: None })

library.config.OLD_DATABASE_CONFIG
  Replacement: Dict(ExprDict { range: 1352..1432, keys: [Some(Constant(ExprConstant { range: 1358..1364, value: Str("host"), kind: None })), Some(Constant(ExprConstant { range: 1388..1394, value: Str("port"), kind: None })), Some(Constant(ExprConstant { range: 1406..1412, value: Str("name"), kind: None }))], values: [Constant(ExprConstant { range: 1366..1382, value: Str("db.example.com"), kind: None }), Constant(ExprConstant { range: 1396..1400, value: Int(5432), kind: None }), Constant(ExprConstant { range: 1414..1430, value: Str("app_production"), kind: None })] })

library.config.OLD_DEBUG_FLAG
  Replacement: Constant(ExprConstant { range: 1254..1259, value: Bool(false), kind: None })

library.config.OLD_HOST
  Replacement: Constant(ExprConstant { range: 1191..1207, value: Str("db.example.com"), kind: None })

library.config.OLD_TIMEOUT
  Replacement: Constant(ExprConstant { range: 1014..1016, value: Int(60), kind: None })

library.config.ProdConfig.LEGACY_PROD_API
  Replacement: Constant(ExprConstant { range: 4090..4115, value: Str("https://api.example.com"), kind: None })

library.config.ProdConfig.OLD_PROD_MODE
  Replacement: Constant(ExprConstant { range: 4050..4055, value: Bool(false), kind: None })

library.containers.LegacyContainer.__unicode__
  Replacement: str({self})
  Since: 2.0.0
  Remove in: 3.0.0

library.containers.LegacyContainer.get_item
  Replacement: {self}._items[{index}]
  Since: 2.1.0

library.containers.LegacyContainer.set_item
  Replacement: 
  Since: 2.1.0

library.containers.LegacyContainer.size
  Replacement: len({self})
  Since: 1.0.0

library.containers.LegacyContainer.to_str
  Replacement: str({self})
  Since: 1.0.0

library.containers.SmartList.get_count
  Replacement: len({self})
  Since: 1.0.0

library.containers.SmartList.length
  Replacement: len({self})
  Since: 1.0.0

library.models.LegacyUser.get_name
  Replacement: {self}._user.get_display_name()
  Since: 1.5.0
  Remove in: 2.5.0

library.models.LegacyUser.set_profile_data
  Replacement: {self}._user.update_profile(**{data})
  Since: 1.8.0

library.models.OldDataProcessor
  Replacement: 
  Since: 2.0.0
  Remove in: 3.0.0

library.models.SimpleProcessor
  Replacement: 
  Since: 1.0.0

library.processors.DataValidator.check_email
  Replacement: DataValidator.is_valid_email({email_addr})
  Since: 1.3.0
  Remove in: 2.0.0

library.processors.DataValidator.create_strict_validator
  Replacement: {cls}.create_validator(strict=True)
  Since: 1.0.0

library.processors.DataValidator.validate_phone_number
  Replacement: DataValidator.is_valid_phone({number}, country_code=None)
  Since: 1.6.0

library.processors.ProcessingEngine.legacy_clean_text
  Replacement: ProcessingEngine.normalize_text({text_data}, lowercase=True, strip_whitespace=True)
  Since: 2.1.0

library.processors.ProcessingEngine.legacy_fast_processor
  Replacement: {cls}.create_fast_engine()
  Since: 1.0.0

library.processors.ProcessingEngine.old_create_engine
  Replacement: 
  Since: 2.0.0
  Remove in: 3.0.0

library.processors.ProcessingEngine.old_process_batch
  Replacement: ProcessingEngine.process_text_batch(text_items={items}, strip_whitespace={trim}, lowercase=not {uppercase})
  Since: 1.0.0

library.processors.ProcessingEngine.old_validate_data
  Replacement: ProcessingEngine.validate_input({input_data})
  Since: 1.5.0
  Remove in: 2.5.0

library.utils.cube
  Replacement: power({num}, 3)
  Since: 2.1.0

library.utils.legacy_divide
  Replacement: divide({numerator}, {denominator})
  Since: 2.0.0

library.utils.old_add
  Replacement: add({a}, {b})
  Since: 1.0.0
  Remove in: 3.0.0

library.utils.old_format_string
  Replacement: format_string(uppercase, {template}, *args)
  Since: 1.2.0

library.utils.old_multiply
  Replacement: multiply({x}, {y})
  Since: 1.5.0
  Remove in: 3.0.0

library.utils.square
  Replacement: power({num}, 2)
  Since: 1.8.0
  Remove in: 2.5.0