-
Notifications
You must be signed in to change notification settings - Fork 2
fix: relax pywin32 version constraint to >=307 #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Skelmis
merged 1 commit into
Skelmis:master
from
fortaine:fix/pywin32-version-constraint
Jan 20, 2026
Merged
fix: relax pywin32 version constraint to >=307 #30
Skelmis
merged 1 commit into
Skelmis:master
from
fortaine:fix/pywin32-version-constraint
Jan 20, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The pinned pywin32==307 causes dependency conflicts with other packages like mcp (Model Context Protocol) which requires pywin32>=310. Changing to >=307 allows compatibility with newer pywin32 versions while maintaining the minimum version requirement.
gfortaine
added a commit
to machinemates-ai/gemini-research-mcp
that referenced
this pull request
Jan 20, 2026
Switched from python-docx to skelmis-docx (enhanced fork with native TOC, bookmarks, hyperlinks, and PDF export support). Using fortaine fork temporarily until pywin32 version constraint is relaxed upstream. - Export DOCX documents now include auto-generated Table of Contents - TOC entries link directly to sections in the document - Updated tests to use skelmis.docx import path - export_research_session now uses AI-powered semantic session matching - Both research_followup and export_research_session fall back to most recent session when no match found (handles generic queries like 'elaborate') - Added 11 tests for session matching behavior and fallback logic Upstream PR: Skelmis/python-docx#30
gfortaine
added a commit
to machinemates-ai/gemini-research-mcp
that referenced
this pull request
Jan 20, 2026
* docs: add PyPI and Python version badges to README * fix: correct client health tracking in retry loops - Refresh client inside initial retry loop so health-based refreshes take effect after consecutive failures - Validate resume_stream is not None before recording success in reconnect path to prevent incorrect health metrics Fixes issues identified in code review: - Client was captured once before retry loop, preventing refresh - Success was recorded before validating stream was iterable * feat: simplify API to 4 tools with proper session context - Add summary and report_text fields to ResearchSession - research_deep now auto-saves 300-char summary for discovery - list_research_sessions shows query + summary for each session - Remove 4 unnecessary tools: get/update/delete/cleanup sessions - Rename summary() method to short_description() to avoid conflict - Update server instructions to document 4-tool workflow API surface reduced from 8 to 4 tools: - research_web: fast lookup (5-30s) - research_deep: comprehensive research (3-20 min) - research_followup: continue old research by interaction_id - list_research_sessions_tool: discover sessions by query + summary * feat: use Gemini 3.0 Flash for AI-powered session summaries - Add generate_summary() using gemini-3.0-flash with minimal thinking - Replace naive truncation with proper 2-3 sentence AI summary - Add GEMINI_SUMMARY_MODEL env var for customization - Cost: ~$0.0003 per summary (~100 output tokens) - Fallback to truncation if AI call fails * feat: semantic session matching for research_followup User journey now works seamlessly: 1. User: "What research did I do about quantum?" 2. Agent: list_research_sessions → JSON with queries + summaries 3. Agent summarizes sessions to user 4. User: "Tell me more about surface codes" 5. Agent: research_followup(query="surface codes") → auto-matches session Implementation: - list_research_sessions_tool now returns JSON (parseable by agents) - research_followup accepts query-first, interaction_id is optional - semantic_match_session() uses Gemini 3.0 Flash (minimal thinking) to find best matching session from summaries - Cost: ~$0.0003 per match call - Fallback: error message with guidance if no match found * feat: add export tool with DOCX/Markdown/JSON support - Add export_research_session tool for sharing research reports - Support Markdown (.md), JSON (.json), and Word (.docx) formats - DOCX uses python-docx with proper heading, list, and inline formatting - Add python-docx as optional dependency [docx] extra Bug fixes from review: - Guard auto-save session against filesystem errors (Medium) - Fix GEMINI_RESEARCH_STORAGE_PATH handling for ~ and directories (Medium) - Fix list_sessions_async limit handling for 0/negative values (Low) - Add explicit KeyError for missing required fields in from_dict (Low) - Fix config comment about client refresh behavior (Low) - Remove unused imports from tests (Low) New tests: 26 export tests covering all formats Total: 134 tests passing, mypy clean * feat(export): use skelmis-docx for TOC and hyperlink support Switched from python-docx to skelmis-docx (enhanced fork with native TOC, bookmarks, hyperlinks, and PDF export support). Using fortaine fork temporarily until pywin32 version constraint is relaxed upstream. - Export DOCX documents now include auto-generated Table of Contents - TOC entries link directly to sections in the document - Updated tests to use skelmis.docx import path - export_research_session now uses AI-powered semantic session matching - Both research_followup and export_research_session fall back to most recent session when no match found (handles generic queries like 'elaborate') - Added 11 tests for session matching behavior and fallback logic Upstream PR: Skelmis/python-docx#30 * fix: update client health during polling to prevent premature refresh The polling loop in deep research now calls _record_client_success() after each successful poll. This prevents the client from being refreshed mid- research due to appearing 'idle' (idle_time > CLIENT_MAX_AGE_SECONDS / 2). Previously, long polling sessions (>30 min) could trigger client refresh because last_request_at wasn't being updated during successful polls. * feat(export): add MCP Resources for binary export downloads - Add ephemeral export cache with 1-hour TTL - Create research://exports/{id} for binary blob downloads - Create research://exports for listing available exports - Update export tool to return resource URI instead of base64 - VS Code Copilot can now 'Save' or drag-drop exports directly - Add 7 tests for export cache functionality - Remove unused imports (export_to_docx, export_to_json, export_to_markdown) * style(tests): apply ruff auto-fixes and format improvements - Combine nested with statements in test_config.py - Add noqa comments for intentional late imports in test_streaming.py - Apply consistent formatting across test files * fix: address code review findings - Pin skelmis-docx to commit SHA for reproducible builds - Add defensive handling for corrupted storage entries in list_sessions_async - Fix import error message to use correct install command - Fix _add_formatted_text docstring to match actual regex behavior - Add summary truncation in semantic_match_session to prevent context overflow - Add test for corrupted session handling * feat: enhanced DOCX export with cover page, static TOC, styled metadata - Add cover page with centered title and research metadata - Replace dynamic Word TOC with static TOC (no manual update required) - Add metadata table with styled cells and shading - Add executive summary with highlighted box formatting - Implement blue color scheme for headings - Support EmbeddedResource pattern for VS Code Save As functionality
Skelmis
approved these changes
Jan 20, 2026
Owner
Skelmis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure why ci is failing on linux given this is a windows change but sounds good to me!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The pinned
pywin32==307constraint causes dependency conflicts with other packages that require newer pywin32 versions.Problem
When using skelmis-docx alongside packages like
mcp(Model Context Protocol SDK) which requirespywin32>=310, the dependency resolver fails:Solution
Change
pywin32==307topywin32>=307to allow compatibility with newer pywin32 versions while maintaining the minimum version requirement.Testing
sys_platform == 'windows')Use Case
I'm integrating skelmis-docx into gemini-research-mcp for exporting research reports to DOCX format with TOC support. The MCP SDK has a strict pywin32 requirement that conflicts with the pinned version.