Skip to content

Commit c04f965

Browse files
committed
Changes to handle deprecation of imp module. Switched to importlib.
1 parent 279ef38 commit c04f965

File tree

62 files changed

+237
-237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+237
-237
lines changed

AcceptSuite/create-an-accept-payment-transaction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import os, sys
2-
import imp
2+
from importlib.machinery import SourceFileLoader
33
import time
44

55
from authorizenet import apicontractsv1
66
from authorizenet.apicontrollers import *
7-
constants = imp.load_source('modulename', 'constants.py')
7+
constants = SourceFileLoader('modulename', 'constants.py').load_module()
88
from decimal import *
99

1010
def create_an_accept_payment_transaction(amount):

AcceptSuite/get-accept-customer-profile-page.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import os, sys
2-
import imp
2+
from importlib.machinery import SourceFileLoader
33

44
from authorizenet import apicontractsv1
55
from authorizenet.apicontrollers import *
6-
constants = imp.load_source('modulename', 'constants.py')
6+
constants = SourceFileLoader('modulename', 'constants.py').load_module()
77
from decimal import *
88

99
def get_accept_customer_profile_page(customerProfileId):

AcceptSuite/get-an-accept-payment-page.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import os, sys
2-
import imp
2+
from importlib.machinery import SourceFileLoader
33

44
from authorizenet import apicontractsv1
55
from authorizenet.apicontrollers import *
6-
constants = imp.load_source('modulename', 'constants.py')
6+
constants = SourceFileLoader('modulename', 'constants.py').load_module()
77
from decimal import *
88

99
def get_an_accept_payment_page(amount):

CustomerProfiles/create-customer-payment-profile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import os, sys
2-
import imp
2+
from importlib.machinery import SourceFileLoader
33

44
from authorizenet import apicontractsv1
55
from authorizenet.apicontrollers import *
6-
constants = imp.load_source('modulename', 'constants.py')
6+
constants = SourceFileLoader('modulename', 'constants.py').load_module()
77

88
def create_customer_payment_profile(customerProfileId):
99
merchantAuth = apicontractsv1.merchantAuthenticationType()

CustomerProfiles/create-customer-profile-from-transaction.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import os, sys
2-
import imp
2+
from importlib.machinery import SourceFileLoader
33

44
from authorizenet import apicontractsv1
55
from authorizenet.apicontrollers import *
6-
constants = imp.load_source('modulename', 'constants.py')
6+
constants = SourceFileLoader('modulename', 'constants.py').load_module()
77

88
def create_customer_profile_from_transaction(transactionId):
99
merchantAuth = apicontractsv1.merchantAuthenticationType()

CustomerProfiles/create-customer-profile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import os, sys
2-
import imp
2+
from importlib.machinery import SourceFileLoader
33

44
from authorizenet import apicontractsv1
55
from authorizenet.apicontrollers import *
6-
constants = imp.load_source('modulename', 'constants.py')
6+
constants = SourceFileLoader('modulename', 'constants.py').load_module()
77
import random
88

99
def create_customer_profile():

CustomerProfiles/create-customer-shipping-address.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import os, sys
2-
import imp
2+
from importlib.machinery import SourceFileLoader
33

44
# Gives error if an address is already present for the given customer Id
55
from authorizenet import apicontractsv1
66
from authorizenet.apicontrollers import *
7-
constants = imp.load_source('modulename', 'constants.py')
7+
constants = SourceFileLoader('modulename', 'constants.py').load_module()
88

99
def create_customer_shipping_address(customerProfileId):
1010
# Give merchant details

CustomerProfiles/delete-customer-payment-profile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import os, sys
2-
import imp
2+
from importlib.machinery import SourceFileLoader
33

44
from authorizenet import apicontractsv1
55
from authorizenet.apicontrollers import *
6-
constants = imp.load_source('modulename', 'constants.py')
6+
constants = SourceFileLoader('modulename', 'constants.py').load_module()
77

88
def delete_customer_payment_profile(customerProfileId, customerPaymentProfileId):
99
merchantAuth = apicontractsv1.merchantAuthenticationType()

CustomerProfiles/delete-customer-profile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import os, sys
2-
import imp
2+
from importlib.machinery import SourceFileLoader
33

44
from authorizenet import apicontractsv1
55
from authorizenet.apicontrollers import *
6-
constants = imp.load_source('modulename', 'constants.py')
6+
constants = SourceFileLoader('modulename', 'constants.py').load_module()
77

88
def delete_customer_profile(customerProfileId):
99
merchantAuth = apicontractsv1.merchantAuthenticationType()

CustomerProfiles/delete-customer-shipping-address.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import os, sys
2-
import imp
2+
from importlib.machinery import SourceFileLoader
33

44
from authorizenet import apicontractsv1
55
from authorizenet.apicontrollers import *
6-
constants = imp.load_source('modulename', 'constants.py')
6+
constants = SourceFileLoader('modulename', 'constants.py').load_module()
77

88
def delete_customer_shipping_address(customerProfileId, customerProfileShippingId):
99

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy