[PR #636] [MERGED] Removed requirement for examples/app.py to specify port multiple times (only SPOTIPY_REDIRECT_URI needs to contain the port) #971

Closed
opened 2026-02-28 00:03:02 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/636
Author: @AlexCherrypi
Created: 1/30/2021
Status: Merged
Merged: 1/30/2021
Merged by: @stephanebruckert

Base: masterHead: patch-1


📝 Commits (9)

  • 7f94283 pull port from SPOTIPY_REDIRECT_URI rather than having to specify itas --port
  • 4f1b634 keep legacy PORT envar support.
  • 6015373 added app.py changes to CHANGELOG
  • c03287d adding forgotten bracket
  • db05ff9 added end of line- requirement to regex for good measure
  • e2c6f7d fix indentation
  • f2aa957 Readability and requested changes
  • ad5fb12 remove re dependency as we don't need it anymore
  • 359798d Simplify the port selection for app.run

📊 Changes

2 files changed (+4 additions, -2 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 examples/app.py (+3 -2)

📄 Description

we try to get the port from SPOTIPY_REDIRECT_URI as we already have to set it there anyway.
if we don't succeed we use 8080 as fallback.
for legacy compatibility we still allow PORT envar and let it override the setting


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/spotipy-dev/spotipy/pull/636 **Author:** [@AlexCherrypi](https://github.com/AlexCherrypi) **Created:** 1/30/2021 **Status:** ✅ Merged **Merged:** 1/30/2021 **Merged by:** [@stephanebruckert](https://github.com/stephanebruckert) **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (9) - [`7f94283`](https://github.com/spotipy-dev/spotipy/commit/7f942832cb43676d2627efb99d8b8bb4fb33d8ad) pull port from SPOTIPY_REDIRECT_URI rather than having to specify itas --port - [`4f1b634`](https://github.com/spotipy-dev/spotipy/commit/4f1b634c7729b3c2b8c13971fb7a3b1ea44530df) keep legacy PORT envar support. - [`6015373`](https://github.com/spotipy-dev/spotipy/commit/601537385a49c5e1c349456997bbaa075d27b7b2) added app.py changes to CHANGELOG - [`c03287d`](https://github.com/spotipy-dev/spotipy/commit/c03287d3d5f3f204f00169b1d203acc8f14444aa) adding forgotten bracket - [`db05ff9`](https://github.com/spotipy-dev/spotipy/commit/db05ff953f4186da91f39e8729cb9d05162fc796) added end of line- requirement to regex for good measure - [`e2c6f7d`](https://github.com/spotipy-dev/spotipy/commit/e2c6f7dc6c184d49306846787d1b8bdbc3d4bc29) fix indentation - [`f2aa957`](https://github.com/spotipy-dev/spotipy/commit/f2aa957a9fe2990ceb3e8fc2cc933f05b183cd15) Readability and requested changes - [`ad5fb12`](https://github.com/spotipy-dev/spotipy/commit/ad5fb1223347388a5af2dfe023c01378dce3d19b) remove re dependency as we don't need it anymore - [`359798d`](https://github.com/spotipy-dev/spotipy/commit/359798dfd82eea7353af64b90ca57b913db440f0) Simplify the port selection for app.run ### 📊 Changes **2 files changed** (+4 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `examples/app.py` (+3 -2) </details> ### 📄 Description we try to get the port from SPOTIPY_REDIRECT_URI as we already have to set it there anyway. if we don't succeed we use 8080 as fallback. for legacy compatibility we still allow PORT envar and let it override the setting --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:03:02 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#971
No description provided.