Skip to content

Commit 42cf9b2

Browse files
committed
feat: Add support for CPython 3.14 (beta)
Add new versions after the .def files have been merged.
1 parent 3cd278c commit 42cf9b2

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/lib.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,11 @@ impl ImportLibraryGenerator {
292292
None => ("python313.def", include_str!("python313.def")),
293293
_ => return Err(Error::new(ErrorKind::Other, "Unsupported Python ABI flags")),
294294
},
295+
Some((3, 14)) => match self.abiflags.as_deref() {
296+
Some("t") => ("python314t.def", include_str!("python314t.def")),
297+
None => ("python314.def", include_str!("python314.def")),
298+
_ => return Err(Error::new(ErrorKind::Other, "Unsupported Python ABI flags")),
299+
},
295300
_ => return Err(Error::new(ErrorKind::Other, "Unsupported Python version")),
296301
},
297302
PythonImplementation::PyPy => match self.version {
@@ -561,15 +566,15 @@ mod tests {
561566
.generate(&dir)
562567
.unwrap();
563568

564-
for minor in 7..=13 {
569+
for minor in 7..=14 {
565570
ImportLibraryGenerator::new("x86_64", "gnu")
566571
.version(Some((3, minor)))
567572
.generate(&dir)
568573
.unwrap();
569574
}
570575

571576
// Free-threaded CPython v3.13+
572-
for minor in 13..=13 {
577+
for minor in 13..=14 {
573578
ImportLibraryGenerator::new("x86_64", "gnu")
574579
.version(Some((3, minor)))
575580
.abiflags(Some("t"))
@@ -609,15 +614,15 @@ mod tests {
609614
.generate(&dir)
610615
.unwrap();
611616

612-
for minor in 7..=13 {
617+
for minor in 7..=14 {
613618
ImportLibraryGenerator::new("x86_64", "msvc")
614619
.version(Some((3, minor)))
615620
.generate(&dir)
616621
.unwrap();
617622
}
618623

619624
// Free-threaded CPython v3.13+
620-
for minor in 13..=13 {
625+
for minor in 13..=14 {
621626
ImportLibraryGenerator::new("x86_64", "msvc")
622627
.version(Some((3, minor)))
623628
.abiflags(Some("t"))
@@ -656,15 +661,15 @@ mod tests {
656661
.generate(&dir)
657662
.unwrap();
658663

659-
for minor in 7..=13 {
664+
for minor in 7..=14 {
660665
ImportLibraryGenerator::new("aarch64", "msvc")
661666
.version(Some((3, minor)))
662667
.generate(&dir)
663668
.unwrap();
664669
}
665670

666671
// Free-threaded CPython v3.13+
667-
for minor in 13..=13 {
672+
for minor in 13..=14 {
668673
let mut generator = ImportLibraryGenerator::new("aarch64", "msvc");
669674
generator.version(Some((3, minor))).abiflags(Some("t"));
670675
let implib_file_path = generator.implib_file_path(&dir, IMPLIB_EXT_MSVC);

0 commit comments

Comments
 (0)