Skip to content

Commit 7188530

Browse files
authored
feat!: Remove beta Python support for Salesforce Functions (#703)
Support for Salesforce Functions is being retired: https://devcenter.heroku.com/articles/salesforce-functions-retirement https://github.com/heroku/function-migration Since Python support for Salesforce Functions is still in beta, support for it is being removed now, prior to that of the GA Functions languages. GUS-W-12613694.
1 parent 237fec2 commit 7188530

File tree

4 files changed

+8
-24
lines changed

4 files changed

+8
-24
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -482,11 +482,11 @@ Create a Salesforce Function with basic scaffolding specific to a given language
482482

483483
```
484484
USAGE
485-
$ sf generate function -l java|javascript|python|typescript [-n <value> | ]
485+
$ sf generate function -l java|javascript|typescript [-n <value> | ]
486486
487487
FLAGS
488488
-l, --language=<option> (required) The language in which the function is written.
489-
<options: java|javascript|python|typescript>
489+
<options: java|javascript|typescript>
490490
-n, --function-name=<value> Function name. Must start with a capital letter.
491491
492492
DESCRIPTION
@@ -609,12 +609,12 @@ Build and run a Salesforce Function.
609609

610610
```
611611
USAGE
612-
$ sf run function start [-p <value>] [-b <value>] [-l auto|java|javascript|python|typescript] [-v]
612+
$ sf run function start [-p <value>] [-b <value>] [-l auto|java|javascript|typescript] [-v]
613613
614614
FLAGS
615615
-b, --debug-port=<value> [default: 9229] Port for remote debugging.
616616
-l, --language=<option> [default: auto] The language that the function runs in.
617-
<options: auto|java|javascript|python|typescript>
617+
<options: auto|java|javascript|typescript>
618618
-p, --port=<value> [default: 8080] Port for running the function.
619619
-v, --verbose Output additional logs.
620620
@@ -649,12 +649,12 @@ Build and run a Salesforce Function locally.
649649

650650
```
651651
USAGE
652-
$ sf run function start local [-p <value>] [-b <value>] [-l auto|java|javascript|python|typescript]
652+
$ sf run function start local [-p <value>] [-b <value>] [-l auto|java|javascript|typescript]
653653
654654
FLAGS
655655
-b, --debug-port=<value> [default: 9229] Port to use for debugging the function.
656656
-l, --language=<option> [default: auto] The language in which the function is written.
657-
<options: auto|java|javascript|python|typescript>
657+
<options: auto|java|javascript|typescript>
658658
-p, --port=<value> [default: 8080] Port to bind the invoker to.
659659
660660
DESCRIPTION

src/commands/generate/function.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const messages = Messages.loadMessages('@salesforce/plugin-functions', 'generate
1616
// TODO: Make sf-functions-core export the list of language options it supports
1717
// for the generate function feature, and use that instead of hardcoding here.
1818
// See W-12120598.
19-
const languageOptions = ['java', 'javascript', 'python', 'typescript'];
19+
const languageOptions = ['java', 'javascript', 'typescript'];
2020

2121
/**
2222
* Based on given language, create function project with specific scaffolding.
@@ -63,10 +63,6 @@ export default class GenerateFunction extends Command {
6363
);
6464
}
6565

66-
if (flags.language === 'python') {
67-
this.warn('Python support for Salesforce Functions is experimental.');
68-
}
69-
7066
if (flags.name) {
7167
this.warn(messages.getMessage('flags.name.deprecation'));
7268
}

src/commands/run/function/start/local.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const messages = Messages.loadMessages('@salesforce/plugin-functions', 'run.func
1717
// TODO: Make sf-functions-core export the list of language options it supports
1818
// for the local functions runners, and use that instead of hardcoding here.
1919
// See W-12120598.
20-
export const languageOptions = ['auto', 'java', 'javascript', 'python', 'typescript'];
20+
export const languageOptions = ['auto', 'java', 'javascript', 'typescript'];
2121

2222
export default class Local extends Command {
2323
static description = messages.getMessage('summary');

test/commands/run/function/start/local.test.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,6 @@ describe('sf run function start local', () => {
8787
});
8888
});
8989

90-
context('with -l python', () => {
91-
test
92-
.command(['run:function:start:local', '-l', 'python'])
93-
.it('should start the local runner in python mode', (ctx) => {
94-
expect(localRunConstructor).to.have.been.calledWith('python', {
95-
port: 8080,
96-
debugPort: 9229,
97-
path: defaultFunctionPath,
98-
});
99-
});
100-
});
101-
10290
context('with -l typescript', () => {
10391
test
10492
.command(['run:function:start:local', '-l', 'typescript'])

0 commit comments

Comments
 (0)