diff --git a/sentry_sdk/hub.py b/sentry_sdk/hub.py
index b161a4d4..a7056c66 100644
--- a/sentry_sdk/hub.py
+++ b/sentry_sdk/hub.py
@@ -205,8 +205,8 @@ class Hub(with_metaclass(HubMeta)):
             scope._breadcrumbs.append(crumb)
         else:
             logger.info("before breadcrumb dropped breadcrumb (%s)", original_crumb)
-        while len(scope._breadcrumbs) >= client.options["max_breadcrumbs"]:
-            scope._breadcrumbs.popleft()
+        while len(scope._breadcrumbs) > client.options["max_breadcrumbs"]:
+            scope._breadcrumbs.pop(0)
 
     def push_scope(self, callback=None):
         """Pushes a new layer on the scope stack. Returns a context manager

Breadcrumbs type error
We're having an issue with v0.3.2 where `popleft` is called on a list type:

```
File "/srv/frontend/project/lib/python3.5/site-packages/sentry_sdk/hub.py" in add_breadcrumb
  209.             scope._breadcrumbs.popleft()

Exception Type: AttributeError at /
Exception Value: 'list' object has no attribute 'popleft'
```
diff --git a/tests/test_basics.py b/tests/test_basics.py
index 1744c1ab..f5fac31d 100644
--- a/tests/test_basics.py
+++ b/tests/test_basics.py
@@ -139,3 +139,20 @@ def test_push_scope_null_client(sentry_init, capture_events):
             capture_exception(e)
 
     assert len(events) == 0
+
+
+def test_breadcrumbs_overflow(sentry_init, capture_events):
+    sentry_init(max_breadcrumbs=10)
+
+    for i in range(20):
+        add_breadcrumb(
+            category="auth", message="Authenticated user %s" % i, level="info"
+        )
+
+    events = capture_events()
+
+    capture_exception(ValueError())
+
+    event, = events
+
+    assert len(event["breadcrumbs"]) == 10

pip install -e .[flask]
parse_log_pytest
requirements.txt
pytest pytest-xdist pytest-cov pytest-localserver pytest-mock pytest-asyncio
3.7
test-requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
atomicwrites==1.4.1
attrs==24.2.0
blinker==1.6.3
certifi @ file:///croot/certifi_1671487769961/work/certifi
click==8.1.8
coverage==7.2.7
distlib==0.3.9
exceptiongroup==1.2.2
execnet==2.0.2
filelock==3.12.2
Flask==2.2.5
hypothesis==3.69.9
importlib-metadata==6.7.0
iniconfig==2.0.0
itsdangerous==2.1.2
Jinja2==3.1.6
MarkupSafe==2.1.5
more-itertools==9.1.0
packaging==24.0
platformdirs==4.0.0
pluggy==0.13.1
py==1.11.0
pytest==7.4.4
pytest-asyncio==0.21.2
pytest-cov==4.1.0
pytest-forked==1.2.0
pytest-localserver==0.4.1
pytest-mock==3.11.1
pytest-xdist==1.23.0
-e git+https://github.com/getsentry/sentry-python.git@dad6c6efd8acb6cd8925a89c91b4363cbb268eb9#egg=sentry_sdk
six==1.11.0
tomli==2.0.1
tox==3.2.1
typing_extensions==4.7.1
urllib3==2.0.7
virtualenv==20.26.6
Werkzeug==2.2.3
zipp==3.15.0

name: sentry-python
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - atomicwrites==1.4.1
      - attrs==24.2.0
      - blinker==1.6.3
      - click==8.1.8
      - coverage==7.2.7
      - distlib==0.3.9
      - exceptiongroup==1.2.2
      - execnet==2.0.2
      - filelock==3.12.2
      - flask==2.2.5
      - hypothesis==3.69.9
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - itsdangerous==2.1.2
      - jinja2==3.1.6
      - markupsafe==2.1.5
      - more-itertools==9.1.0
      - packaging==24.0
      - platformdirs==4.0.0
      - pluggy==0.13.1
      - py==1.11.0
      - pytest==7.4.4
      - pytest-asyncio==0.21.2
      - pytest-cov==4.1.0
      - pytest-forked==1.2.0
      - pytest-localserver==0.4.1
      - pytest-mock==3.11.1
      - pytest-xdist==1.23.0
      - sentry-sdk==0.3.2
      - six==1.11.0
      - tomli==2.0.1
      - tox==3.2.1
      - typing-extensions==4.7.1
      - urllib3==2.0.7
      - virtualenv==20.26.6
      - werkzeug==2.2.3
      - zipp==3.15.0
prefix: /opt/conda/envs/sentry-python

tests/test_basics.py::test_breadcrumbs_overflow
tests/test_basics.py::test_processors tests/test_basics.py::test_event_id tests/test_basics.py::test_option_callback tests/test_basics.py::test_breadcrumb_arguments tests/test_basics.py::test_push_scope tests/test_basics.py::test_push_scope_null_client
sentry_sdk/hub.py
sentry_sdk/hub.py