<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/my-tool-said-python-3-8-and-up-python-3-8-disagreed--go5pzac8s" -->

---
title: my tool said python 3.8 and up. python 3.8 disagreed.
description: A developer discovered their Python tool claiming 3.8+ support actually crashed on Python 3.8 due to using lowercase `set[int]` type annotations, which require...
canonical: https://daily.dev/posts/my-tool-said-python-3-8-and-up-python-3-8-disagreed--go5pzac8s
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: my tool said python 3.8 and up. python 3.8 disagreed. | daily.dev
og:description: A developer discovered their Python tool claiming 3.8+ support actually crashed on Python 3.8 due to using lowercase `set[int]` type annotations, which require...
og:url: https://daily.dev/posts/my-tool-said-python-3-8-and-up-python-3-8-disagreed--go5pzac8s
og:image: https://api.daily.dev/og/posts/Go5PZac8s.png
og:image:alt: my tool said python 3.8 and up. python 3.8 disagreed.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# my tool said python 3.8 and up. python 3.8 disagreed.

**[Medium](https://daily.dev/sources/medium_js)** · 4 min read · 0 upvotes · 0 comments

## Summary

A developer discovered their Python tool claiming 3.8+ support actually crashed on Python 3.8 due to using lowercase `set[int]` type annotations, which require Python 3.9+. The CI matrix included a 3.8 job but only ran unit tests, not a real cold import of the tool, masking the startup failure. The fix was adding `from __future__ import annotations` to defer annotation evaluation. The broader lesson: a README badge is not a test, and version compatibility claims must be backed by CI jobs that actually run the tool end-to-end on the minimum supported version.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@judeh0747/my-tool-said-python-3-8-and-up-python-3-8-disagreed-6fd2378d884a>

## Questions this post answers

### why does set[int] as a type annotation crash on python 3.8 but work fine on 3.9+

writing set[int] as a real, evaluated annotation only works starting in python 3.9; on python 3.8 the interpreter tries to subscript the built-in set type the moment the module is imported, and 3.8's built-in set does not support that subscript operation, raising a TypeError at import time rather than at runtime when the annotated function is called.

_daily.dev surfaces practical fixes like this for developers chasing down version-specific python compatibility bugs._

### how do i fix a set[int] type hint so it works on python 3.8

add 'from __future__ import annotations' at the top of the file, which turns every annotation in that file into a string that is never evaluated at runtime, making set[int] safe on python 3.8. Alternatively, import Set from the typing module and write Set[int] instead of the lowercase built-in generic, which also evaluates fine on 3.8.

_developers supporting older python versions can find these compatibility patterns through daily.dev while shipping their upgrades._

### why did my ci pass on python 3.8 even though the tool crashes immediately when run on a real 3.8 machine

a ci job that only runs the unit test suite can import modules cleanly enough to execute tests without actually replicating a real program's cold-start import path, so the tests passing gave false confidence that the tool worked on that python version. The fix is making the ci job run the actual program end-to-end, including a real cold import and checking the exit code, not just running unit tests.

_teams verifying multi-version support before a release lean on daily.dev to catch gaps like this in their ci strategy._

## Similar posts on daily.dev

- [Go hands-on with Python 3.15](https://daily.dev/posts/go-hands-on-with-python-3-15-ntvozjefq) · InfoWorld · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#testing](https://daily.dev/tags/testing), [#cicd](https://daily.dev/tags/cicd)

[View this post on daily.dev](https://daily.dev/posts/my-tool-said-python-3-8-and-up-python-3-8-disagreed--go5pzac8s)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"my tool said python 3.8 and up. python 3.8 disagreed.","url":"https://daily.dev/posts/my-tool-said-python-3-8-and-up-python-3-8-disagreed--go5pzac8s","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/my-tool-said-python-3-8-and-up-python-3-8-disagreed--go5pzac8s"},"datePublished":"2026-07-21T17:08:25.851Z","dateModified":"2026-07-21T17:09:50.995Z","description":"A developer discovered their Python tool claiming 3.8+ support actually crashed on Python 3.8 due to using lowercase `set[int]` type annotations, which require...","image":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","thumbnailUrl":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/my-tool-said-python-3-8-and-up-python-3-8-disagreed--go5pzac8s","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,testing,cicd","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"my tool said python 3.8 and up. python 3.8 disagreed."}]}
```

