Content-Length: 1371235 | pFad | https://github.com/simple-salesforce/simple-salesforce/pull/576

59 Feature/v1.12.2/connected app login by jon-wobken · Pull Request #576 · simple-salesforce/simple-salesforce · GitHub
Skip to content

Feature/v1.12.2/connected app login #576

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

Merged
merged 11 commits into from
Sep 8, 2022

Conversation

jon-wobken
Copy link
Collaborator

No description provided.

@jon-wobken jon-wobken merged commit b96a689 into release/v1.12.2 Sep 8, 2022
@jon-wobken jon-wobken deleted the feature/v1.12.2/connected_app_login branch September 8, 2022 17:33
jon-wobken added a commit that referenced this pull request Sep 12, 2022
* 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>
jon-wobken added a commit that referenced this pull request Sep 15, 2022
* 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>
alexdutton pushed a commit to co-cddo/simple-salesforce that referenced this pull request Oct 27, 2022
* Remove leftover reference to Python 3.5 support (simple-salesforce#563)

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

* Update CHANGES

* Feature/v1.12.2/connected app login (simple-salesforce#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 (simple-salesforce#575)

* add waits as arguments to exposed bulk api methods (simple-salesforce#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 (simple-salesforce#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 (simple-salesforce#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>
alexdutton pushed a commit to co-cddo/simple-salesforce that referenced this pull request Oct 27, 2022
* Remove leftover reference to Python 3.5 support (simple-salesforce#563)

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

* Update CHANGES

* Feature/v1.12.2/connected app login (simple-salesforce#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 (simple-salesforce#575)

* add waits as arguments to exposed bulk api methods (simple-salesforce#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 (simple-salesforce#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 (simple-salesforce#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>
jon-wobken added a commit that referenced this pull request Dec 7, 2022
* 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>
jon-wobken added a commit that referenced this pull request Jan 11, 2023
* 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>
jon-wobken added a commit that referenced this pull request Jan 12, 2023
* 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>
jon-wobken added a commit that referenced this pull request Jan 12, 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

* 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>
jon-wobken added a commit that referenced this pull request May 1, 2023
* 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>
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>
jon-wobken added a commit that referenced this pull request Aug 24, 2023
- [#648] Add support for bulk2.0

* 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

* 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

* add function to return all records to list of dictionaries

* updated default_api_version

* update version to 1.12.5

* Updates changes for v1.12.5

---------

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@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: 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>
jon-wobken added a commit that referenced this pull request Aug 24, 2023
* Feature/bulk api 2.0 (#678)

- [#648] Add support for bulk2.0

* 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

* 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

* add function to return all records to list of dictionaries

* updated default_api_version

* update version to 1.12.5

* Updates changes for v1.12.5

---------

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@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: 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>

* Add OAuth 2.0 client credentials login (#662)

* Update CHANGES

* #668 - update the docs: fix the badge & provide link to official docs (#669)

* docs(#668): update the readme to include link to official docs and fix the build badge

* feat(.gitignore): add .python-version to .gitignore

* Fix pylint errors

* updated pylint overgeneral-exceptions

* refactor test_connected_app_client_credentials_login_success to support python <3.9 - use split instead of remove suffix

---------

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@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: 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>
Co-authored-by: Sernin van de Krol <serninpc@paneidos.net>
Co-authored-by: Olaf Górski <olafgorski@protonmail.com>
jon-wobken added a commit that referenced this pull request Jul 18, 2024
* 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

* 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

* Refine CSV file splitting

* Add tests for 'bulk2'

* Update bulk2.py, support both csv_file and records for delete/hard_delete operations.

* Add tests for bulk2 hard_delete

---------

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: JonWobken <49450080+jon-wobken@users.noreply.github.com>
Co-authored-by: Lewington-pitsos <lewingtonpitsos@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.

1 participant








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/simple-salesforce/simple-salesforce/pull/576

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy