Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use unescaped username for JWT claim #612

Conversation

hkajiwara
Copy link
Contributor

jon-wobken and others added 2 commits January 18, 2023 08:14
* Update setup.py

Update pyjwt dependency

* Update setup.py

include cryptography for requirement for pyjwt

* Update setup.py

include pyjwt[crypto] in install requirements

* Update setup.py

remove [crypto] from pyjwt[crypto] in install_requires as causes travis-ci failure to build
JWT Bearer Flow needs JWT claim sub containg unescaped username
Connected App Login has been fixed by simple-salesforce#604
@jon-wobken jon-wobken changed the base branch from master to release/v1.12.4 April 20, 2023 16:14
@jon-wobken jon-wobken merged commit 0ca95d2 into simple-salesforce:release/v1.12.4 Apr 20, 2023
1 check failed
jon-wobken added a commit that referenced this pull request May 16, 2023
* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Fix typo in main README (#636)

* Bug/pyjwt dependency (#610)

* Update setup.py

Update pyjwt dependency

* Update setup.py

include cryptography for requirement for pyjwt

* Update setup.py

include pyjwt[crypto] in install requirements

* Update setup.py

remove [crypto] from pyjwt[crypto] in install_requires as causes travis-ci failure to build

* remove extra leading space

---------

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Updated __getattr__ function to create SFType object with object_pairs_hook (#634)

* Bug/pyjwt dependency (#610)

* Update setup.py

Update pyjwt dependency

* Update setup.py

include cryptography for requirement for pyjwt

* Update setup.py

include pyjwt[crypto] in install requirements

* Update setup.py

remove [crypto] from pyjwt[crypto] in install_requires as causes travis-ci failure to build

* Updated __getattr__ function to create SFType object with object_pairs_hook as input

Right now let us say that the user creates a SFType object using __getattr__ function which is present in the class SalesForce. If the SalesForce object is initiated using object_pairs_hook being dict or print. In that case the user would want the response from SFType to be same as that object as well. So I have added object_pairs_hook in the SFType object which is being called in the __getattr__ function of the SalesForce Class

* Updated __getattr__ function to create SFType object with object_pairs_hook

Right now let us say that the user creates a SFType object using getattr function which is present in the class SalesForce. If the SalesForce object is initiated using object_pairs_hook being dict or print. In that case the user would want the response from SFType to be same as that object as well. So I have added object_pairs_hook in the SFType object which is being called in the getattr function of the SalesForce Class

* removed whitespaces

* pylint

---------

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Fix indentation in setup.py (#618)

* Bug/pyjwt dependency (#610)

* Update setup.py

Update pyjwt dependency

* Update setup.py

include cryptography for requirement for pyjwt

* Update setup.py

include pyjwt[crypto] in install requirements

* Update setup.py

remove [crypto] from pyjwt[crypto] in install_requires as causes travis-ci failure to build

* Fix indent in setup.py

---------

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Update README.rst (#614)

* Update misspellings with codespell (#607)

See https://github.com/codespell-project/codespell

* fix: use unescaped username for JWT claim (#612)

* Bug/pyjwt dependency (#610)

* Update setup.py

Update pyjwt dependency

* Update setup.py

include cryptography for requirement for pyjwt

* Update setup.py

include pyjwt[crypto] in install requirements

* Update setup.py

remove [crypto] from pyjwt[crypto] in install_requires as causes travis-ci failure to build

* fix: use unescaped username for JWT claim

JWT Bearer Flow needs JWT claim sub containg unescaped username
Connected App Login has been fixed by #604

---------

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Add support for bulk 2.0 (#648)

* Release/v1.12.2 (#577)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Update api.py

fix missing password argument for connected app

* Release/v1.12.2 (#581)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Update api.py

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Additional documentation on using Simple Salesforce with Process Approvals REST API (#585)

* Adding in a documentation file that provides users with a walk through of how to use SimpleSalesforce to integrate with other SFDC REST endpoints.

* Updating content of code examples

Co-authored-by: tlange <tlange@qualtric.com>

* Update test_login.py

Update args for test_connected_app_login_success

* Update test_login.py

* Release/v1.12.3 (#606)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Update api.py

fix missing argument for connected app

* Fix infinite refresh session issue (#594)

* Release/v1.12.2 (#577)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Update api.py

fix missing password argument for connected app

* Release/v1.12.2 (#581)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Update api.py

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Additional documentation on using Simple Salesforce with Process Approvals REST API (#585)

* Adding in a documentation file that provides users with a walk through of how to use SimpleSalesforce to integrate with other SFDC REST endpoints.

* Updating content of code examples

Co-authored-by: tlange <tlange@qualtric.com>

* fix: infinite refresh session issue

Refresh session only when getting the status 401 and the error code INVALID_SESSION_ID
Fixes #569

* Simplify the fix code

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>
Co-authored-by: langet0695 <77029254+langet0695@users.noreply.github.com>
Co-authored-by: tlange <tlange@qualtric.com>

* Fix _add_autosized_batches to include all records, and add tests (#591)

Previously _add_autosized_batches missed out a single record when
creating batches for record sets containing more than one record. I
haven't worked out why, but this is a slight re-implementation that now
works.

The previous implementation had no test coverage so this commit also
adds tests that do the following:

* ensure that when batch_size is passed as auto, that
  _add_autosized_batches is called appropriately
* ensures that when batching all records are accounted for in the
  resulting batches, both by record count and then by flattening the
  batches and comparing values
* ensures that every batch is within the record and size limits
* ensures that except for the last batch, every batch has either the
  maximum number of records (10,000) or that adding another record would
  tip it over the character count limit

Fixes #590.

* Replace Authlib with PyJWT (#537)

* Strip leading v from api_version (#522)

* Strip leading v from api_version

Strip leading v from version before templating into url. Including the 
leading v in the api_version in url results in the server responding with 
API V7.0 in the server_url

* fix string formatting

Fix string formatting

* Replace silent version correction with Exception

Raise an exception when sf_version is specified with a leading 'v', since 
specifying a version with the leading 'v' leads to surprising behavior in
Salesforce.

* Update .travis.yml

Add python 3.9,3.10, and 3.11 to travis-ci

* Update README.rst

Add python 3.9,3.10, and 3.11 to readme

* Update login.py

removed unused header in connected app login

* Update setup.py

update classifiers

* Update setup.py

replace nose with pytest

* Update setup.py

update test_suite

* Update test_login.py

set password for test_connected_app_login_failure

* Update test_login.py

* Update test_login.py

typo in password arg

* Use f-strings (#597)

* Use f-strings

since minimal supported version is already Python 3.6.

* Avoid breaking strings

as much as possible within 80 columns.

* Update for release/v1.12.3 branch

* Fix escaped username and password (#604)

* Release/v1.12.2 (#577)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Update api.py

fix missing password argument for connected app

* Release/v1.12.2 (#581)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Update api.py

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Additional documentation on using Simple Salesforce with Process Approvals REST API (#585)

* Adding in a documentation file that provides users with a walk through of how to use SimpleSalesforce to integrate with other SFDC REST endpoints.

* Updating content of code examples

Co-authored-by: tlange <tlange@qualtric.com>

* Update test_login.py

Update args for test_connected_app_login_success

* Update test_login.py

* Fix escaped username and password

- Connected App Login (OAuth Username-Password Flow) uses non-escape username and password value
- Fixes #600

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>
Co-authored-by: langet0695 <77029254+langet0695@users.noreply.github.com>
Co-authored-by: tlange <tlange@qualtric.com>

* Use pathlib.Path (#599)

also:
- default encoding in bytes.decode is already 'utf-8'. See
  https://docs.python.org/3.6/library/stdtypes.html#bytes.decode

Available at least since Python 3.6, which is the minimal supported
version.

* Fix upsert metadata (#603)

* Release/v1.12.2 (#577)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Update api.py

fix missing password argument for connected app

* Release/v1.12.2 (#581)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Update api.py

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Additional documentation on using Simple Salesforce with Process Approvals REST API (#585)

* Adding in a documentation file that provides users with a walk through of how to use SimpleSalesforce to integrate with other SFDC REST endpoints.

* Updating content of code examples

Co-authored-by: tlange <tlange@qualtric.com>

* Update test_login.py

Update args for test_connected_app_login_success

* Update test_login.py

* Fixes: #602

upsert of metadataType wrongly calls updateMetadata. It should be upsertMetadata.

* Update login.py

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>
Co-authored-by: langet0695 <77029254+langet0695@users.noreply.github.com>
Co-authored-by: tlange <tlange@qualtric.com>

* Update __version__.py

Version Update

* Update CHANGES

Update changes

* Update syntax for Python 3.6+ (#605)

* Update syntax for Python 3.6+

using pyupgrade. Use `yield from`.
See https://github.com/asottile/pyupgrade#yield--yield-from

Remove redundant generator parenthesis.

Also remove unused `login_token_request_data` variable, and change
corresponding variables names to `token_data`, as different names were
being used and might have let to the confusion around the unused one.

* Remove redundant `$` from end of regular expression

* Update login.py

fix missing f-string and remove duplicate connected app elif logic

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Hiroki Kajiwara <hkajiwara@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>
Co-authored-by: langet0695 <77029254+langet0695@users.noreply.github.com>
Co-authored-by: tlange <tlange@qualtric.com>
Co-authored-by: Alex Dutton <gh@alexdutton.co.uk>
Co-authored-by: thatguysimon <snizov@twistbioscience.com>
Co-authored-by: Hamilton Kibbe <hamilton.kibbe@gmail.com>
Co-authored-by: Eric Nielsen <4120606+ericbn@users.noreply.github.com>

* Bug/pyjwt dependency (#610)

* Update setup.py

Update pyjwt dependency

* Update setup.py

include cryptography for requirement for pyjwt

* Update setup.py

include pyjwt[crypto] in install requirements

* Update setup.py

remove [crypto] from pyjwt[crypto] in install_requires as causes travis-ci failure to build

* Add support for bulk 2.0

* Add documents for bulk 2.0

* Fix pylint static error

* Update .pylintrc, disable `broad-exception-raised`

* Add enhancements for bulk 2.0

* Add enhancements for bulk 2.0

* Fix pylint static error

* Fix pylint check error

* Update dependencies

* Fix parallel ingest jobs error

* Add support for download records directly

* Fix `no-self-use` removed for pylint~=2.14

* Update documents for bulk 2.0

* Update enumerate types

* Add support for downloading ingest record results directly

* Update documents for bulk 2.0

---------

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>
Co-authored-by: langet0695 <77029254+langet0695@users.noreply.github.com>
Co-authored-by: tlange <tlange@qualtric.com>
Co-authored-by: Hiroki Kajiwara <hkajiwara@gmail.com>
Co-authored-by: Alex Dutton <gh@alexdutton.co.uk>
Co-authored-by: thatguysimon <snizov@twistbioscience.com>
Co-authored-by: Hamilton Kibbe <hamilton.kibbe@gmail.com>
Co-authored-by: Eric Nielsen <4120606+ericbn@users.noreply.github.com>

* added support for list of dictionary in upsert/update/insert/delete methods

* fixed pylint errors, converted list compression to set compression, added docstring to _convert_dict_to_csv

* Update metadata.py

disable broad-exception raised

* Update metadata.py

_retrieve_deploy_result - pylint: disable=broad-exception-raised

* Update CHANGES

* Update __version__.py

---------

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Eric Liprandi <82050188+ericl-billgo@users.noreply.github.com>
Co-authored-by: Purujit <41872519+GuptaPurujit@users.noreply.github.com>
Co-authored-by: Charles Chan <charleswhchan@users.noreply.github.com>
Co-authored-by: Brendan McDonald <45665356+wbmcdonald4@users.noreply.github.com>
Co-authored-by: Eric Nielsen <4120606+ericbn@users.noreply.github.com>
Co-authored-by: Hiroki Kajiwara <hkajiwara@gmail.com>
Co-authored-by: wang zhiwei <noparking188@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>
Co-authored-by: langet0695 <77029254+langet0695@users.noreply.github.com>
Co-authored-by: tlange <tlange@qualtric.com>
Co-authored-by: Alex Dutton <gh@alexdutton.co.uk>
Co-authored-by: thatguysimon <snizov@twistbioscience.com>
Co-authored-by: Hamilton Kibbe <hamilton.kibbe@gmail.com>
jon-wobken added a commit that referenced this pull request May 17, 2023
* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Fix typo in main README (#636)

* Bug/pyjwt dependency (#610)

* Update setup.py

Update pyjwt dependency

* Update setup.py

include cryptography for requirement for pyjwt

* Update setup.py

include pyjwt[crypto] in install requirements

* Update setup.py

remove [crypto] from pyjwt[crypto] in install_requires as causes travis-ci failure to build

* remove extra leading space

---------

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Updated __getattr__ function to create SFType object with object_pairs_hook (#634)

* Bug/pyjwt dependency (#610)

* Update setup.py

Update pyjwt dependency

* Update setup.py

include cryptography for requirement for pyjwt

* Update setup.py

include pyjwt[crypto] in install requirements

* Update setup.py

remove [crypto] from pyjwt[crypto] in install_requires as causes travis-ci failure to build

* Updated __getattr__ function to create SFType object with object_pairs_hook as input

Right now let us say that the user creates a SFType object using __getattr__ function which is present in the class SalesForce. If the SalesForce object is initiated using object_pairs_hook being dict or print. In that case the user would want the response from SFType to be same as that object as well. So I have added object_pairs_hook in the SFType object which is being called in the __getattr__ function of the SalesForce Class

* Updated __getattr__ function to create SFType object with object_pairs_hook

Right now let us say that the user creates a SFType object using getattr function which is present in the class SalesForce. If the SalesForce object is initiated using object_pairs_hook being dict or print. In that case the user would want the response from SFType to be same as that object as well. So I have added object_pairs_hook in the SFType object which is being called in the getattr function of the SalesForce Class

* removed whitespaces

* pylint

---------

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Fix indentation in setup.py (#618)

* Bug/pyjwt dependency (#610)

* Update setup.py

Update pyjwt dependency

* Update setup.py

include cryptography for requirement for pyjwt

* Update setup.py

include pyjwt[crypto] in install requirements

* Update setup.py

remove [crypto] from pyjwt[crypto] in install_requires as causes travis-ci failure to build

* Fix indent in setup.py

---------

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Update README.rst (#614)

* Update misspellings with codespell (#607)

See https://github.com/codespell-project/codespell

* fix: use unescaped username for JWT claim (#612)

* Bug/pyjwt dependency (#610)

* Update setup.py

Update pyjwt dependency

* Update setup.py

include cryptography for requirement for pyjwt

* Update setup.py

include pyjwt[crypto] in install requirements

* Update setup.py

remove [crypto] from pyjwt[crypto] in install_requires as causes travis-ci failure to build

* fix: use unescaped username for JWT claim

JWT Bearer Flow needs JWT claim sub containg unescaped username
Connected App Login has been fixed by #604

---------

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Add support for bulk 2.0 (#648)

* Release/v1.12.2 (#577)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Update api.py

fix missing password argument for connected app

* Release/v1.12.2 (#581)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Update api.py

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Additional documentation on using Simple Salesforce with Process Approvals REST API (#585)

* Adding in a documentation file that provides users with a walk through of how to use SimpleSalesforce to integrate with other SFDC REST endpoints.

* Updating content of code examples

Co-authored-by: tlange <tlange@qualtric.com>

* Update test_login.py

Update args for test_connected_app_login_success

* Update test_login.py

* Release/v1.12.3 (#606)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Update api.py

fix missing argument for connected app

* Fix infinite refresh session issue (#594)

* Release/v1.12.2 (#577)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Update api.py

fix missing password argument for connected app

* Release/v1.12.2 (#581)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Update api.py

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Additional documentation on using Simple Salesforce with Process Approvals REST API (#585)

* Adding in a documentation file that provides users with a walk through of how to use SimpleSalesforce to integrate with other SFDC REST endpoints.

* Updating content of code examples

Co-authored-by: tlange <tlange@qualtric.com>

* fix: infinite refresh session issue

Refresh session only when getting the status 401 and the error code INVALID_SESSION_ID
Fixes #569

* Simplify the fix code

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>
Co-authored-by: langet0695 <77029254+langet0695@users.noreply.github.com>
Co-authored-by: tlange <tlange@qualtric.com>

* Fix _add_autosized_batches to include all records, and add tests (#591)

Previously _add_autosized_batches missed out a single record when
creating batches for record sets containing more than one record. I
haven't worked out why, but this is a slight re-implementation that now
works.

The previous implementation had no test coverage so this commit also
adds tests that do the following:

* ensure that when batch_size is passed as auto, that
  _add_autosized_batches is called appropriately
* ensures that when batching all records are accounted for in the
  resulting batches, both by record count and then by flattening the
  batches and comparing values
* ensures that every batch is within the record and size limits
* ensures that except for the last batch, every batch has either the
  maximum number of records (10,000) or that adding another record would
  tip it over the character count limit

Fixes #590.

* Replace Authlib with PyJWT (#537)

* Strip leading v from api_version (#522)

* Strip leading v from api_version

Strip leading v from version before templating into url. Including the 
leading v in the api_version in url results in the server responding with 
API V7.0 in the server_url

* fix string formatting

Fix string formatting

* Replace silent version correction with Exception

Raise an exception when sf_version is specified with a leading 'v', since 
specifying a version with the leading 'v' leads to surprising behavior in
Salesforce.

* Update .travis.yml

Add python 3.9,3.10, and 3.11 to travis-ci

* Update README.rst

Add python 3.9,3.10, and 3.11 to readme

* Update login.py

removed unused header in connected app login

* Update setup.py

update classifiers

* Update setup.py

replace nose with pytest

* Update setup.py

update test_suite

* Update test_login.py

set password for test_connected_app_login_failure

* Update test_login.py

* Update test_login.py

typo in password arg

* Use f-strings (#597)

* Use f-strings

since minimal supported version is already Python 3.6.

* Avoid breaking strings

as much as possible within 80 columns.

* Update for release/v1.12.3 branch

* Fix escaped username and password (#604)

* Release/v1.12.2 (#577)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Update api.py

fix missing password argument for connected app

* Release/v1.12.2 (#581)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Update api.py

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Additional documentation on using Simple Salesforce with Process Approvals REST API (#585)

* Adding in a documentation file that provides users with a walk through of how to use SimpleSalesforce to integrate with other SFDC REST endpoints.

* Updating content of code examples

Co-authored-by: tlange <tlange@qualtric.com>

* Update test_login.py

Update args for test_connected_app_login_success

* Update test_login.py

* Fix escaped username and password

- Connected App Login (OAuth Username-Password Flow) uses non-escape username and password value
- Fixes #600

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>
Co-authored-by: langet0695 <77029254+langet0695@users.noreply.github.com>
Co-authored-by: tlange <tlange@qualtric.com>

* Use pathlib.Path (#599)

also:
- default encoding in bytes.decode is already 'utf-8'. See
  https://docs.python.org/3.6/library/stdtypes.html#bytes.decode

Available at least since Python 3.6, which is the minimal supported
version.

* Fix upsert metadata (#603)

* Release/v1.12.2 (#577)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Update api.py

fix missing password argument for connected app

* Release/v1.12.2 (#581)

* Remove leftover reference to Python 3.5 support (#563)

Support for Python 3.5 was dropped in #556, so it should not be listed
as a supported version in the README.

* Update CHANGES

* Feature/v1.12.2/connected app login (#574)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Bug/v1.12.2/bulk autosize batch (#575)

* add waits as arguments to exposed bulk api methods (#565)

* add waits as arguments to simple salesforce top level queries

* fix missing wait pass-through

* obey line length rules

* clean up trailing whitespace

* Update CHANGES

* Update bulk.py

fix adding of int to string in bulk autosize batches

* Update bulk.py

fix autosize batching

* Update bulk.py

add ability to bypass results being returned

* Update bulk.py

Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>

* Feature/v1.12.2/connected app login (#576)

* add support for connected app

Add connected app support

* add connected app support

add connected app support

* Update __version__.py

* add tests for connected app login

* clean up formatting

* clean up formatting

* Update login.py

fix pylint errors

* Update api.py

fix pylint errors

* Update CHANGES

* Update README.rst

update read me for connected app and helper functions/related recordsq uery

* Avoid a ZeroDivisionError in bulk.py (#568)

* Raise an error if no data provided in bulk queries

* Update bulk.py

fix trailing whitespace

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>

* Update api.py

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>

* Additional documentation on using Simple Salesforce with Process Approvals REST API (#585)

* Adding in a documentation file that provides users with a walk through of how to use SimpleSalesforce to integrate with other SFDC REST endpoints.

* Updating content of code examples

Co-authored-by: tlange <tlange@qualtric.com>

* Update test_login.py

Update args for test_connected_app_login_success

* Update test_login.py

* Fixes: #602

upsert of metadataType wrongly calls updateMetadata. It should be upsertMetadata.

* Update login.py

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>
Co-authored-by: langet0695 <77029254+langet0695@users.noreply.github.com>
Co-authored-by: tlange <tlange@qualtric.com>

* Update __version__.py

Version Update

* Update CHANGES

Update changes

* Update syntax for Python 3.6+ (#605)

* Update syntax for Python 3.6+

using pyupgrade. Use `yield from`.
See https://github.com/asottile/pyupgrade#yield--yield-from

Remove redundant generator parenthesis.

Also remove unused `login_token_request_data` variable, and change
corresponding variables names to `token_data`, as different names were
being used and might have let to the confusion around the unused one.

* Remove redundant `$` from end of regular expression

* Update login.py

fix missing f-string and remove duplicate connected app elif logic

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Hiroki Kajiwara <hkajiwara@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>
Co-authored-by: langet0695 <77029254+langet0695@users.noreply.github.com>
Co-authored-by: tlange <tlange@qualtric.com>
Co-authored-by: Alex Dutton <gh@alexdutton.co.uk>
Co-authored-by: thatguysimon <snizov@twistbioscience.com>
Co-authored-by: Hamilton Kibbe <hamilton.kibbe@gmail.com>
Co-authored-by: Eric Nielsen <4120606+ericbn@users.noreply.github.com>

* Bug/pyjwt dependency (#610)

* Update setup.py

Update pyjwt dependency

* Update setup.py

include cryptography for requirement for pyjwt

* Update setup.py

include pyjwt[crypto] in install requirements

* Update setup.py

remove [crypto] from pyjwt[crypto] in install_requires as causes travis-ci failure to build

* Add support for bulk 2.0

* Add documents for bulk 2.0

* Fix pylint static error

* Update .pylintrc, disable `broad-exception-raised`

* Add enhancements for bulk 2.0

* Add enhancements for bulk 2.0

* Fix pylint static error

* Fix pylint check error

* Update dependencies

* Fix parallel ingest jobs error

* Add support for download records directly

* Fix `no-self-use` removed for pylint~=2.14

* Update documents for bulk 2.0

* Update enumerate types

* Add support for downloading ingest record results directly

* Update documents for bulk 2.0

---------

Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>
Co-authored-by: langet0695 <77029254+langet0695@users.noreply.github.com>
Co-authored-by: tlange <tlange@qualtric.com>
Co-authored-by: Hiroki Kajiwara <hkajiwara@gmail.com>
Co-authored-by: Alex Dutton <gh@alexdutton.co.uk>
Co-authored-by: thatguysimon <snizov@twistbioscience.com>
Co-authored-by: Hamilton Kibbe <hamilton.kibbe@gmail.com>
Co-authored-by: Eric Nielsen <4120606+ericbn@users.noreply.github.com>

* added support for list of dictionary in upsert/update/insert/delete methods

* fixed pylint errors, converted list compression to set compression, added docstring to _convert_dict_to_csv

* Update metadata.py

disable broad-exception raised

* Update metadata.py

_retrieve_deploy_result - pylint: disable=broad-exception-raised

* Update CHANGES

* Update __version__.py

* Revert "Merge branch 'feature/bulk_api_2.0' into release/v1.12.4"

This reverts commit 3e61565, reversing
changes made to 2360173.

---------

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@gmail.com>
Co-authored-by: Eric Liprandi <82050188+ericl-billgo@users.noreply.github.com>
Co-authored-by: Purujit <41872519+GuptaPurujit@users.noreply.github.com>
Co-authored-by: Charles Chan <charleswhchan@users.noreply.github.com>
Co-authored-by: Brendan McDonald <45665356+wbmcdonald4@users.noreply.github.com>
Co-authored-by: Eric Nielsen <4120606+ericbn@users.noreply.github.com>
Co-authored-by: Hiroki Kajiwara <hkajiwara@gmail.com>
Co-authored-by: wang zhiwei <noparking188@gmail.com>
Co-authored-by: Vandan <vandanadhvaryu99@gmail.com>
Co-authored-by: langet0695 <77029254+langet0695@users.noreply.github.com>
Co-authored-by: tlange <tlange@qualtric.com>
Co-authored-by: Alex Dutton <gh@alexdutton.co.uk>
Co-authored-by: thatguysimon <snizov@twistbioscience.com>
Co-authored-by: Hamilton Kibbe <hamilton.kibbe@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants