אנחנו שמחים להודיע על השחרור של GroupDocs.Assembly for Python v26.11, זמין החל מ-נובמבר 2026. גרסה זו מביאה שיפורי תמיכה משמעותיים בפלטפורמות—כולל גלגלים (wheels) ראשונים עבור Linux ו‑macOS—ביחד עם תמיכה במקורות נתונים של Python, טיפול משופר בשגיאות, ועדכוני תלויות. היא גם מציגה מספר תכונות חדשות ושינויים שבורים כדי להתאים לפרקטיקות מודרניות של Python ו‑.NET 10.
מה חדש בגרסה זו
- [Feature] הוספת גלגלים עבור Linux x64 ו‑macOS (Intel ו‑Apple Silicon) (ASSEMBLYPYTHON-26)
- [Feature] הוספת תמיכה במילון Python או ברשימה כמקור נתונים (ASSEMBLYPYTHON-27)
- [Feature] הוספת תמיכה במטפל Python לטעינת טבלאות מסמך (
IDocumentTableLoadHandler) (ASSEMBLYPYTHON-28) - [Feature] הוספת תמיכה בסוגי Python כאשר ה‑API מקבל
Typeשל .NET (DocumentTableColumn.type,known_types) (ASSEMBLYPYTHON-29) - [Feature] הוספת תמיכה ביישום הרישיון מהמשתנה הסביבתי
GROUPDOCS_LIC_PATH(ASSEMBLYPYTHON-30) - [Enhancement] עדכון GroupDocs.Assembly ל‑26.7 וה‑runtime המוטמע ל‑.NET 10.0.14 (ASSEMBLYPYTHON-31)
- [Enhancement] הפצת חבילה טהורה‑Python עבור Python 3.5 – 3.14 במקום ההרחבה המהודרת (ASSEMBLYPYTHON-32)
- [Enhancement] קבלה של
DataSourceInfoאחד ב‑assemble_document()וכן רשימה (ASSEMBLYPYTHON-33) - [Enhancement] העלאת
FileNotFoundErrorעבור קובץ חסר,LicenseErrorעבור רישיון שלא ניתן ליישם, ו‑GroupDocsAssemblyExceptionעבור שגיאות מנוע אחרות (ASSEMBLYPYTHON-34) - [Enhancement] שינוי שם
BarcodeSettings.x_resolution/y_resolutionל‑xresolution/yresolution, והפיכתuse_reflection_optimizationלמאפיין מחלקה (ASSEMBLYPYTHON-35) - [Enhancement] הסרת גלגל Windows 32‑bit (ASSEMBLYPYTHON-36)
- [Fix] תיקון ממצאי CVE ב‑25.5.1: zlib 1.2.11 → 1.2.12 (+4 נוספים) (ASSEMBLYPYTHON-11)
שינויים בממשק API ציבורי
המעדכנים צריכים לשנות שם x_resolution/y_resolution ו‑set_use_reflection_optimization(), ולתפוס GroupDocsAssemblyException ו‑LicenseError במקום RuntimeError. כל השאר הוא תוספת.
מחלקות וחברים חדשים
groupdocs.assembly:FontSettings,FolderFontSource,IFontSource,SearchOption,OoxmlCompliance,GroupDocsAssemblyException,LicenseError,LicenseWarning.LoadSaveOptions:ooxml_compliance.KnownTypeSet:append().DocumentTableCollection,DocumentTableColumnCollection:get().DocumentTableRelationCollection:append(),get().
שונה שם
BarcodeSettings.x_resolution→BarcodeSettings.xresolutionBarcodeSettings.y_resolution→BarcodeSettings.yresolution
השם הישן מעלה AttributeError עם רמז “Did you mean”, הן בקריאה והן בהקצאה.
הוסר
DocumentAssembler.set_use_reflection_optimization(): הקצו במקום זאת למאפיין המחלקה,DocumentAssembler.use_reflection_optimization = False.
השתנה
DataSourceInfoמקבל מילון או רשימה.assemble_document()מקבלDataSourceInfoאחד וכן רשימה.DocumentTableSet(path, load_handler)מקבל פונקציית Python או אובייקט עםhandle(args).DocumentTableColumn.typeו‑KnownTypeSet.add()מקבלים סוג Python.- שגיאות מנוע מייצרות
FileNotFoundError,RuntimeError,LicenseErrorאוGroupDocsAssemblyException.except Exceptionתופס את השגיאות של שתי הגרסאות.
תכונות חדשות
Linux ו‑macOS
ב‑26.11 יש גלגלים עבור Linux x64 (manylinux_2_27_x86_64, glibc 2.27 או חדש יותר) ועבור macOS 12 או חדש יותר ב‑Intel (macosx_12_0_x86_64) וב‑Apple Silicon (macosx_12_0_arm64), לצד Windows x64. ב‑25.5 היו רק גלגלים ל‑Windows. pip 20.3 או חדש יותר בוחר את הגלגל המתאים לפלטפורמה. ב‑Linux ה‑runtime של .NET דורש ICU, ותבניות הצגה דורשות libgdiplus (ראו Requirements).
pip install groupdocs-assembly-net==26.11.0
נתוני Python כמקור נתונים
DataSourceInfo מקבל מילון, רשימת מילונים או רשימת ערכים כפי שהוא; ב‑25.5 הועלתה TypeError עבור מילון. העטיפה ממירה את הנתונים לאובייקטים של .NET המוגדרים לפי הצורה שלהם, כך שמספרים, מחרוזות, bool, datetime, date ו‑Decimal מגיעים לתבנית עם טיפוס: <<[o.OrderDate.Month]>> ו‑<<if [c.Vip]>> פועלים כפי שהם על אובייקטים של .NET. מילונים ברשימה אחת חולקים טיפוס אחד עם האיחוד של המפתחות שלהם.
from groupdocs.assembly import DataSourceInfo, DocumentAssembler
orders = [
{"Number": 10001, "Product": "Harbor Blend whole bean coffee", "Quantity": 30, "Price": 552.0},
{"Number": 10004, "Product": "Aged harbour cheddar", "Quantity": 8, "Price": 132.0},
]
# order-table.docx: טבלה שהשורה <<foreach [o in orders]>><<[o.Number]>> ... <</foreach>> חוזרת לכל הזמנה
DocumentAssembler().assemble_document("order-table.docx", "order-table-report.docx", [
DataSourceInfo("Quayside Bistro", "customer"),
DataSourceInfo(orders, "orders"),
])
מקור נתונים אחד ללא רשימה
assemble_document() מקבל DataSourceInfo אחד או רשימה של כאלה, כפי ש‑params DataSourceInfo[] של .NET עושה. ב‑25.5 נדרש היה רשימה והועלתה TypeError: can't build Array value from 'groupdocs.assembly.DataSourceInfo' עבור אחד.
from groupdocs.assembly import DataSourceInfo, DocumentAssembler
customer = {"Name": "Quayside Bistro", "Product": "Harbor Blend whole bean coffee"}
DocumentAssembler().assemble_document("hello-world.docx", "hello-world-report.docx", DataSourceInfo(customer, "customer"))
מטפלים בטעינת טבלאות
DocumentTableSet(path, load_handler) מקבל פונקציית Python (args), או אובייקט עם מתודה handle(args), וקורא לה עבור כל טבלה במסמך לפני הטעינה. המטפל מגדיר את args.options של הטבלה, או מדלג על הטבלה עם args.is_loaded = False; args.table_index מצביע על מספר הטבלה. ב‑25.5 הועלתה TypeError עבור פונקציית Python.
from groupdocs.assembly.data import DocumentTableOptions, DocumentTableSet
def on_table(args):
options = DocumentTableOptions()
options.first_row_contains_column_names = True
args.options = options
tables = DocumentTableSet("contracts.xlsx", on_table)
for table in tables.tables:
print(table.name, [column.name for column in table.columns])
סוגי Python כאשר ה‑API מקבל סוג .NET
סוג Python מייצג את סוג .NET שהחבר מקבל: float עבור System.Double, int, str, bool, datetime. ניתן להפוך עמודה בטבלת מסמך למספרית כך שגרף יסכם אותה, ו‑known_types מאפשר לתבנית לקרוא לחברים סטטיים של סוג; הוא גם מקבל שם סוג של .NET. ב‑25.5 הועלתה TypeError: can't build Type value from 'type'.
from groupdocs.assembly import DataSourceInfo, DocumentAssembler
from groupdocs.assembly.data import DocumentTable, DocumentTableOptions
options = DocumentTableOptions()
options.first_row_contains_column_names = True
contracts = DocumentTable("contracts.xlsx", 0, options)
contracts.columns["Price"].type = float
assembler = DocumentAssembler()
assembler.known_types.add("System.Math") # תבניות יכולות לקרוא <<[Math.Round(x, 1)]>>
assembler.assemble_document("table-row.docx", "table-row-report.docx", DataSourceInfo(contracts, "contracts"))
רישיון מהסביבה
הגדירו GROUPDOCS_LIC_PATH לנתיב של קובץ רישיון, או ל‑URL שמשרת רישיון, והרישיון ייושם בקריאה הראשונה למנוע, ללא קוד רישיון; ב‑25.5 המשתנה לא נקרא. אם הרישיון לא ניתן ליישום (קובץ חסר, מנוי פג, רישיון למוצר אחר), כל קריאת מנוע תעלה LicenseError, עם שם המשתנה וסיבת המנוע, עד ש‑License().set_license() מיישם רישיון. הגדרת GROUPDOCS_LIC_STRICT=0 תיתן LicenseWarning אחד ומצב הערכה במקום זאת.
from groupdocs.assembly import DataSourceInfo, DocumentAssembler, LicenseError
customer = {"Name": "Quayside Bistro", "Product": "Harbor Blend whole bean coffee"}
try:
DocumentAssembler().assemble_document("hello-world.docx", "hello-world-report.docx", DataSourceInfo(customer, "customer"))
except LicenseError as e:
print(e) # GROUPDOCS_LIC_PATH=... could not be applied: <reason>
שגיאות לפי סוג
ב‑25.5 הועלתה RuntimeError("Proxy error(<.NET exception>): ...") עבור כל שגיאת מנוע. ב‑26.11 מייצרים FileNotFoundError עבור תבנית או קובץ נתונים חסרים, שעדיין נגזר מ‑RuntimeError; RuntimeError עם הודעת המנוע בלבד עבור שגיאת תבנית או חבר שהנתונים חסרים; LicenseError עבור רישיון שלא ניתן ליישם; ו‑GroupDocsAssemblyException עבור שאר שגיאות המנוע. LicenseError ו‑GroupDocsAssemblyException ניתנים לייבוא מ‑groupdocs.assembly ואינם נגזרים מ‑RuntimeError.
from groupdocs.assembly import DataSourceInfo, DocumentAssembler, GroupDocsAssemblyException
try:
DocumentAssembler().assemble_document("no-such-template.docx", "report.docx", DataSourceInfo({"Name": "A"}, "customer"))
except FileNotFoundError as e:
print("missing:", e)
except (RuntimeError, GroupDocsAssemblyException) as e:
print("engine:", e)
דוגמת קוד
from groupdocs.assembly import DataSourceInfo, DocumentAssembler, FileFormat, LoadSaveOptions, OoxmlCompliance
options = LoadSaveOptions(FileFormat.DOCX)
options.ooxml_compliance = OoxmlCompliance.STRICT
customer = {"Name": "Quayside Bistro", "Product": "Harbor Blend whole bean coffee"}
DocumentAssembler().assemble_document("hello-world.docx", "hello-world-strict.docx", options, DataSourceInfo(customer, "customer"))
איך לקבל את העדכון
PyPI
שדרגו לחבילה העדכנית ביותר דרך PyPI:
groupdocs-assembly-net 26.11.0
pip install groupdocs-assembly-net==26.11.0
הורדה ישירה
הורידו גלגלים לפלטפורמה שלכם מהדף GroupDocs.Assembly for Python v26.11.